feat: SGLang decode slow_down for PD disagg nsys profiling (with skip-warmup workflow)#60
Open
zhengd-nv wants to merge 10 commits intoNVIDIA:mainfrom
Open
feat: SGLang decode slow_down for PD disagg nsys profiling (with skip-warmup workflow)#60zhengd-nv wants to merge 10 commits intoNVIDIA:mainfrom
zhengd-nv wants to merge 10 commits intoNVIDIA:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
=======================================
Coverage ? 70.38%
=======================================
Files ? 60
Lines ? 6571
Branches ? 0
=======================================
Hits ? 4625
Misses ? 1946
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Made-with: Cursor
# Conflicts: # src/srtctl/benchmarks/scripts/sa-bench/bench.sh # src/srtctl/cli/mixins/benchmark_stage.py
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.
PR description
Summary
Wires SGLang’s
/slow_downon decode worker leaders from job YAML so that, in PD disaggregated runs, the first decode forwards can be stretched in time while prefill catches up and decode batching builds. This is intended to line up nsysdecodestep windows with a saturated decode phase. This workflow is only applicable for sglang frontend (sglang-router).slow_downis designed to be used together with SA-Bench warmup disabled (num_warmup_mult: 0). The built-in benchmark warmup is skipped so decode step indices stay predictable. The usual “warmup” role is instead covered by a number of real decode forwards afterslow_downauto-clears and before the nsys capture window—those steps bring decode (e.g. cuda graphs, batching) to a steady state before profiling.Mapping
profiling.decode.start_step(example recipe)For the example workload, decode nsys capture is started at a step chosen so the window begins after:
oslsteps (1024 forosl: 1024);slow_downwindow — a small number of forwards while/slow_downis active (e.g. 4 steps in the example, tied to yourslow_down_*timing);slow_downwarmup — additional forwards after slow-down clears (e.g. 72 steps) so decode is “hot” before nsys.So in the example:
decode.start_step(1100) =bootstrap_steps(1024, =osl) +slow_down_steps(4) +warmup_steps(72).Tweak the three terms if you change
osl, concurrency, orslow_down_*, and setprofiling.decode.start_step/stop_stepaccordingly.User-facing changes
benchmark.slow_down_sleep_time+slow_down_wait_time(both set, SGLang frontend) → srtctl passes decode leader URLs to SA-Bench; seebenchmark_stage/bench.sh/benchmark_serving.py.bench.sh: optional skip warmup whenNUM_WARMUP_MULTis 0.recipes/.../1p1d-dep4-nsys-profile-slowdown.yamldocuments the skip-warmup + slow_down + step budget for nsys in the file header and next todecode.start_step/num_warmup_mult.