[perf] support return_routed_experts with overlap scheduling#22911
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
Author
|
/rerun-test test/registered/rl/test_return_routed_experts.py |
Contributor
|
✅ |
Collaborator
Author
|
/tag-and-rerun-ci |
zyzshishui
approved these changes
Apr 21, 2026
Collaborator
Author
|
/rerun-test test/registered/rl/test_return_routed_experts.py |
Contributor
|
✅ |
hnyls2002
approved these changes
Apr 21, 2026
zhangying098
pushed a commit
to zhangying098/sglang
that referenced
this pull request
Apr 23, 2026
…ject#22911) Co-authored-by: Yuzhen Zhou <82826991+zyzshishui@users.noreply.github.com>
3 tasks
ByronHsu
pushed a commit
that referenced
this pull request
Apr 27, 2026
Cherry-pick of upstream PR #22911 (commit c560326) onto sglang-miles. Adds a `RoutedExpertsOutput` dataclass and `no_copy_to_cpu` path so the routed-experts capture can defer the device-to-host copy until after the forward stream's `copy_done` event, allowing overlap scheduling to keep the GPU busy. Result is plumbed through `GenerationBatchResult`, `TpModelWorker`, and both EAGLE v2 spec workers; the scheduler output processor finalizes the host-side write after `copy_done.synchronize()`. Conflicts in `routed_experts_capturer.py` and `model_runner.py` were resolved to keep miles-side changes on top of upstream's `_get_local_range` / `no_copy_to_cpu` refactor: - draft-worker guard around `on_forward_end` - `bs * num_tokens_per_bs` cuda_graph token-count fix for spec decoding - DeepEP all-gather path (skip DP-rank slicing when DeepEP is on) Verified on H200 TP=4 Qwen3-30B-A3B (batch=64, in=1024, out=512): output throughput 7453.48 -> 8609.21 tok/s (+15.5%). Router replay accuracy test (test_return_routed_experts) passes 3/3 with 0 mismatches across ~26.7M expert IDs. Co-authored-by: Yuzhen Zhou <82826991+zyzshishui@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 27, 2026
ByronHsu
added a commit
that referenced
this pull request
Apr 28, 2026
… scheduling (#23860) Co-authored-by: Qiaolin Yu <liin1211@outlook.com> Co-authored-by: Yuzhen Zhou <82826991+zyzshishui@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
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
Before,
After,
Modifications
Accuracy Tests
Speed Tests and Profiling
h200
before this pr,
Output token throughput (tok/s): 172.58
after this pr,
Output token throughput (tok/s): 260.37
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci