Repository navigation
Conversation
qu0b
requested review from
Ying1123,
hnyls2002,
merrymercy and
xiezhq-hermann
as code owners
October 12, 2026 11:14
4 of 5 tasks
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
With a nonzero prefill/decode interval, a completed cached or short prefill starts another full decode-only hold. At interval 64, an already-waiting request can therefore miss 64 scheduler admission opportunities even though no unfinished prompt chunk remains.
Add an opt-in policy to protect decoding between unfinished prompt chunks while allowing admission immediately after a completed prefill. The default remains unchanged.
Modifications
SGLANG_PDI_CHUNKED_ONLY=1arms the interval only whenbatch.chunked_reqis present; completing a prefill clears any remaining hold. Data-parallel attention always retains the synchronized fixed cadence, using the existing global extend flag. This adds no rank-local timers or collectives.Tests cover the default policy, completed/unfinished prefills, clearing a previous hold, decode/empty batches, and matching DP cadence on ranks with different local work. Developed with AI assistance.
Accuracy Tests
pytest -q test/registered/unit/managers/test_scheduler_prefill_decode_interval.py: 10 passed, 3 subtests passed, importing the current upstream scheduler. All pre-commit hooks pass on the three changed files.This changes admission timing, with no model-forward or kernel changes. A prior downstream serving validation passed its 10-case quality gate and concurrent long-prompt recall checks; that is supplementary evidence, not a full current-main serving qualification.
Speed Tests and Profiling
Prior controlled measurement of this same policy on a v0.6.0-based serving build, two RTX PRO 6000 Blackwell Max-Q GPUs at 300 W, concurrency 2, interval 64: 576 replay requests across four sequential arms. Median cached TTFT changed from 726 to 380 ms (-47.7%; session-bootstrap 95% interval -58.1% to -22.1%). Completion median changed from 989 to 1,054 ms (inconclusive); p90 TTFT was essentially unchanged at 976 versus 987 ms. Long-prefill overlap decode remained approximately 114 tokens/s. This is workload-specific evidence, not a general throughput claim or a measurement of current upstream main.
Paired CUPTI/Python traces on that build identified the mechanism: the fixed policy made zero prefill-admission calls in 25 observed scheduler decisions while GPUs continued decoding; chunk-only protection admitted a mixed batch. This motivated the narrow scheduler change.
The added CPU tests provide a deterministic reproduction of the admission behavior with synthetic batches. Request payloads and raw deployment traces are not part of this contribution.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #38241381224
Latest PR Test (Extra): ❌ Run #38241380867
Latest PR Test (AMD ROCm 10): ❌ Run #38241381443