feat(low_latency): support top-16 routing and hidden-dim 3584 (Kimi-K3) - #11
Merged
Fridge003 merged 1 commit intoAug 19, 2026
Conversation
The low_latency internode dispatch/combine kernels cap top-k at 11 and only template-specialize on a fixed set of a2a hidden dims. Two configs don't fit (both hit by Kimi-K3 — 896 experts, top-16, routed-expert hidden 3584): - top-16 routing trips EP_HOST_ASSERT(num_topk <= kNumMaxTopK) (dispatch) and the kNumMaxTopk equivalent (combine) -> raise both 11 -> 16. - routed-expert hidden 3584 falls through SWITCH_HIDDEN's default -> add case 3584 (satisfies the LL alignment invariants: %128, %256, and %512 for the combine kNumSendUnrolls=2 path).
Fridge003
pushed a commit
that referenced
this pull request
Aug 19, 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
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.
Problem
The low_latency internode dispatch/combine kernels cap top-k at 11 and only template-specialize on a fixed set of a2a hidden dims. Kimi-K3 (896 experts, top-16, routed-expert hidden 3584) doesn't fit:
EP_HOST_ASSERT(num_topk <= kNumMaxTopK)(dispatch) and thekNumMaxTopkequivalent (combine).SWITCH_HIDDEN's default → "Unsupported hidden". (This is the a2a hidden dim, not the modelhidden_size.)Change (+4/−2)
kNumMaxTopK/kNumMaxTopk11 → 16 (dispatch + combine).case 3584toSWITCH_HIDDEN— 3584 satisfies the LL alignment invariants (%128, %256 = 32·kNumElemsPerRead, %512 for the combine kNumSendUnrolls=2 path).Validation
mini-K3 (2 nodes, EP16,
--deepep-mode auto, cuda-graph ON): decode cuda-graph capture passesSWITCH_HIDDENand serves; greedy A/B vs the naive-a2a baseline agrees token-for-token into the low_latency decode region.Opened against this fork per the sglang team's request (sglang vendors
sgl-project/DeepEP:sgl-deepep); an equivalent PR is open againstdeepseek-ai/DeepEP(deepseek-ai#731).