Repository navigation
[HiCache][PD] fix: keep decode load-back polling out of rank-local collectives - #41393
Merged
ispobock merged 5 commits intoOct 1, 2026
Merged
Conversation
alphabetc1
requested review from
ByronHsu,
Duyi-Wang,
HaiShaw,
ShangmingCai,
Ying1123,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
sogalin,
xiezhq-hermann and
yizhang2077
as code owners
September 27, 2026 04:54
This was referenced Sep 29, 2026
ispobock
approved these changes
Sep 30, 2026
4 of 5 tasks
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
PD decode with
--disaggregation-decode-enable-radix-cache --enable-hierarchical-cacheand TP > 1 crashes on the first L2 load-backs._process_hicache_local_restoresenters TP collectives based on each rank's own CUDA event:is_load_back_event_doneranloading_check()(a TPall_reduce) only on ranks whose event had fired.producer_index + 1event, so the sameall_reduce, plusinit_load_back/start_loading, ran on a subset of ranks.On Qwen3-8B, prefill TP1 + decode TP2, the decode scheduler dies with:
With
SGLANG_ENABLE_RANK_CONSENSUS_CHECKER=1and probes on this path's collective entries (see Reproduction), the first divergence is:TP0 entered from Phase A and TP1 from Phase B. The two same-shape
all_reduces pair silently; the gloo crash is the next, differently sized collective. #29483 covered only Phase A, on the removedhiradix_cache.py.Modifications
is_load_back_event_doneonly polls the local event. Load acks are already reaped in lockstep bycheck_hicache_events, and a rank-local READY is harmless because the gated KV poll is MIN-reduced.has_free_load_back_slot():len(ack_load_queue) < num_counters. The queue grows instart_loadingand shrinks by a MIN-reduced count, so all ranks agree, with no new collective. A reaped ack was synchronized, so the reused slot's events are done. A slot is reused at most one step later.Reproduction
repro.py, sitecustomize.py, commands
Without
REPRO_PROBESthe checker does not catch it:loading_checkandpoll_and_all_reducecarry no@rank_consensus, so the gloo abort comes first.Accuracy Tests
4xH200, 8 rounds per run, rounds 1-7 served entirely from L2 (
sglang:load_back_tokens_total= 72,000 per rank per round):Found rank divergenceaboveA temporary 2-rank Gloo test with rank-divergent events failed on main and when either Phase A or Phase B was reverted alone, and passed with this PR (not kept in the diff).
Checklist
CI States
Latest PR Test (Base): ✅ Run #36712962654
Latest PR Test (Extra): 🚫 Run #36712962296
Latest PR Test (AMD ROCm 10): ❌ Run #36712962617