Repository navigation
Fix fused DeepSeek top-k capability fallback - #35347
Open
nv-tusharma wants to merge 5 commits into
Open
nv-tusharma wants to merge 5 commits into
nv-tusharma wants to merge 5 commits into
Conversation
Signed-off-by: Tushar Sharma <trsharm25@gmail.com>
Signed-off-by: Tushar Sharma <trsharm25@gmail.com>
nv-tusharma
marked this pull request as ready for review
August 18, 2026 15:29
nv-tusharma
requested review from
BBuf,
Edwardf0t1,
Fridge003,
HaiShaw,
Ying1123,
ch-wan,
ispobock and
merrymercy
as code owners
August 18, 2026 15:29
Author
|
/tag-and-rerun-ci |
Signed-off-by: Tushar Sharma <trsharm25@gmail.com>
This branch has not been deployed
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.
Motivation
SGLang currently selects FlashInfer's
fused_topk_deepseekbased on shape constraints without checking whether the active GPU architecture is supported by that kernel. On A10G (SM86), FlashInfer raisesBackendSupportedErrorduring DeepSeek grouped top-k routing instead of allowing SGLang to use its existing fallback.This was observed in the Dynamo nightly SGLang data-parallel test: https://github.com/ai-dynamo/dynamo/actions/runs/32114902544/job/95672470424
Modifications
is_compute_capability_supportedmetadata before selectingfused_topk_deepseek.Accuracy Tests
The numerical implementation is unchanged. Unsupported devices now use the existing SGLang fallback instead of entering a kernel that raises before producing output.
Speed Tests and Profiling
Not applicable. Supported devices retain the fused path; the added check is one device-capability lookup during top-k dispatch.
Validation
python3 -m compileall -q python/sglang/srt/layers/moe/topk.py test/registered/kernels/ops/moe/test_fused_topk_deepseek.pyChecklist
CI States
Latest PR Test (Base): ❌ Run #32763510057
Latest PR Test (Extra): ❌ Run #32763509769
Latest PR Test (AMD ROCm 7.2): ❌ Run #32763509983