perf(kimi3): fuse KDA decode core - #1086
Open
qedawkins wants to merge 1 commit into
Open
Conversation
Contributor
|
Hi @qedawkins please fix the conflicts thanks |
Fuse the single-token causal convolution and state update, KDA recurrent update, and gated RMSNorm in one GFX950 Gluon kernel. Keep the existing split implementation as the fallback for unsupported shapes and backends. Testing Plan: - Extend KDA recurrent tests with independent convolution, paged-state, padding, and gated-RMSNorm references. - Preserve coverage for the existing prefill, split decode, and NVIDIA dispatch paths. Graph replay median per layer, fused vs unfused: B2: 11.19 us vs 24.95 us B4: 11.78 us vs 28.08 us B8: 13.30 us vs 30.57 us B16: 15.25 us vs 34.23 us B32: 22.14 us vs 39.27 us 4K-input/1K-output wall throughput, fused vs main: B2: 71.75 vs 70.45 tok/s (+1.85%) B4: 137.80 vs 132.52 tok/s (+3.98%) B8: 203.06 vs 204.01 tok/s (-0.47%) B16: 312.63 vs 308.39 tok/s (+1.38%) B32: 499.72 vs 491.75 tok/s (+1.62%) Signed-off-by: Quinn Dawkins <quinn.dawkins@gmail.com>
qedawkins
force-pushed
the
users/qedawkins/kimi-k3-kda-fused-decode
branch
from
August 14, 2026 15:53
cee21f1 to
2e7b38a
Compare
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.
Summary
Fuse the single-token causal convolution and state update, KDA recurrent update, and gated RMSNorm in one GFX950 Gluon kernel. Keep the existing split implementation as the fallback for unsupported shapes and backends.
Testing Plan
Benchamark results from extracting and replaying the affected subgraph median per layer, fused vs unfused:
B2: 11.19 us vs 24.95 us
B4: 11.78 us vs 28.08 us
B8: 13.30 us vs 30.57 us
B16: 15.25 us vs 34.23 us
B32: 22.14 us vs 39.27 us
4K-input/1K-output wall throughput, fused vs main: B2: 71.75 vs 70.45 tok/s (+1.85%)
B4: 137.80 vs 132.52 tok/s (+3.98%)
B8: 203.06 vs 204.01 tok/s (-0.47%)
B16: 312.63 vs 308.39 tok/s (+1.38%)
B32: 499.72 vs 491.75 tok/s (+1.62%)