Skip to content

Commit

Permalink
cpu: x64: brgconv: add blocking eff threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
tczeszun authored and tprimak committed Mar 25, 2024
1 parent 1dd3c6a commit fbe5b97
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cpu/x64/jit_brgemm_conv_bwd_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,14 @@ void brg_blocking_t::iterate_ker_block(brg_blocking_t &best_brgb, int kd_block_,
update_blocks();

eff = est_eff();
if (eff > best_brgb.eff || best_brgb.eff == 0) best_brgb = *this;
// Minimum allowed blocking efficiency. Value was picked empirically.
// Currently threshold is enabled for f32 only, due to its perf being
// highly sensitive for inefficient blockings.
constexpr float min_eff = 0.00001f;
const bool is_f32 = utils::everyone_is(f32, src_dt, wei_dt, dst_dt);
if ((eff > best_brgb.eff || best_brgb.eff == 0)
&& IMPLICATION(is_f32, eff >= min_eff))
best_brgb = *this;
}
}

Expand Down

0 comments on commit fbe5b97

Please sign in to comment.