Repository navigation
[PD] Improve optimistic prefill - #30951
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the optimistic prefill retry mechanism in the disaggregation scheduler, renaming retries to attempts and tracking attempt counts directly on the request object. The code review highlights two critical issues: first, an assert statement wrapping a function with side effects (finalize_bootstrap) that could be compiled out in optimized environments, along with a missing state update for pending_bootstrap; second, a double-increment bug on prefill_attempt_count that prematurely limits the number of allowed prefill attempts.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
4ced72d to
feae022
Compare
|
/tag-run-ci-label |
|
/rerun-group disagg |
|
⛔ Known groups: |
|
/rerun-group disaggregation |
|
Results for 🚀 🚀 🚀 🚀 🚀 🚀 🚀 |
|
https://github.com/sgl-project/sglang/actions/runs/29210654951/job/86699353345 |
- Document branch base (v0.5.16 tag fdebc93) and cherry-picked commits - List v0.5.16 new fixes (sgl-project#31075, sgl-project#30951) and already-in-base PRs - Add SGLang + PD Router Docker build commands with correct args
- README: sgl-project#31075/sgl-project#30951 already in old base (not v0.5.16 new); sgl-project#29421 is fork-only custom patch; add full list of v0.5.16 new fixes (GLM-5.2/ROCm/ spec-decoding/PD) verified via git merge-base --is-ancestor - values-1p1d-batch1.yaml: remove incompatible --enable-mixed-chunk and --enable-hierarchical-cache --hicache-ratio 2.0; update spec-num-steps 2->3; add num-continuous-decode-steps 2 and optimistic-prefill-attempts 1 to match actual pod YAMLs
Changes
retrytoattempt: counting total optimistic forward passes instead of requeue. Previously retry limit is 1 means the req has two forward opportunities before bootstrap finished.Fixes along the way.
#optimistic-reqper batch.CI States
Latest PR Test (Base): ❌ Run #29210525648
Latest PR Test (Extra): ❌ Run #29210525451