提交 9348cb41 编写于 作者: C chenjiaoAngel

fix format

上级 9a09cf28
...@@ -736,6 +736,7 @@ void conv_depthwise_5x5_fp32(const void* din, ...@@ -736,6 +736,7 @@ void conv_depthwise_5x5_fp32(const void* din,
bool flag_relu = param.fuse_relu; bool flag_relu = param.fuse_relu;
bool flag_bias = param.bias != nullptr; bool flag_bias = param.bias != nullptr;
bool ch_four = ch_in > 4 * w_in; bool ch_four = ch_in > 4 * w_in;
bool pads_five = (pad_h < 5) || (pad_w < 5);
ctx->ExtendWorkspace((w_in + w_out) * sizeof(float)); ctx->ExtendWorkspace((w_in + w_out) * sizeof(float));
bool flag_act = act_param.has_active; bool flag_act = act_param.has_active;
if (stride == 2) { if (stride == 2) {
...@@ -754,7 +755,7 @@ void conv_depthwise_5x5_fp32(const void* din, ...@@ -754,7 +755,7 @@ void conv_depthwise_5x5_fp32(const void* din,
act_param, act_param,
ctx); ctx);
} else if (stride == 1) { } else if (stride == 1) {
if (ch_four || h_in < 5 || w_in < 5) { if (ch_four || !pads_five || h_in < 5 || w_in < 5) {
conv_depthwise_5x5s1_fp32(reinterpret_cast<float*>(dout), conv_depthwise_5x5s1_fp32(reinterpret_cast<float*>(dout),
reinterpret_cast<const float*>(din), reinterpret_cast<const float*>(din),
reinterpret_cast<const float*>(weights), reinterpret_cast<const float*>(weights),
......
...@@ -59,8 +59,9 @@ void DepthwiseConv<PRECISION(kFloat), PRECISION(kFloat)>::PrepareForRun() { ...@@ -59,8 +59,9 @@ void DepthwiseConv<PRECISION(kFloat), PRECISION(kFloat)>::PrepareForRun() {
#endif #endif
} else if (kw == 5) { } else if (kw == 5) {
// VLOG(5) << "invoke 5x5 dw conv fp32"; // VLOG(5) << "invoke 5x5 dw conv fp32";
bool pads_five = (paddings[0] < 5) || (paddings[2] < 5);
auto strides = param.strides; auto strides = param.strides;
if (ch_four && win >= kw && hin >= kw && (strides[0] == 1 && strides[1] == 1)) { if (ch_four && pads_five && win >= kw && hin >= kw && (strides[0] == 1 && strides[1] == 1)) {
flag_trans_weights_ = false; flag_trans_weights_ = false;
impl_ = lite::arm::math::conv_depthwise_5x5_fp32; impl_ = lite::arm::math::conv_depthwise_5x5_fp32;
#ifdef LITE_WITH_PROFILE #ifdef LITE_WITH_PROFILE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册