Repository navigation
[Bugfix][AuxOutput] Send routed-experts block hashes only for computed or scheduled blocks - #62489
Merged
aoshen02 merged 4 commits intoOct 20, 2026
Merged
Conversation
aoshen02
requested review from
ApostaC,
WoosukKwon,
ZJY0516,
alexm-redhat,
heheda12345,
ivanium,
njhill,
orozery,
robertgshaw2-redhat and
ywang96
as code owners
October 19, 2026 14:54
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #95918 for commit |
Isotr0py
approved these changes
Oct 19, 2026
aoshen02
force-pushed
the
aux-output-scheduled-hashes
branch
from
October 19, 2026 15:46
6c2a485 to
11ecb60
Compare
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #95932 for commit |
…d or scheduled blocks Send a request's block hashes to the worker only for blocks whose KV is computed or scheduled. A prompt's hashes exist before its chunks run, so a chunked prefill pinned store objects that had no KV block. When those objects were still stored from an earlier turn, the pins could push the KV-sized store over capacity and make put() raise in the writer thread. Split from vllm-project#62044. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: faresobeid <111092724+faresobeid@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ao Shen <aoshen@inferact.ai>
aoshen02
force-pushed
the
aux-output-scheduled-hashes
branch
from
October 19, 2026 15:59
11ecb60 to
936b738
Compare
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #95936 for commit ℹ️ This PR is 2 commits behind upstream |
Start the hash-only and terminal-event test with one hash block, so that it reaches those bounds on main and does not depend on the scheduled-step bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ao Shen <aoshen@inferact.ai>
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #95941 for commit ℹ️ This PR is 2 commits behind upstream |
bantianyue
pushed a commit
to bantianyue/vllm
that referenced
this pull request
Oct 28, 2026
…d or scheduled blocks (vllm-project#62489) Signed-off-by: faresobeid <111092724+faresobeid@users.noreply.github.com> Signed-off-by: Ao Shen <aoshen@inferact.ai> Co-authored-by: faresobeid <111092724+faresobeid@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: vllm-agent <claw@inferact.ai>
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.
Purpose
Split from #62044 (by @faresobeid): only the scheduler-side hash fix. The store eviction fix is #62392.
The scheduler sent a request's block hashes to the worker as soon as they existed. A prompt's hashes all exist before its first chunk runs, so with chunked prefill the worker pinned one store object for every prompt block, including blocks whose KV had not been computed yet. When those objects were still stored from an earlier turn, the extra pins could push the KV-sized store over capacity and make
put()raiseBlockObjectStoreErrorin the writer thread.AuxOutputSchedulerConnectornow sends only the hashes of blocks covered bynum_computed_tokens + num_scheduled_tokens(ornum_computed_tokensfor hash-only updates and finished requests). It takes the hash block size from the scheduler to do that.As a side effect, when a request finishes and its last sampled token completes a block, that block's hash is no longer sent unless a step that computes that token is already in flight: otherwise the token's KV is never computed, so the worker held a reference to a key with no stored object.
Test Plan
test_routed_experts_hashes_follow_scheduled_tokensruns a 160-token prompt with a 64-token budget and 20 decode steps through the real scheduler, and checks the number of hashes sent after each step against fixed values: 4, 8 and 10 during prefill, then 11 once the decode tokens complete the next block.test_scheduler_connector_sends_only_computed_hashes_off_schedule(hash-only update, finish) schedules a request's first 4-token block, then lets a settled token complete a second hash block while only 7 tokens are computed. Neither a hash-only update nor the terminal event may send the second hash; the hash-only update sends it once the eighth token is computed.test_worker_does_not_pin_unscheduled_prompt_blocksdrives the scheduler connector and the worker with a 4-object store. A first request stores 4 prompt blocks and finishes. A second request with the same prompt runs its first 4-token chunk next to a request that stores a new block.Test Result
test_scheduler.pyandtests/distributed/aux_output_connectorpass (288 tests).main, with the new constructor argument removed from the tests, all new tests fail:[10, 10, ...] != [4, 8, ...]);BlockObjectStoreError: auxiliary output store cannot retain the requested batch: limit=4 objects, the writer-thread failure seen in production.test_scheduler_connector_sends_only_computed_hashes_off_schedule. The scheduler test cannot see the terminal-event bound, because its request finishes with 179 computed tokens and 11 complete hash blocks either way.🤖 Generated with Claude Code