feat(hip-kernel-provider): KDA decode from the GDN decode emitter - #20
Open
AviralGoelAMD wants to merge 1 commit into
Open
AviralGoelAMD wants to merge 1 commit into
AviralGoelAMD wants to merge 1 commit into
Conversation
ISSUE ID : AICK-2240 Rebases the KDA decode work onto the completed GDN stack. The shared gfx950 decode emitter now supports scalar GDN and per-channel KDA gates; GDN keeps its batch-keyed routing and KDA uses its measured work-keyed tile table. Preserves the newer GDN pool, input-validation, untouched-page and tuner gates while adding KDA fused and benchmark-only precomputed-decay modes.
AviralGoelAMD
force-pushed
the
users/avirgoel/rocke/kda-decode-gfx950
branch
from
September 17, 2026 16:36
118b2e5 to
096ed04
Compare
AviralGoelAMD
changed the base branch from
users/avirgoel/rocke/gdn-decode-tier1
to
users/avirgoel/rocke/gdn-prefill
September 17, 2026 16:37
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.
ISSUE ID : AICK-2240
What this adds
Adds KDA decode on gfx950 through the existing GDN decode emitter. rocKE already had KDA prefill, but no KDA path for the single-token decode step used during generation.
The scope is D128 decode. gfx942 support and surrounding conv1d/RMSNorm fusion remain separate follow-ups.
What changed
library/kernels/gfx950/gdn_decode.pygate_kind, while retaining scalar GDN decay.library/builders/gfx950/gdn/{gdn_decode,tune}.pylibrary/dispatch/gdn/{common,gfx950}.pygate_kind, keeps separate GDN/KDA tile tables, and prevents cross-kind cache or routing collisions.library/tests/+ golden fixturework = batch × num_v_headsbecause its table was measured across head-count geometries.Why it works
GDN and KDA share the same recurrent decode update; only the forget gate differs. GDN applies one scalar decay per head, while KDA applies one decay per key channel. The emitter loads each KDA decay value once per channel chunk and reuses it across state rows, so the recurrence, paged state handling, and output path stay shared instead of being copied into a second kernel.
How we validated
Validation ran on dependency-complete snapshot
bd12bb8d0d5on real gfx950 with zero skips. Its 20 PR file blobs are byte-identical to live PR head096ed04140c:1.53e-4; full-state-pool2.69e-3; tolerance1e-2The first rebase run caught a host validation conflict that rejected valid KDA gate buffers after their mode-specific checks. The corrected path is pinned by a regression test that fails when the duplicate scalar-GDN check is restored.
Notes
rocke_enginewas unavailable, so this makes no C++ execution claim.