Skip to content

Commit

Permalink
x64: brgemm bwd_w ip: fix chunk's tail processing in reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
ankalinin committed Apr 17, 2023
1 parent 774deab commit b56a89e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cpu/x64/jit_brgemm_inner_product.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1669,8 +1669,10 @@ void brgemm_inner_product_bwd_weights_t<
const bool is_f32_out = jbgp.wei_dt == data_type::f32;
const int icb_scale = is_f32_out ? jbgp.ic_block / jbgp.simd_w : 1;

const int icb_work = ti->ic_c_work * jbgp.nb_ic_blocking;
const int ocb_work = ti->oc_c_work * jbgp.nb_oc_blocking;
const int icb_work = nstl::min(ti->ic_c_work * jbgp.nb_ic_blocking,
jbgp.nb_ic - ti->ic_c_start * jbgp.nb_ic_blocking);
const int ocb_work = nstl::min(ti->oc_c_work * jbgp.nb_oc_blocking,
jbgp.nb_oc - ti->oc_c_start * jbgp.nb_oc_blocking);
const int work = ocb_work * icb_work;

int os_chunks = utils::div_up(jbgp.nb_os, jbgp.nb_os_blocking);
Expand Down

0 comments on commit b56a89e

Please sign in to comment.