perf(kimi3): tune small-batch latent projection - #1135
Conversation
Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
Project shared weights across M=1/2/4 while scheduling per-token AttnRes reductions, with an MFMA projection at M=4. Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
Use fused Gluon for M=1/2 and the composed MFMA path from M=3 through M=16. Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
6406405 to
3a351c3
Compare
c5a50e8 to
f36484c
Compare
|
Exact #1132 M=8 result on current main (
The isolated M=8 tail win does not transfer to full-round wall time here (about -0.11% throughput, effectively flat/slightly regressed). I do not plan to duplicate or extract this as a #1132 fix. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78a97e64da
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if ( | ||
| solution == "auto" | ||
| and Platform.get().is_cdna4 | ||
| and m <= 2 |
There was a problem hiding this comment.
Keep the one-row fused kernel restricted to M=1
When norm_weight is supplied for a two-row CDNA4 projection, this condition now dispatches to gluon_rmsnorm_linear_add_gfx950, but that kernel launches only over output columns and has no row index or row strides: it reads and writes only the first row. Consequently, the second row of the returned [2, 7168] tensor remains uninitialized. Either retain m == 1 here or extend the fused kernel to process both rows before enabling M=2.
Useful? React with 👍 / 👎.
Summary
Performance
Exact parent
c5a50e8f→ head6406405a, 4K/1K TP8/EP8 CUDA graphs, median of three:Isolated graph-captured normalized MoE output tail:
The standalone registered M=2/4 projection improves from 30.58/30.54 µs to 22.78/23.19 µs under graph replay.
Tests
Stack