ARM SME2: Accelerate MatMul FP16#457
Merged
HenryNdubuaku merged 23 commits intocactus-compute:mainfrom Feb 28, 2026
Merged
Conversation
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
…/w checks Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
This reverts commit d8447f5. Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
…ains Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: Aarav Shah <[email protected]>
Signed-off-by: HenryNdubuaku <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements FP16 MatMul using ARM SME2 instructions
SME2 kernel is only selected if:
M >= 4(minimum SME2 tile size)Adds a separate compilation target for SME2
-march=armv9.2-a+sme2), different from the normal buildkernel_sme2.cppIntroduces CMake option
ENABLE_SME2AUTO(default): build SME2 only if supported by the compiler, else build normallyOFF: Force-disable SME2, build normallyExisting AMX/Neon implementations remain unchanged and serve as the fallback paths
Contributes to #299
Benchmark (M4, run with
cactus test --precision FP16)NEON vs SME2
AMX vs SME2
Further Work