Skip to content

[Codegen][CPU] Add RISC-V V bf16 vfwmaccbf16 inner_tiled MMA. - #25120

Merged
egebeysel merged 2 commits into
iree-org:mainfrom
TMahlatini:users/tmahlatini/inner-tiled-rvv-bf16
Nov 13, 2026
Merged

egebeysel merged 2 commits into
iree-org:mainfrom
TMahlatini:users/tmahlatini/inner-tiled-rvv-bf16

Conversation

@TMahlatini

Copy link
Copy Markdown
Contributor

Lower MMA_RISCV_V_VFWMACCBF16_*_F32_BF16 to llvm.riscv.vfwmaccbf16 (+zvfbfwma). N is vlen/8. Reuses lowerRiscvVFmaccLike. The spacemit X60 board I have does not advertise zvfbwma, so didn't collect performance numbers. The other dtypes are being tracked here: #24932

Correctness: a 64x64 ones matmul matched exactly under QEMU 8.1.2 (vlen=256, x-zvfbfwma). Lit covers VLEN 128/256/512 and the narrow-N tile.

Towards #24311

Assisted-by: Cursor

@TMahlatini

Copy link
Copy Markdown
Contributor Author

@egebeysel could you please take a look? thanks!

@TMahlatini
TMahlatini force-pushed the users/tmahlatini/inner-tiled-rvv-bf16 branch from 3397260 to fe91401 Compare November 5, 2026 21:49
@TMahlatini

Copy link
Copy Markdown
Contributor Author

Rebased to fix the failing runs

@egebeysel

Copy link
Copy Markdown
Contributor

I'll take a look tomorrow, sorry for the delay.

@egebeysel egebeysel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM % a few comments! Sorry for the delay.

Comment thread tests/e2e/matmul/CMakeLists.txt Resolved
TMahlatini and others added 2 commits November 13, 2026 14:52
Lower MMA_RISCV_V_VFWMACCBF16_*_F32_BF16 to llvm.riscv.vfwmaccbf16
(+zvfbfwma). N is vlen/8.

Towards iree-org#24311

Signed-off-by: Terence <[email protected]>
Co-authored-by: Cursor <[email protected]>
@TMahlatini
TMahlatini force-pushed the users/tmahlatini/inner-tiled-rvv-bf16 branch from fe91401 to d3f9863 Compare November 13, 2026 16:45
@TMahlatini

Copy link
Copy Markdown
Contributor Author

applied nits, should be ready to merge after ci run @egebeysel

@egebeysel
egebeysel enabled auto-merge (squash) November 13, 2026 17:01
@egebeysel
egebeysel merged commit 5332c68 into iree-org:main Nov 13, 2026
55 checks passed
@devtbi devtbi mentioned this pull request Nov 16, 2026
8 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants