HiCache: avoid unnecessary all-reduce in check_prefetch_progress (#36425)

This commit is contained in:
Chao Shi
2026-08-29 00:52:53 +08:00
committed by GitHub
parent 23cb11ae01
commit 8e04f66a70
2 changed files with 21 additions and 15 deletions
@@ -7626,7 +7626,7 @@ class TestPrefetchCommitOrdering(CustomTestCase):
cache._check_hybrid_prefetch_result.return_value = 8
cache.cache_controller.prefetch_tokens_occupied = 100
cache.prefetch_loaded_tokens_by_reqid = {}
cache.can_terminate_prefetch.return_value = True
cache._can_terminate_prefetch.return_value = True
cache.pp_rank = 0
order = mock.MagicMock()
@@ -7799,7 +7799,7 @@ class TestUnifiedRadixPrefetchCorruption(CustomTestCase):
operation.hash_value = hashes
with (
mock.patch.object(cache, "can_terminate_prefetch", return_value=True),
mock.patch.object(cache, "_can_terminate_prefetch", return_value=True),
# Isolate the drop-release branch under test from the hybrid-sync
# step: treat the whole fetched prefix as usable so the insert runs.
mock.patch.object(