From a38dc43bd2b24399b51dd30a3541ccf7065c0b9d Mon Sep 17 00:00:00 2001 From: HappyAngel Date: Tue, 10 Mar 2020 16:57:58 +0800 Subject: [PATCH] [ARM]fix conv3x3_dw v7 clang bug (#3129) * fix v7 clang bug. test=develop * fix format, test=develop * fix .a build bug, test=develop --- lite/CMakeLists.txt | 1 - lite/kernels/arm/conv_compute.cc | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lite/CMakeLists.txt b/lite/CMakeLists.txt index fefa11d2e2..f5a5f96cf3 100644 --- a/lite/CMakeLists.txt +++ b/lite/CMakeLists.txt @@ -187,7 +187,6 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) add_dependencies(publish_inference tiny_publish_cxx_lib) if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") add_custom_command(TARGET tiny_publish_cxx_lib POST_BUILD - COMMAND ${CMAKE_STRIP} "-s" ${INFER_LITE_PUBLISH_ROOT}/cxx/lib/libpaddle_api_light_bundled.a COMMAND ${CMAKE_STRIP} "-s" ${INFER_LITE_PUBLISH_ROOT}/cxx/lib/libpaddle_light_api_shared.so) endif() endif() diff --git a/lite/kernels/arm/conv_compute.cc b/lite/kernels/arm/conv_compute.cc index 34dd6ac97c..1dd6707049 100644 --- a/lite/kernels/arm/conv_compute.cc +++ b/lite/kernels/arm/conv_compute.cc @@ -58,12 +58,13 @@ void ConvCompute::PrepareForRun() { bool flag_dw_3x3 = (kw == 3) && (kh == 3) && (stride == 1 || stride == 2); bool flag_dw_5x5 = (kw == 5) && (kh == 5) && (stride == 1 || stride == 2); - bool flag_dw = flag_dw_3x3 || flag_dw_5x5; #ifdef LITE_WITH_ARM_CLANG // clang flag_dw_3x3 = (stride == 1 && (paddings[0] > 1 || paddings[2] > 1)) ? false : true; #endif + bool flag_dw = flag_dw_3x3 || flag_dw_5x5; + /// select conv impl if (param.groups == ic && ic == oc && ks_equal && no_dilation && flag_dw) { impl_ = new DepthwiseConv; -- GitLab