From 3fadc647935374ebff0db44058fb7c49844f95a1 Mon Sep 17 00:00:00 2001 From: Zhiqiang Xie Date: Wed, 2 Apr 2025 00:33:50 -0700 Subject: [PATCH] bug fix for hicache host eviction (#4989) --- python/sglang/srt/mem_cache/hiradix_cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/mem_cache/hiradix_cache.py b/python/sglang/srt/mem_cache/hiradix_cache.py index 61b52b505..5463d3d77 100644 --- a/python/sglang/srt/mem_cache/hiradix_cache.py +++ b/python/sglang/srt/mem_cache/hiradix_cache.py @@ -205,9 +205,9 @@ class HiRadixCache(RadixCache): # only evict the host value of evicted nodes if not x.evicted: continue - assert x.lock_ref == 0 and x.host_value is not None - assert self.cache_controller.evict_host(x.host_value) > 0 + num_evicted += self.cache_controller.evict_host(x.host_value) + for k, v in x.parent.children.items(): if v == x: break