Conversation
CyberSecurityErial
requested review from
ByronHsu,
Duyi-Wang,
HaiShaw,
ShangmingCai,
hnyls2002 and
sogalin
as code owners
August 29, 2026 11:57
Co-authored-by: Guanyi Chen <939416532@qq.com>
CyberSecurityErial
force-pushed
the
fix/decode-offload-request-generation
branch
from
August 29, 2026 14:24
7969778 to
5ae9913
Compare
Collaborator
|
/rerun-test registered/unit/disaggregation/test_specv2_kvcache_offloading.py registered/disaggregation/test_disaggregation_decode_offload.py |
Contributor
|
Results for 🚀 🚀 |
hnyls2002
approved these changes
Aug 30, 2026
kediwu0331
pushed a commit
to Zhylkaaa/sglang
that referenced
this pull request
Aug 30, 2026
…7026) Co-authored-by: Guanyi Chen <939416532@qq.com>
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
DecodeKVCacheOffloadManagertracks asynchronous D2H offload state by the caller-providedrid. A completed request is removed fromrid_to_statebefore its copy necessarily finishes, so a new request reusing the sameridcan inherit stale progress and be modified by a late callback from the old request.Reproduction
This reproduces deterministically without relying on GPU timing. It restores only the regression test onto the exact base commit, then runs that single test:
Expected result on the base commit:
The failure is at the second
offload_kv_cache(new_req)call:new_reqreuses the old request state because both requests have the samerid. The same test passes on this PR.Modifications
Reqinstance.ridonly for external identity and logging.ridwhile the first request's D2H copy is still pending.Accuracy Tests
Not applicable. This change does not modify the model forward path or model outputs.
The focused regression test passes:
Speed Tests and Profiling
Not applicable. This change only fixes asynchronous request bookkeeping and does not modify inference kernels or normal decode computation.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #33257511945
Latest PR Test (Extra): ❌ Run #33257511870
Latest PR Test (AMD ROCm 7.2): ❌ Run #33257511898