feat(rocm): exotic-attention compositions (gated_attention/mla_decode/mla_decode_fused) — gfx1151 - #130
Merged
Conversation
…e/mla_decode_fused on gfx1151 The attention analog of the matmul-family lane — each op composes already-compiled kernels (the WMMA flash_attn kernel + the WMMA GEMM kernel for MLA's latent projections + an elementwise gate), no new MLIR pass: - gated_attention — flash_attn × elementwise sigmoid-gate - mla_decode — latent K/V projections (WMMA GEMM) + flash_attn - mla_decode_fused — down/up projections (c=x@w_dkv; K=c@w_uk; V=c@w_uv) + flash_attn Shared lane rocm_exotic_attn_compiled. f16/bf16, f32 softmax+accumulate. Validated on gfx1151 vs the numpy attention reference. The recurrent DeltaNet variants + block-sparse deepseek stay artifact_only with their technical blockers documented in ROCM_AUDIT (Decision #25 — not marked compiled). (Rebuilt clean onto post-#129 main; supersedes the original #127 branch which GitHub closed when its stacked base chain was deleted during the merge.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Replacement for #127 (GitHub closed the original when its stacked base chain was deleted during the merge). Rebuilt clean onto post-#129
main— identical content, basemain.The attention analog of the matmul-family lane — each op composes already-compiled kernels (the WMMA flash_attn kernel + the WMMA GEMM kernel for MLA's latent projections + an elementwise gate), no new MLIR pass:
gated_attentionflash_attn × sigmoid(gate)mla_decodeflash_attnmla_decode_fusedc=x@w_dkv; K=c@w_uk; V=c@w_uv(WMMA GEMM) →flash_attnShared lane
rocm_exotic_attn_compiled. f16/bf16, f32 softmax+accumulate. 20 tests pass on gfx1151 + AMD-wiring; mypy clean; 17 dashboards in sync.The recurrent DeltaNet variants (
gated_deltanet/kimi_delta_attention/modified_delta_attention) + block-sparsedeepseek_sparse_attentionstayartifact_onlywith their technical blockers documented in ROCM_AUDIT (Decision #25 — sequential-scan / sparse-gather kernels, not compositions).🤖 Generated with Claude Code