Skip to content

Commit 7aebec7

Browse files
cpu: x64: brgemm: fix treat_A_as_plain for batch > 1
1 parent 9a7af99 commit 7aebec7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cpu/x64/matmul/brgemm_matmul_utils.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,9 @@ status_t init_brgemm_matmul_conf(cpu_isa_t isa, brgemm_matmul_conf_t &bgmmc,
13411341
const bool transposed_A = bm_conf_utils.check_is_transposed(bgmmc.src_tag);
13421342
// When M == 1 MatMul always considers A to be non-transposed even if A md
13431343
// was created using "ba" tag.
1344-
bgmmc.treat_A_as_plain = bgmmc.M == 1;
1344+
bgmmc.treat_A_as_plain = bgmmc.M == 1
1345+
&& IMPLICATION(bgmmc.batch != 1,
1346+
bm_conf_utils.check_is_plain(bgmmc.src_tag));
13451347
bgmmc.transposed_A = ((transposed_A && !bgmmc.treat_A_as_plain)
13461348
|| bgmmc.src_tag == adbc);
13471349
// For batched problems with plain A and C and fully broadcasted across B

0 commit comments

Comments
 (0)