Repository navigation
[Triton/Gluon] [GFX12] Add SPEC_DECODE mode to UA with tunned Qwen35 config - #7100
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🟡 Changes recommended
The new flag breaks existing positional backend calls, the speculative-decode 3D path is unreachable through dispatch, and the new query-indexing and padded-batch paths lack regression coverage.
3 open issues
What changed in this PR
Adds an equal-query-length mode to unified attention for speculative decoding on gfx1250, with tuned settings for Qwen35 workloads.
Changes:
- Adds
equal_seqlen_qand fixed-length query indexing to the gfx1250 Gluon kernels. - Adds BF16 tuning entries and query-count selection for 3D attention configs.
- Extends the benchmark with an equal-query-length flag and revises KV-cache block allocation.
| File | Description |
|---|---|
op_tests/op_benchmarks/triton/bench_unified_attention.py |
Adds the benchmark flag and revises cache-block setup. |
aiter/ops/triton/configs/gfx1250/gluon/attention/unified_attention/DEFAULT.json |
Adds query-dependent selection and BF16 tuning entries. |
aiter/ops/triton/attention/unified_attention.py |
Adds the public flag and speculative-decode launch parameters. |
aiter/ops/triton/_gluon_kernels/gfx1250/attention/unified_attention_3d.py |
Adds fixed-length query-block mapping and tracing keys. |
aiter/ops/triton/_gluon_kernels/gfx1250/attention/unified_attention_2d.py |
Adds fixed-length query-block mapping and an empty-KV guard. |
Review effort: Balanced
…config (#7100) #7100 (head 4833e50, open against main) applied to the Qwen branch: a SPEC_DECODE mode for the 2d and 3d unified-attention kernels, taken when the caller passes equal_seqlen_q (every sequence holds max_seqlen_q queries), which launches the exact query-block grid and drops the cu_seqlens_q search; tuned gfx1250 configs for head size >= 256 with up to 4 queries per sequence; and the benchmark's block table as a permutation.
NOT READY FOR HUMAN REVIEWPR 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 |
… and attn_3d routing Takes the current head of #7100 (3e1ced4) on top of the version already on this branch (864205b): the G axis (num_queries_per_kv) in the config lookup, with the P axis it sits beside on main; the TP4 (G = 4) bf16 entries for d 256 with 16- and 64-token KV blocks; and attn_3d entries steering use_2d_kernel through MAX_QUERY_ROWS_PER_CU (the short-query rows cap) and PREFILL_MAX_2D_PRGMS / PREFILL_MIN_KV / PREFILL_MIN_KV_PER_PRGM (the 3D split for prefill over a long cached prefix). The launchers drop those keys before launching. #7100's kernel files are not taken: their differences from this branch are main's, which this Triton cannot build. A short-query batch whose entry has no tuned rows cap (DEP4's 16 q / 2 kv heads) keeps this branch's exact-grid gate and split (c3bb8eb): #7100 would fall back to 8 rows per CU there, which sends a 96-sequence MTP-3 verify to the 2D kernel at about 2x the 3D kernel's time. Qwen3.5-35B-A3B DEP4 c2048 MTP-3, ATOM_USE_UNIFIED_ATTN=1 with 64-token blocks (with the 2D kernel's runtime block-table stride, next commits): decode attention 518 -> 336 us a call (6.4 -> 4.4 ms a step), prefill attention 57 ms a step against 63 ms for the FlyDSL FMHA plus its KV gather. Co-authored-by: ShaoChunLee <[email protected]>
…config (#7100) Co-authored-by: Satya Nikhil Kodukula <[email protected]>
…gluon-ua2d-mask-stale-v Keep the poisoned-V-tail test beside the spec-decode tests from ROCm#7100. Co-authored-by: Cursor <[email protected]>
…7958) * [Triton/Gluon] unified_attention: expose the gfx950 Gluon gate as gfx950_gluon_supported `_gfx950_gluon_supported` takes the private `_UAParams`, so a caller that decides something from the gate up front (ATOM's Kimi-K3 DSpark draft picks its q dtype by it) has to build all of `_UAParams` by hand, and every new required field breaks it (#7100, #7421). `gfx950_gluon_supported` takes only what the gate reads; `_gfx950_gluon_supported` delegates to it, so the gate keeps one definition and unified_attention's behaviour is unchanged. * [Triton/Gluon] unified_attention: shorten the gfx950_gluon_supported docstring A one-line summary, one entry per argument and the return value, as the Triton ops guidelines ask for a public function. * [Triton/Gluon] unified_attention: drop the gfx950_gluon_supported tests Review: the private gate delegates to the public function, so a test that compares the two cannot fail, and the rest tests plumbing.


No description provided.