Skip to content

Commit 8186817

Browse files
fixup: cpu: avx2: zero-pad scratchpad only for nxc format in 1x1 f32 bwd_w driver
1 parent d307dfd commit 8186817

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cpu/x64/jit_avx2_1x1_convolution.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,8 @@ void jit_avx2_1x1_convolution_bwd_weights_t::execute_backward_weights(
681681
sp_step = nstl::min(sp_dim - sp, mb_sp_end - mb_sp);
682682

683683
const bool first_image = img == img_start;
684-
if (first_image && rw->balancer().nthr_per_group_ > 1) {
684+
if (is_ddst_layout_nxc && first_image
685+
&& rw->balancer().nthr_per_group_ > 1) {
685686
// Zero-pad the scratchpad when nthr > 1 (since most threads
686687
// write to scratchpad) so that zero-padding is maintained
687688
// for the final output after reduction

0 commit comments

Comments
 (0)