Repository navigation
[DSpark] Fix EP1 decode performance regression - #34759
Merged
hnyls2002 merged 3 commits intoAug 14, 2026
Merged
Conversation
ormandj
requested review from
Qiaolin-Yu,
Ying1123,
hnyls2002 and
merrymercy
as code owners
August 13, 2026 18:20
Contributor
Author
…ken-allocation # Conflicts: # python/sglang/srt/speculative/dspark_components/dspark_draft.py
hnyls2002
approved these changes
Aug 13, 2026
Collaborator
|
/rerun-test test_basic_sanity_dspark.py test_dspark_dp_tier.py test_dspark_draft_path_default.py |
Contributor
|
Results for 🚀 🚀 |
This was referenced Aug 14, 2026
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 16, 2026
This was referenced Aug 17, 2026
Atituiset
pushed a commit
to Atituiset/sglang
that referenced
this pull request
Sep 10, 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.
Motivation
#33465 made
DraftBlockProposerconstruct a CUDAint32scalar on every speculative decoding step.num_token_non_paddedis only consumed whenenable_num_token_non_padded()is true. For MoE EP size 1, the predicate is false, so the device allocation is unused.Modifications
Noneinstead of constructing the device scalar when token padding is disabled.int32device scalar when token padding is enabled.Accuracy Tests
This does not change model arithmetic. The focused test verifies:
None.torch.int32dtype.Passed during the Linux image build:
The changed files also pass the repository-pinned Black, Ruff, and isort checks.
Speed Tests and Profiling
Hardware and workload:
All step times are milliseconds per scheduler step; lower is faster. The final column is the reduction from the after-#33465 control to the fixed build.
The post-fix capture used the same post-#33465 source stack, launch configuration, and fixed token inputs as the post-#33465 control, with only this patch added.
Every capture retained 127 complete target-plus-draft graph replay pairs. Graph kernel counts were identical between corresponding controls.
Checklist
Prepared with AI assistance.
CI States
Latest PR Test (Base): ❌ Run #31754996272
Latest PR Test (Extra): ❌ Run #31754996074