Repository navigation
feat(rocke): register D256 bf16 decode dispatcher candidate and tune segments - #9462
Conversation
…gfx942 num_segments
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
There was a problem hiding this comment.
Pull request overview
This PR enables a new specialized D256 bf16 decode attention dispatcher candidate (targeting gfx950/gfx942) and adjusts unified-attention tuning to improve/validate decode performance, along with accompanying wiring tests and updated benchmark/shape inputs.
Changes:
- Register a new
d256_decodeattention candidate in the dispatcher and add a shared cohort predicate for gating eligible decode problems. - Tune
_num_segmentsfor gfx942 decode so D256 can use the formula-derived segment count (avoiding an overly-low cap). - Expand/update parity scenarios and benchmark shape sets/results to include D256 bf16 decode coverage.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| dnn-providers/hip-kernel-provider/rocke/library/tests/dispatch/attention/test_d256_decode_wiring.py | Adds unit tests verifying candidate registration, gating, and routing to the new d256_decode path. |
| dnn-providers/hip-kernel-provider/rocke/library/kernels/common/attention_unified.py | Tunes _num_segments for gfx942 decode and introduces _d256_decode_cohort predicate. |
| dnn-providers/hip-kernel-provider/rocke/library/dispatch/attention.py | Registers the new attention_d256_decode candidate and wires selection/spec naming. |
| dnn-providers/hip-kernel-provider/rocke/library/builders/gfx950/attention/prefill/parity_unified_attention.py | Expands gfx950 parity scenarios to include more D256 bf16 decode seq_len pairs. |
| dnn-providers/hip-kernel-provider/rocke/library/builders/gfx942/attention/prefill/parity_unified_attention.py | Reworks gfx942 parity scenario selection to inline scenario generation and adds bf16 D256 decode shapes. |
| dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx950/attention/decode/decode_shapes.json | Adds Qwen3-Next-80B-A3B bf16 D256 decode benchmark shapes. |
| dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes.json | Adds Qwen3-Next-80B-A3B bf16 D256 decode benchmark shapes. |
| dnn-providers/hip-kernel-provider/rocke/library/benchmarks/gfx942/attention/decode/decode_shapes_perf.csv | Updates recorded perf sweep results (including new D256 bf16 entries). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
AnaghaRaoAMD
left a comment
There was a problem hiding this comment.
Please run parity_unified_attention.py --scenario on the bf16 D256 decode shapes on a real gfx942/gfx950 GPU and post the max_abs numbers — ideally with a larger input magnitude than uniform(-0.1, 0.1) so the absolute tolerance doesn't mask a relative error
AnaghaRaoAMD
left a comment
There was a problem hiding this comment.
follow-up: when PR#9496 lands the problem-driven prove_parity, the D256 decode cohort and the num_segments D256 branch should be added to that matrix — and if/when the C++ attention engine goes live, the d256_decode routing + segment logic will need a C++ mirror to stay in lockstep.
AnaghaRaoAMD
left a comment
There was a problem hiding this comment.
some nit comments. Overall, LGTM.
…2/attention/prefill/parity_unified_attention.py Co-authored-by: Anagha Rao <127366241+AnaghaRaoAMD@users.noreply.github.com>
Resolve dispatch/attention.py: keep BOTH D256 candidates — ours _make_gfx950_d256_candidate (prefill/2D) and develop's #9462 _make_d256_decode_candidate (decode/3D). Disjoint cohorts (2D vs 3D select_path), so both register and never collide at selection.
D256 bf16 decode dispatcher candidate enablement.
Motivation
Technical Details
Test Plan
run_test.py, wire test
Test Result
Passed.
Submission Checklist
JIRA ID: AICK-1496