Repository navigation
[MHA] Test that a varlen attention sink does not take the v3 ASM kernel - #6893
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
The v3 ASM gate itself landed in ROCm#6906. This covers hdim 192, North Mini and Command A Plus GQA ratios, and a numeric check that the sink moves the output. Co-authored-by: Cursor <[email protected]>
6e1501a to
b4fdbcd
Compare
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
|
The kernel gate this originally shipped is already on What is left is extra coverage that #6906's hdim-128 dispatch spy does not have:
Local gfx942 MI300X: @shay-li77 could you take a look when you have a moment? |
|
Standard Tests: shards 0–4 and 6–7 passed (including Fork PRs cannot rerun (403). @shay-li77 could you Re-run failed jobs on https://github.com/ROCm/aiter/actions/runs/41524307182 (shard 5 only) and take a look at the extra coverage when you have a moment? |
|
Morning ping: shard 5 is still the infra fail (runner lost communication; no test log) on https://github.com/ROCm/aiter/actions/runs/41524307182 — needs Re-run failed jobs from someone with Actions admin (fork PRs cannot rerun). Shards 0–4 and 6–7 passed, including the new varlen sink tests on shard 7. @shay-li77 / TEAM_AITER — review + rerun when you can. Test-only follow-up; kernel gate already on |
|
Thanks for the follow-up, and sorry for the slow reply. The run you linked (41524307182) is no longer available (it returns 404), so shard 5 can't be re-run from there; a fresh CI run is needed. Could you merge the latest main into this branch yourself? Either the "Update branch" button on this PR or a local merge/rebase works, as long as the push comes from your side. Please don't wait for me to do it: main requires the last push to be approved by someone other than the person who pushed it, so if I update the branch, my own approval no longer counts and I can't approve and merge this for you. The branch is 396 commits behind, and several of them touch the dispatch your test asserts on (e.g. #7584, #6990, #8075), so a quick local re-run of op_tests/test_fmha_v3_varlen_sink_route.py after merging would be good. Once you push, CI will run again; if shard 5 hits the runner issue again, I'll re-run it, then review and merge. @jatseng-ai |
|
@jatseng-ai Following up on the Nov 18 comment: the CI records for the current head have been cleaned up, so the required checks no longer show. Could you merge the latest main into this branch to trigger a fresh CI run? |
Sync with upstream main to trigger a fresh CI run on ROCm#6893.
|
@aiter-bot review |
|
aiter-bot — queued behind 2 review(s); expect to start in about 45 min. The box reviews one PR at a time. |
Summary
mainas of #6906 (merged Oct 27). This branch is rebased onto currentmainand no longer retouchesaiter/ops/mha.py.#6906does not have: hdim 192, North Mini (32/4) and Command A Plus (32/2) GQA ratios, and a numeric check that a setsink_ptractually moves the output.Motivation
#6906spies dispatch on hdim 128 only. A later change could keep that spy green while hdim 192 or a GQA-ratio call still dropped the sink, or while CK was selected but ignoredsink_ptr. This test fails in those cases.Changes
op_tests/test_fmha_v3_varlen_sink_route.py: wrapfmha_v3_varlen_fwd/mha_varlen_fwd, assert the route, and compare against an fp32 reference that includes the sink.Performance (if applicable)
Not a kernel change. Dispatch with a set sink already goes to CK via
#6906.Testing
Documentation
Test-only follow-up to a gate that is already documented in
can_impl_fmha_v3_fwd.Dependencies
Breaking Changes
None
PR Self-Review
Reviewed revision
b4fdbcd
Behavior and intent
No runtime change versus current
main.#6906already routes a setsink_ptr/sink_sizeaway fromfmha_v3_varlen_fwd. This PR only adds a test that the original hotfix did not: hdim 192, two production GQA ratios, and a numeric sink vs no-sink check.Validation and unverified scope
pytest op_tests/test_fmha_v3_varlen_sink_route.py→ 12 passed.sink_sizewithoutsink_ptr(covered by#6906'stest_mha_varlen.pyspy).PR-specific question
What behavior would each changed op test fail on before this PR, and why is that coverage not already provided by an existing canonical test?
op_tests/test_mha_varlen.py::test_flash_attn_varlen_func_sink_bypasses_v3_asmonly spies hdim 128 dispatch. It would stay green if hdim 192 or a 32/4 or 32/2 GQA call still tookfmha_v3_varlen_fwd, and it would stay green if CK was selected but ignoredsink_ptr. This file fails on those cases by wrapping both launchers and comparing against an fp32 reference that includes the sink.Changed op tests
op_tests/test_fmha_v3_varlen_sink_route.pyis new.op_tests/test_mha_varlen.py::test_flash_attn_varlen_func_sink_bypasses_v3_asmalready spies hdim 128 dispatch. This file adds hdim 192, North Mini / Command A Plus GQA, and numeric correctness.