You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Config] gfx1250: grouped-MoE tiles for Kimi-K2 Thinking TP8 - #7456
Kimi-K2 Thinking MXFP4 at TP8 on gfx1250 (96-CU partitions) had no tuned grouped-MoE rows, so every
batch size ran the default tile, which is sized for large prefill batches. Decode MoE was the largest
single gap against gfx950 in our profiles.
Changes
Adds one model config file with 12 rows for the Kimi-K2 TP8 MoE shape (FP4 weights and activations):
Decode, 1 to 128 tokens: smaller M tiles and a wider stage-2 tile; 1.16x to 1.52x per MoE call.
Prefill, 256 to 4096 tokens: 1.05x to 1.15x.
2048 and 8192 tokens keep the default tile, which nothing in the sweep beat by 2% or more.
The file is picked up through the existing model_configs merge. No code changes.
Test Plan
Swept stage-1 and stage-2 tiles per token count on the production fused MoE path, against the
default tile.
End to end: SGLang TP8 server with this file, random 8k/1k, concurrency 4 to 64, plus GSM8K
(1319 questions, 5-shot) on the same server.
Test Result
Total token throughput, 8k/1k (tok/s):
Concurrency
Before
After
Change
4
3775
4211
+11.5%
8
5792
6706
+15.8%
16
8879
8894
+0.2%
32
11943
12435
+4.1%
64
14774
14882
+0.7%
Geomean +6.3%. Median inter-token latency drops 6 to 12% at every concurrency (8.27 to 7.27 ms at
concurrency 4).
GSM8K: 0.933 vs 0.935 before (within noise).
Testing
Unit tests added or updated
Performance benchmarks run
Tested on MI250X
Tested on MI300X
Documentation
Docstrings updated
User guide updated
Performance guide updated
No documentation change is needed, with the reason stated below
Kimi-K2 Thinking MXFP4 at TP8 on gfx1250 had no grouped-MoE row, so every batch used the default tile, which is sized for a large prefill. These 12 rows select a smaller stage-1 tile and a wider stage-2 tile for the TP8 shape. Decode tokens 1, 2, 4, 8, 16, 32, 64, and 128 are 1.16x to 1.52x per MoE call against that default (4 tokens: 48.65 µs to 31.91 µs). Prefill tokens 256, 512, 1024, and 4096 are 1.05x to 1.15x. Tokens 2048 and 8192 stay on the default tile; nothing in the sweep beat it by 2%.
Validation and unverified scope
Tile sweep on the production fused MoE path, gfx1250, 96 CUs per partition (MI450 DPX, ROCm 10.1). The us column is that measurement. End to end: SGLang TP8, --attention-backend aiter, random 8k/1k and 1k/1k, concurrency 4 to 64, plus GSM8K 1319 questions 5-shot on the same server. Results are the table above. Not run: MI250X, MI300X, expert-parallel, or a gfx1250 that reports 256 CUs. Standard PR CI does not build gfx1250, so these rows are not executed there.
PR-specific question
The rows are consumed only when every key matches: gfx=gfx1250, cu_num=96 (or any CU count, via the existing fallback, because no other row has this shape), token in {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 4096} after the usual power-of-two pad, model_dim=7168, inter_dim=256, expert=384, topk=8, ActivationType.Silu, bf16 activations, torch.float4_e2m1fn_x2 weights and activations, QuantType.per_1x32, ep_fused blank so both the plain and EP-scatter paths can use the tile. Expert-parallel lookup uses topk=-1 and a sharded expert count, so it does not hit these rows. A merge against current main finds zero duplicate shape keys, so every other model's row stays the one it selects today.
ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm
vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all
All standard extended tests (excludes ci:atom_full)
Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 7456 --add-label <label>
One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.
PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.
github-actionsBot
changed the title
[FlyDSL] [Config] gfx1250: grouped-MoE tiles for Kimi-K2 Thinking TP8
[Config] gfx1250: grouped-MoE tiles for Kimi-K2 Thinking TP8
Nov 6, 2026
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
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.
Motivation
Kimi-K2 Thinking MXFP4 at TP8 on gfx1250 (96-CU partitions) had no tuned grouped-MoE rows, so every
batch size ran the default tile, which is sized for large prefill batches. Decode MoE was the largest
single gap against gfx950 in our profiles.
Changes
Adds one model config file with 12 rows for the Kimi-K2 TP8 MoE shape (FP4 weights and activations):
The file is picked up through the existing model_configs merge. No code changes.
Test Plan
default tile.
(1319 questions, 5-shot) on the same server.
Test Result
Total token throughput, 8k/1k (tok/s):
Geomean +6.3%. Median inter-token latency drops 6 to 12% at every concurrency (8.27 to 7.27 ms at
concurrency 4).
GSM8K: 0.933 vs 0.935 before (within noise).
Testing
Documentation
Dependencies
Breaking Changes
PR Self-Review
Reviewed revision
dd04320
Behavior and intent
Kimi-K2 Thinking MXFP4 at TP8 on gfx1250 had no grouped-MoE row, so every batch used the default tile, which is sized for a large prefill. These 12 rows select a smaller stage-1 tile and a wider stage-2 tile for the TP8 shape. Decode tokens 1, 2, 4, 8, 16, 32, 64, and 128 are 1.16x to 1.52x per MoE call against that default (4 tokens: 48.65 µs to 31.91 µs). Prefill tokens 256, 512, 1024, and 4096 are 1.05x to 1.15x. Tokens 2048 and 8192 stay on the default tile; nothing in the sweep beat it by 2%.
Validation and unverified scope
Tile sweep on the production fused MoE path, gfx1250, 96 CUs per partition (MI450 DPX, ROCm 10.1). The us column is that measurement. End to end: SGLang TP8, --attention-backend aiter, random 8k/1k and 1k/1k, concurrency 4 to 64, plus GSM8K 1319 questions 5-shot on the same server. Results are the table above. Not run: MI250X, MI300X, expert-parallel, or a gfx1250 that reports 256 CUs. Standard PR CI does not build gfx1250, so these rows are not executed there.
PR-specific question
The rows are consumed only when every key matches: gfx=gfx1250, cu_num=96 (or any CU count, via the existing fallback, because no other row has this shape), token in {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 4096} after the usual power-of-two pad, model_dim=7168, inter_dim=256, expert=384, topk=8, ActivationType.Silu, bf16 activations, torch.float4_e2m1fn_x2 weights and activations, QuantType.per_1x32, ep_fused blank so both the plain and EP-scatter paths can use the tile. Expert-parallel lookup uses topk=-1 and a sharded expert count, so it does not hit these rows. A merge against current main finds zero duplicate shape keys, so every other model's row stays the one it selects today.
Changed op tests
None.