Skip to content

Commit

Permalink
x64: matmul: bugfix copy B padding calculation
Browse files Browse the repository at this point in the history
(cherry picked from commit c4abad0)
  • Loading branch information
yair-obodovsky committed Jan 30, 2025
1 parent d00e508 commit 9b3abcd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cpu/x64/matmul/brgemm_matmul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,7 @@ struct brgemm_matmul_t<isa>::brg_matmul_exec_ctx_t {
bool packed_sparse_weights() const { return bgmmc_.packed_sparse_weights; }

int get_current_K_pad(int current_K_iters) const {
if (current_K_iters % bgmmc_.wei_k_blk == 0) return 0;
return bgmmc_.extendable_k ? bgmmc_.wei_k_blk
- rnd_up(
current_K_iters % bgmmc_.wei_k_blk, vnni_factor)
Expand Down
8 changes: 8 additions & 0 deletions tests/benchdnn/inputs/matmul/harness_matmul_regression_bf16
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@
--reset
--dt=bf16:bf16:bf16
2x1280:1280x65_n"parallel_reduction"

# Shape to better test k tail.
--reset
--dt=bf16:bf16:bf16
--stag=ab
--wtag=ab
--dtag=ab
8x2664:2664x256_n"k tails"

0 comments on commit 9b3abcd

Please sign in to comment.