File tree 1 file changed +6
-4
lines changed
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 {
83
83
return Method::DIRECT_CONV;
84
84
} else if (gemm_compatible ()) {
85
85
return Method::BGEMM;
86
- } else {
86
+ } else if (input_mat-> elem_c == 64 ) {
87
87
return Method::BCONV_NAIVE;
88
+ } else {
89
+ return Method::BGEMM_NAIVE;
88
90
}
89
91
} else {
90
- if (weight_mat-> c == 1 ) {
92
+ if (input_mat-> elem_c == 64 ) {
91
93
return Method::BCONV_NAIVE;
92
94
} else {
93
95
return Method::BGEMM_NAIVE;
@@ -128,11 +130,11 @@ bool BinConv::gemm_compatible() const {
128
130
#ifdef __aarch64__
129
131
return true ;
130
132
#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
132
134
// in aarch64 for the fastest speed, however, bconv_64 is not implemented
133
135
// in armv7
134
136
// TODO: Implement bconv_64 for armv7
135
- return weight_mat-> c != 1 ;
137
+ return input_mat-> elem_c != 64 ;
136
138
#endif
137
139
#else
138
140
return false ;
You can’t perform that action at this time.
0 commit comments