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)],