[KERNELS] Tuning for small batch mxfp4 matmuls with splitk#9980
Merged
aeng-openai merged 8 commits intoApr 9, 2026
Conversation
- get up to 5 stages for small batch matmuls with mxfp4 weights - tune the split k reduce as well - add a benchmark script for the reduce perf will probably get even better after integrating the shuffled mxfp4 weight layout as well
This reverts commit f06e5941c93e5e345cb93ea6d14e82b69557556c.
ThomasRaoux
approved these changes
Apr 9, 2026
plognjen
pushed a commit
to plognjen/triton
that referenced
this pull request
Apr 14, 2026
…ng#9980) In general splitk was disabled in the mlp matmuls since when it is ragged it is not trivial to statically choose the splitk factor (though it would be possible to do so dynamically) In the small batch, non-ragged case though, it is simple to allow split k. This PR does that and does some basic heuristic tuning for such cases as well as optimization to the splitk reduce itself. These changes exposed a bug in the smem accounting heuristics where we weren't counting smem needed to perform SWAP_XW. This change fixes that. Perf will probably get even better after integrating the shuffled mxfp4 weight layout from triton-lang#9698 as well
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.
In general splitk was disabled in the mlp matmuls since when it is ragged it is not trivial to statically choose the splitk factor (though it would be possible to do so dynamically)
In the small batch, non-ragged case though, it is simple to allow split k. This PR does that and does some basic heuristic tuning for such cases as well as optimization to the splitk reduce itself.
These changes exposed a bug in the smem accounting heuristics where we weren't counting smem needed to perform SWAP_XW. This change fixes that.
Perf will probably get even better after integrating the shuffled mxfp4 weight layout from #9698 as well