MLA PS mode add metadata split reference code#2177
Merged
Conversation
bceedea to
3214a17
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the MLA persistent-mode test harness with a new reference path that can split KV work using generated MLA metadata and then reduce partial tiles back into the final output, enabling validation of “metadata split” behavior in PS/persistent decode mode.
Changes:
- Extend
ref_masked_attentionto support a configurable causal mask diagonal for split-chunk attention. - Add Torch reference implementations for KV-split extend (
torch_mla_extend_split_kv) and a Python reduction (torch_mla_reduce_v1), plus an end-to-end helper (torch_mla_split_kv_and_reduce). - Update decode tests to request logits from
mla_decode_fwdand compare split/reduced Torch reference results against the ASM path in persistent mode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3214a17 to
4fd018b
Compare
f84ea5d to
070569e
Compare
shengnxu
approved these changes
Mar 10, 2026
valarLip
pushed a commit
that referenced
this pull request
Mar 18, 2026
* mla ps add metadata split reference test code * fix test_mla_persistent.py * fix conflict * add 3buffer split kv ref code * add gfx condition * add test
AMD-yanfeiwang
pushed a commit
to AMD-yanfeiwang/aiter
that referenced
this pull request
Mar 18, 2026
* mla ps add metadata split reference test code * fix test_mla_persistent.py * fix conflict * add 3buffer split kv ref code * add gfx condition * add test
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.
Motivation
MLA PS mode add metadata split reference code
Technical Details
Test Plan
python3 op_tests/test_mla_persistent.py -c 512 -b 1 -n 16,4
Test Result
Submission Checklist