Skip to content

Commit

Permalink
cpu: x64: brgconv: disable bwd_d brgemm for 2d/3d with small iw for f32
Browse files Browse the repository at this point in the history
  • Loading branch information
tczeszun authored and tprimak committed Dec 18, 2023
1 parent 84a8f57 commit ee3b12d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/cpu/x64/jit_brgemm_conv_bwd_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,13 @@ status_t init_jcp(jit_brgemm_conv_conf_t &jcp, cpu_isa_t isa,
&& jcp.iw >= 128;
if (is_small_shape || is_3d_small_oc) return status::unimplemented;

// TODO: optimize 2d/3d shapes with small iw for f32
const auto is_small_iw = jcp.iw < 64;
const auto is_2d_or_3d = jcp.ih > 1 || jcp.id > 1;
const bool is_f32
= utils::everyone_is(f32, jcp.src_dt, jcp.wei_dt, jcp.dst_dt);
if (is_f32 && is_small_iw && is_2d_or_3d) return status::unimplemented;

const bool is_signed_input = jcp.src_dt == s8;
jcp.s8s8_compensation_required = is_signed_input && !isa_has_s8s8(jcp.isa);
jcp.has_int8_vnni = isa_has_int8_vnni(jcp.isa);
Expand All @@ -1532,8 +1539,6 @@ status_t init_jcp(jit_brgemm_conv_conf_t &jcp, cpu_isa_t isa,
|| is_superset(jcp.isa, avx2_vnni_2)))
return status::unimplemented;

const bool is_f32
= utils::everyone_is(f32, jcp.src_dt, jcp.wei_dt, jcp.dst_dt);
if (!IMPLICATION(is_f32, one_of(isa, avx512_core, avx2)))
return status::unimplemented;

Expand Down

0 comments on commit ee3b12d

Please sign in to comment.