Skip to content

Commit

Permalink
src: cpu: dw: bwd_d: fixup stride_w
Browse files Browse the repository at this point in the history
  • Loading branch information
nivas-x86 authored and vpirogov committed Sep 5, 2019
1 parent a7c32ec commit d7484cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cpu/jit_uni_dw_convolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ void _jit_uni_dw_convolution_bwd_data_t<isa, diff_dst_type,
return par_conv;
};

const int aux_w
= nstl::min(jcp.iw, jcp.iw - jcp.kw + jcp.r_pad + jcp.stride_w);
const int chb_work = utils::div_up(jcp.nb_ch, jcp.nb_ch_blocking);
parallel_nd(jcp.mb, chb_work, jcp.ih,
[&](int n, int chb, int ih) {
Expand Down Expand Up @@ -233,8 +235,7 @@ void _jit_uni_dw_convolution_bwd_data_t<isa, diff_dst_type,
}

// main loop
ur_str_w = nstl::min((jcp.iw - jcp.kw + jcp.r_pad - iw)
/ jcp.stride_w, jcp.iw);
ur_str_w = (aux_w - iw) / jcp.stride_w;
if (ur_str_w > 0) {
jit_conv_call_s par_conv = kernel_params(ur_str_w, iw, oh,
ih, i_t_overflow, i_b_overflow,
Expand Down
6 changes: 6 additions & 0 deletions tests/benchdnn/inputs/test_conv_regression_general
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@ mb1_g2ic6oc16_ih5oh5kh1sh1dh0ph0_iw5ow5kw1sw1dw0pw0
--cfg=f32
mb1_g1_ic16oc16_kd1kh1kw1_id1ih2iw1_od1oh1ow1_sd1sh3sw1_pd0ph0pw0_dd0dh0dw0n"neg-padding(-1)"
mb1_g1_ic16oc16_kd1kh1kw1_id2ih2iw1_od1oh1ow1_sd3sh3sw1_pd0ph0pw0_dd0dh0dw0n"neg-padding(-1)"

# Depthwise with large right padding
--reset --dir=BWD_D
mb1_g3ic3oc3_ih10oh9kh2sh2dh0ph4
mb1_g16ic16oc16_ih5oh2kh2sh5ph0
mb1_g16ic16oc16_ih5oh2kh2sh3ph0

0 comments on commit d7484cb

Please sign in to comment.