From da352916fe6d9e471cb61219ed5dafc829f33aaa Mon Sep 17 00:00:00 2001 From: nihuini Date: Wed, 1 Aug 2018 17:27:06 +0800 Subject: [PATCH] fix pd using flag condition --- src/layer/arm/convolution_arm.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/layer/arm/convolution_arm.cpp b/src/layer/arm/convolution_arm.cpp index 03317ff78..7f14222c2 100644 --- a/src/layer/arm/convolution_arm.cpp +++ b/src/layer/arm/convolution_arm.cpp @@ -38,12 +38,7 @@ int Convolution_arm::load_param(const ParamDict& pd) use_winograd3x3 = false; use_sgemm1x1 = false; - if (use_int8_inference) - { - return 0; - } - - if (kernel_w == 3 && kernel_h == 3 && dilation_w == 1 && dilation_h == 1 && stride_w == 1 && stride_h == 1) + if (pd.use_winograd_convolution && kernel_w == 3 && kernel_h == 3 && dilation_w == 1 && dilation_h == 1 && stride_w == 1 && stride_h == 1) { int num_input = weight_data_size / 9 / num_output; // winograd is slow on small channel count @@ -52,7 +47,7 @@ int Convolution_arm::load_param(const ParamDict& pd) } // TODO assume more proper condition - if (kernel_w == 1 && kernel_h == 1 && dilation_w == 1 && dilation_h == 1 && stride_w == 1 && stride_h == 1) + if (pd.use_sgemm_convolution && kernel_w == 1 && kernel_h == 1 && dilation_w == 1 && dilation_h == 1 && stride_w == 1 && stride_h == 1) { int num_input = weight_data_size / num_output; if (num_input >= 64 && num_output >= 64)