Repository navigation
[Triton/Gluon] Fused Gluon KDA decode path (950/1250) - #4584
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
|
Can you add perf numbers for a few shapes? Otherwise LGTM |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ded, & other optimizations
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Advisory review (static + hand-run; not a merge gate). Validation/Perf ran no GPU stage — reasons are on their lines below. Findings tagged Adds a gfx1250-only Gluon decode kernel for Kimi Delta Attention (per token S ← exp(g_t)·S, S ← S + β_t·k_t⊗(v_t − Sᵀk_t), o_t = Sᵀq_t) with paged per-token state slots, varlen, speculative decoding, cached (a,k,err) state updates, in-kernel gate/l2norm/sigmoid fusion, and opt-in TDM async-copy paths, behind a new standalone wrapper that nothing in aiter imports yet. Review (advisory): 🔴 HIGH RISK 🔴 [verified] aiter/ops/triton/attention/kda.py sets stride_indices_seq=1 for 1-D ssm_state_indices while the kernel indexes state_indices_ptr + i_nstride_indices_seq + t, which is only correct for N==1 — the docstring's "[N, T] (or flat)" invites flat tables, and the wrapper accepts a flat [NT] int32 table with N=2, T=2 (verified here by launching it), so sequence 1 reads its seed state from indices[1] — sequence 0's token-1 slot — instead of indices[2] and writes its snapshots into other sequences' slots, silently corrupting the pool with no error. Author must assert ndim==2 (or N==1 for 1-D, or derive the row stride from the sequence length) so the flat form either works or is rejected. |
Motivation
Decode KDA path with high perf
Test Plan
Unit tests, benchmark, e2e runs (accuracy & perf)
Test Result
All unit tests pass
benchmarks:

When not updating the state pool with every state we save a lot of runtime when the tokens and batch size grows:
Submission Checklist