File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,13 @@ BinConv::Method BinConv::method() const {
8383 return Method::DIRECT_CONV;
8484 } else if (gemm_compatible ()) {
8585 return Method::BGEMM;
86- } else {
86+ } else if (input_mat-> elem_c == 64 ) {
8787 return Method::BCONV_NAIVE;
88+ } else {
89+ return Method::BGEMM_NAIVE;
8890 }
8991 } else {
90- if (weight_mat-> c == 1 ) {
92+ if (input_mat-> elem_c == 64 ) {
9193 return Method::BCONV_NAIVE;
9294 } else {
9395 return Method::BGEMM_NAIVE;
@@ -128,11 +130,11 @@ bool BinConv::gemm_compatible() const {
128130#ifdef __aarch64__
129131 return true ;
130132#else
131- // If weight_mat->c == 1 (weight_mat has 64 channels), we use bconv_64
133+ // If input_mat->elem_c == 1 (weight_mat has 64 channels), we use bconv_64
132134 // in aarch64 for the fastest speed, however, bconv_64 is not implemented
133135 // in armv7
134136 // TODO: Implement bconv_64 for armv7
135- return weight_mat-> c != 1 ;
137+ return input_mat-> elem_c != 64 ;
136138#endif
137139#else
138140 return false ;
You can’t perform that action at this time.
0 commit comments