From 991689fd0d50f2de3bfbcda3323efa499a7305c7 Mon Sep 17 00:00:00 2001 From: LJL36 <41277042+LJL36@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:17:36 +0800 Subject: [PATCH] fix(hiradix): wait for extra pool IO (#27550) Co-authored-by: Zhangheng --- python/sglang/srt/mem_cache/hiradix_cache.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/sglang/srt/mem_cache/hiradix_cache.py b/python/sglang/srt/mem_cache/hiradix_cache.py index 353a02ee0..463731f00 100644 --- a/python/sglang/srt/mem_cache/hiradix_cache.py +++ b/python/sglang/srt/mem_cache/hiradix_cache.py @@ -1342,6 +1342,13 @@ class HiRadixCache(RadixCache): # unknown prefetch stop policy, just return True return True + if ( + completed + and getattr(operation, "pool_transfers", None) + and not getattr(operation, "pool_transfers_done", True) + ): + can_terminate = False + operation_terminated = operation.is_terminated() states = torch.tensor( [1 - int(can_terminate), int(operation_terminated)],