From 461d55e65f2bc0f45fcdfc3405493226218d22ee Mon Sep 17 00:00:00 2001 From: Andrey Kalinin Date: Tue, 30 May 2023 11:23:42 -0700 Subject: [PATCH] x64: brgemm convolution: fix postops kernel creation condition --- src/cpu/x64/jit_brgemm_conv.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/cpu/x64/jit_brgemm_conv.cpp b/src/cpu/x64/jit_brgemm_conv.cpp index 5c9c685153c..86e8cf5dcf9 100644 --- a/src/cpu/x64/jit_brgemm_conv.cpp +++ b/src/cpu/x64/jit_brgemm_conv.cpp @@ -654,10 +654,13 @@ status_t brgemm_convolution_fwd_t::init(engine_t *engine) { for_(int i_N = N_begin; i_N < N_end; i_N++) for (int i_M = M_begin; i_M < M_end; i_M++) { // init "init" and "po" kernels for cases then we never call brgemm kernels - // e.g. for d/h padded areas - const bool filter_in_padding = jcp.f_pad > EXT_KD - || jcp.back_pad > EXT_KD || jcp.t_pad > EXT_KH - || jcp.b_pad > EXT_KH; + // e.g. for d/h padded and dilated filter areas + const bool filter_in_padding = jcp.f_pad >= EXT_KD + || jcp.back_pad >= EXT_KD || jcp.t_pad >= EXT_KH + || jcp.b_pad >= EXT_KH; + // note: overly simplistic condition. Ideally, the condition would + // only detect cases where there is strictly no overlap between the + // input and filter. const bool dilate_no_overlap = jcp.dilate_d >= jcp.id || jcp.dilate_h >= jcp.ih; if (IMPLICATION(jcp.exec_type == exec_trans,