diff --git a/python/sglang/srt/mem_cache/memory_pool_host.py b/python/sglang/srt/mem_cache/memory_pool_host.py index e5fd2da76..da8308f9c 100644 --- a/python/sglang/srt/mem_cache/memory_pool_host.py +++ b/python/sglang/srt/mem_cache/memory_pool_host.py @@ -1729,13 +1729,7 @@ class HostPoolGroup: return self.anchor_entry.host_pool.alloc(need_size) def free(self, indices: torch.Tensor) -> int: - n = self.anchor_entry.host_pool.free(indices) - for entry in self.entries: - if entry is self.anchor_entry: - continue - if getattr(entry, "share_indices_with_anchor", False): - entry.host_pool.free(indices) - return n + return self.anchor_entry.host_pool.free(indices) def get_data_page(self, index, flat: bool = True): return self.anchor_entry.host_pool.get_data_page(index, flat)