From e68f1514061e4f58cc67a9669985ea3c4563acaf Mon Sep 17 00:00:00 2001 From: Srinivas Putta Date: Mon, 30 Sep 2019 17:52:31 -0700 Subject: [PATCH] src: cpu: int8: dilated conv: fixup case when ih<=dh --- src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp | 6 ++++-- tests/benchdnn/inputs/test_conv_regression_general | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp b/src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp index 70b0a200591..b514bf67603 100644 --- a/src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp +++ b/src/cpu/jit_avx512_core_x8s8s32x_conv_kernel.cpp @@ -518,8 +518,10 @@ void _jit_avx512_core_x8s8s32x_fwd_kernel::kh_loop( L(no_t_overflow_label); } mov(reg_kj, ptr[param1 + GET_OFF(kh_padding)]); - if ((jcp.signed_input) || (!jcp.signed_input && - (jcp.kh - 1) * (jcp.dilate_h + 1) < nstl::max(jcp.t_pad, jcp.b_pad))) { + if ((jcp.signed_input) || (jcp.dilate_h >= jcp.ih) + || (!jcp.signed_input + && (jcp.kh - 1) * (jcp.dilate_h + 1) + < nstl::max(jcp.t_pad, jcp.b_pad))) { cmp(reg_kj, 0); je(skip_kh_loop, T_NEAR); } diff --git a/tests/benchdnn/inputs/test_conv_regression_general b/tests/benchdnn/inputs/test_conv_regression_general index f3945b942b3..b91468c144d 100644 --- a/tests/benchdnn/inputs/test_conv_regression_general +++ b/tests/benchdnn/inputs/test_conv_regression_general @@ -145,3 +145,6 @@ mb1_g16ic16oc16_ih5oh2kh2sh3ph0 # AVX JIT incorrectly calculates output when 'nb_oc_block' results in a prime number --reset --dir=FWD_I mb1ic3ih320oc51oh160kh7sh2ph3n"regression_oc-channel" + +# Dilated convolution with ih<=dh when there is _no_ compute work. +--reset --conv --cfg=u8s8u8s32 mb1ic16ih1iw1oc16oh2ow1kh3kw1dh1ph1