Skip to content

Commit 36f355e

Browse files
nivas-x86vpirogov
authored andcommitted
x64: matmul: fixup: parallel_k_reduction is not supported for batched matmul
1 parent b76d4ca commit 36f355e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cpu/x64/matmul/brgemm_matmul_utils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,8 @@ float compute_blocking_heuristic_avx512(brgemm_matmul_conf_t &bgmmc,
705705
}
706706

707707
// Parallelize across K for shapes with big 'K' dimension
708-
bool bwd_w_par_k_blk = bm_conf_utils.check_is_transposed(bgmmc.src_tag)
708+
bool bwd_w_par_k_blk = bgmmc.batch == 1
709+
&& bm_conf_utils.check_is_transposed(bgmmc.src_tag)
709710
&& IMPLICATION(bm_conf_utils.is_bf16(), math::is_pow2(matmul.K))
710711
&& matmul.K >= 2048;
711712
if (bwd_w_par_k_blk) {

0 commit comments

Comments
 (0)