perf(flydsl): Kimi-K3 B1 route-sort + prepared-MoE handoff (stack) - #7
Closed
JohnQinAMD wants to merge 9 commits into
Closed
JohnQinAMD wants to merge 9 commits into
JohnQinAMD wants to merge 9 commits into
Conversation
Graph-captured callers may not have a useful runtime sequence length for automatic split-KV scheduling. Add a validated num_kv_splits override while preserving the existing automatic default and positional API compatibility. Cover policy validation and the Kimi-K3 TP8 bh16/BF16 shape across short-sequence split boundaries and 8K context. Assisted-by: OpenAI Codex Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
Add a narrow FlyDSL specialization for the 896-expert, top-16, single-group decode shape. Preserve AITER tie ordering and emit Opus-compatible metadata directly from the routing launch. Assisted-by: Codex Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
Add a narrow gfx950 FlyDSL projection for the production 1x7168 by 896x7168 BF16 router shape. Preserve the GateLinear BF16 output contract, isolate dispatch behind a named capability predicate, and leave unsupported shapes on their existing paths. Assisted-by: Codex Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
Register one validated BF16 x MXFP4 16-row FlyDSL variant and advance it with the producer 32-row sort-bucket stride. Select it only through the existing exact gfx950 Kimi-K3 B1 tuning row. The complete expert boundary improves from 20.70 us to 18.20 us across two independent processes, with 90/90 adversarial correctness cases passing. Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
Select the existing direct atomic weighted-reduction kernel through the exact gfx950 Kimi-K3 B1 tuning row. Larger batch rows and generic dispatch remain unchanged. The complete expert boundary improves from 20.70 us to 18.62 us across two independent processes, with 90/90 adversarial correctness cases passing. Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
Add a typed, fail-closed gfx950 B1 handoff that owns Kimi-K3 routing and feeds its prepared metadata directly into the existing MXFP4 expert stages. Support both production A8W4/interleaved and A16W4/separated layouts while preserving fallback outside the exact shape contract. The live A8W4 route-to-expert boundary improves from 41.83-42.01 us to 25.40-25.41 us (1.647-1.653x), with exact route IDs, 6.66e-8 routing-weight RRMSE, zero output RRMSE, and no duplicate route/sort launch. Assisted-by: Codex Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Owner
Author
|
Superseded by the reviewed, minimal PR decomposition: MLA split scheduling is now #20; prepared route/expert ownership and B1 stage policy are replaced by the single-owner persistent A8W4 boundary in #2; gate projection is #6; KDA decode + f_b is #16; and latent MoE tail is #17 (with FP8 follow-up #18). The corresponding vLLM ownership boundary is #10. Closing this conflicting 9-commit integration stack avoids duplicate kernel ownership and duplicate commits; its 60.909 tok/s endpoint result remains valid provenance for the composed features. |
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
Banked change #5 — the route-sort + AttnRes integration (the campaign's largest
single jump, +20.3% to 60.909 tok/s). This branch is a 9-commit stack, not a
single independent change:
The route-sort kernel (
2790dbfe9a) does FP32-logit conversion + correction bias459601b680consumes that metadata directly infused_moe_2stageswith no secondgrouped-top-k/sort. Route boundary 1.62x; replaced ~330 fragmented launches. The
paired AttnRes+RMSNorm (RES-1) change lives on the vLLM side.
Overlap / supersession (read before merge)
d1a3ef562d,15d1d1744f,95dfd13ee8,d4fb7ab2b4are re-createdcopies of the gate / KDA-decode / KDA-FB / tail changes that also ship as
their own independent PRs. Do not merge both without de-duplication.
removes the duplicate route ownership this stack introduces. A single integrated
1->7 chain must resolve this supersession (route-sort is retained; the separate
gate/stage tiles are absorbed by the persistent boundary) and be re-verified at
the endpoint. See perf_changelog.md "Stacked-integration blocker".
Provenance
Banked endpoint 60.909 tok/s via composed overlay image
(
route-attnres:candidate1). Independent-off-mainPR for review; not the finalintegration branch.
AI assistance (OpenAI Codex) was used; a human submitter must review every line
before merge.
Made with Cursor