Repository navigation
[fmoe][gemm][gfx950] Tune Kimi-K3 A4W4 configs - #4603
Closed
XiaobingSuper wants to merge 7 commits into
Closed
XiaobingSuper wants to merge 7 commits into
XiaobingSuper wants to merge 7 commits into
Conversation
Select the fastest correct implementation per shape and skip invalid K-wave combinations during v2 tuning. Co-authored-by: Cursor <[email protected]>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
Pull request overview
Retunes the Kimi-K3 A4W4 SiTUv2 MoE 2-stage kernel configurations on gfx950, selecting faster/correct v1 vs v2 implementations by token count while pruning invalid v2 stage-1 candidates.
Changes:
- Add a v2 stage-1 candidate filter to skip configs where
model_dimis not divisible bytile_k * k_wave. - Update the tuned Kimi-K3 A4W4 MoE CSV entries with new per-token winners (v2 favored up to 2048 tokens, v1 for larger shapes).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py | Adds a divisibility guard for v2 stage-1 kernel candidates to avoid incompatible tile_k/k_wave combinations. |
| aiter/configs/model_configs/kimik3_a4w4_tuned_fmoe.csv | Replaces gfx950 tuned rows with updated kernel selections and performance/error metadata for Kimi-K3 A4W4 MoE shapes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Cover the TP8 latent-router down/up projection shapes so serving avoids untuned fallback kernels. Co-authored-by: Cursor <[email protected]>
coderfeli
previously approved these changes
Aug 6, 2026
The new GEMM1/v2-layout combination regresses concurrency-16 vLLM throughput, while restoring the prior M16 pair recovers performance. Co-authored-by: Cursor <[email protected]>
Compare v1 and v2 candidates per shape on one GPU and avoid decode combinations that inflate full-graph memory or regress serving throughput. Co-authored-by: Cursor <[email protected]>
12 tasks
5 tasks done
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
tile_kResults
Test plan
ruff check csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.pyAITER_SITUV2_A4W4=1 AITER_FLYDSL_STAGE2_FP8=1 python3 op_tests/test_moe_2stage.py --no-legacy --csv-filter flydsl_moe --kernel --beta 4 --linear-beta 25python3 csrc/ck_gemm_a4w4_blockscale/gemm_a4w4_blockscale_tune.py --run_config <kimik3 tuned CSV>