Repository navigation
Conversation
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_hicache_pp_kl.py test/registered/e2e/models_large/test_inkling_nvfp4_nightly.py |
|
🚀 🚀 🚀 |
|
Closing this since #43479 landed first and fixes the same divergence. Just leaving this here for the record: the two PRs count differently. #43479 refreshes every 32
So under load, the call-based version behaves pretty much like refresh off, while counting forwards gets ~21 points more cache hit and ~7% more throughput. It only matters when things are backed up, but it might be worth a small follow-up at some point. |
Motivation
The waiting-prefix refresh from #41593 throttles on each rank's own
time.monotonic()(0.5 s). Ranks on opposite sides of the 0.5 s mark refresh on different calls, so their radix-tree LRU order, and later their evictions, diverge. This caused two failures:test_unified_radix_cache_hicache_pp_kl.py(TP2 + PP2, HiCache, 4-gpu-h100): the rank consensus checker caught PP0 evicting 27 tokens and PP1 48. Reproduced on 8x H200 with a per-rank refresh log: PP0 and PP1 disagreed at calls 93 and 94, and about 16 s later the checker fired with CI's exact tokens and hashes. Forcing PP1 never to refresh also trips the checker;SGLANG_ENABLE_WAITING_PREFIX_REFRESH=0ran clean 4/4.TestInklingSmallCacheConsistencyNightly(TP8, 8-gpu-b200) hung: it passed in the 10-07 nightly and hung on 10-09, the first nightly with [Scheduler] Refresh waiting requests' cached prefixes under FCFS-like policies with LRU eviction #41593. Reproduced on 8x B300 with a per-rank refresh log: ranks disagreed on 495 of 7561 calls while seeing the same queue length, starting before the test's jitter is on. The last disagreements split the ranks {TP1, TP5} vs the rest, the same split as the hang dump (12-request batch vs 1).Modifications
Scheduler.forward_ct, which is identical on every rank: at most one refresh per 32 forwards.forward_ct=Noneskips the refresh.@rank_consensusonUnifiedRadixCache.touch_prefix, so a divergence is reported at the touch itself.__init__; the decode-mode check stays per call because a PD role switch can change it. Two test files now publish the runtime context.Tests
HiCache PP file on 8x H200 with
SGLANG_ENABLE_RANK_CONSENSUS_CHECKER=1, no divergence in any run:Before the fix, 3 plain runs passed (the race is intermittent) and an instrumented run crashed.
Instrumented run with the fix (per-rank refresh log, 6/6 tests passed), compared with PP0 TP0:
Inkling nightly class only, 8x B300 (CI: B200), CI env:
One run with the fix logged every refresh: all 8 ranks agreed on all 9303 calls, with 32 / 32 / 822 forwards between refreshes (min / median / max).
Unit tests pass:
test_fcfs_waiting_prefix_refresh.py(3),unit/managers/test_schedule_policy.py(11),manual/test_schedule_policy.py(14),test_prefill_result_polling.py(20),test_prefill_adder.py(49).CI States
Latest PR Test (Base): 🚫 Run #38060589208
Latest PR Test (Extra): ❌ Run #38060589042
Latest PR Test (AMD ROCm 10): ❌ Run #38060589186