Skip to content

Commit

Permalink
x64: ip: fixup lower-bound to fix a regreesion
Browse files Browse the repository at this point in the history
  • Loading branch information
nivas-x86 authored and tprimak committed May 17, 2023
1 parent d712173 commit 2ede31e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/cpu/x64/jit_brgemm_inner_product_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ int get_os_block(const jit_brgemm_primitive_conf_t &jbgp, bool try_to_adjust,
} else
assert(!"unsupported case");

if (is_adjustment) max_os_block /= 2;
int os_block = 1;
if (min_os_block > 0 && max_os_block > 0)
os_block = nstl::max(max_div(jbgp.os, max_os_block), min_os_block);
if (os_block == 1) os_block = nstl::min(jbgp.os, max_os_block);
if (is_adjustment) max_os_block = nstl::max(max_os_block / 2, 1);
assert(min_os_block > 0 && max_os_block > 0);
int os_block = max_div(jbgp.os, max_os_block);
if (os_block < min_os_block) os_block = nstl::min(jbgp.os, max_os_block);

// Use large os-block to reduce bandwidth requirement.
if (jbgp.use_small_os_kernels) os_block = jbgp.os;
Expand Down

0 comments on commit 2ede31e

Please sign in to comment.