Implement MLA decode fwd nh128 a8w8 kernel with FlyDSL.#403
Open
Implement MLA decode fwd nh128 a8w8 kernel with FlyDSL.#403
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a FlyDSL implementation of an MLA decode forward kernel specialized for nhead=128 with FP8 Q/KV inputs and BF16 output, plus a Python launcher and a corresponding correctness/perf test driver.
Changes:
- Introduce
kn_mla_fwd_decode_m16x8_fp8_fp8FlyDSL kernel and JIT launcher for the nh=128 FP8/FP8 decode path. - Add a thin Python dispatcher (
flydsl_mla_fwd_decode) that flattens inputs/outputs and launches the specialized kernel. - Add a new MLA decode test/benchmark script with a PyTorch reference + aiter metadata/reduce integration.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| tests/kernels/test_mla_decode.py | New MLA decode reference + kernel launch driver (currently not pytest-integrated and has a couple runtime issues). |
| kernels/mla_fwd_decode_m16x8_fp8_fp8.py | New FlyDSL kernel implementation + JIT launcher for FP8/FP8 nh=128 decode. |
| kernels/mla_fwd_decode.py | Public Python launcher/dispatcher for the new specialized kernel. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
Align code style, type, IR usage with other kernels. Try to remove or reduce arith/std_arith and similar native mlir low level uses. |
Contributor
Author
Done |
d5b5369 to
ab46f7f
Compare
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.
ATT.