Skip to content

Commit 2ede31e

Browse files
nivas-x86tprimak
authored andcommitted
x64: ip: fixup lower-bound to fix a regreesion
1 parent d712173 commit 2ede31e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/cpu/x64/jit_brgemm_inner_product_utils.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,10 @@ int get_os_block(const jit_brgemm_primitive_conf_t &jbgp, bool try_to_adjust,
117117
} else
118118
assert(!"unsupported case");
119119

120-
if (is_adjustment) max_os_block /= 2;
121-
int os_block = 1;
122-
if (min_os_block > 0 && max_os_block > 0)
123-
os_block = nstl::max(max_div(jbgp.os, max_os_block), min_os_block);
124-
if (os_block == 1) os_block = nstl::min(jbgp.os, max_os_block);
120+
if (is_adjustment) max_os_block = nstl::max(max_os_block / 2, 1);
121+
assert(min_os_block > 0 && max_os_block > 0);
122+
int os_block = max_div(jbgp.os, max_os_block);
123+
if (os_block < min_os_block) os_block = nstl::min(jbgp.os, max_os_block);
125124

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

0 commit comments

Comments
 (0)