Skip to content

Commit 107c977

Browse files
nshchegoalanzhai219
authored andcommitted
Fix for Conv-DWConv-PRelu fusing (#296)
* Fix for Conv-DWConv-PRelu fusing * Fix as per comment
1 parent a63c830 commit 107c977

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/cpu/x64/jit_avx2_1x1_conv_kernel_f32_old.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,10 @@ void jit_avx2_1x1_conv_kernel_f32_old::generate() {
397397

398398
std::size_t post_ops_pointers_count = 0;
399399
for (int i = 0; i < p.len(); i++) {
400+
if (jcp.with_dw_conv && p.entry_[i].is_convolution()) {
401+
// dw_conv and post_ops after it are handled externally in *dw_conv* kernels, so skip them here.
402+
break;
403+
}
400404
if (p.entry_[i].is_depthwise() || p.entry_[i].is_quantization()) {
401405
post_ops_pointers_count++;
402406
}
@@ -602,7 +606,7 @@ status_t jit_avx2_1x1_conv_kernel_f32_old::init_conf(jit_1x1_conv_conf_t &jcp,
602606
return status::unimplemented;
603607

604608
if (jcp.with_dw_conv) {
605-
// dw_conv and post_ops after it are handled externally, so skip them
609+
// dw_conv and post_ops after it are handled externally in *dw_conv* kernels, so skip them here.
606610
jcp.post_ops.entry_.assign(p.entry_.cbegin(),
607611
p.entry_.cbegin() + dw_conv_ind);
608612

0 commit comments

Comments
 (0)