[Bugfix][CuMem] Make KV-cache wake cleanup tag-safe (#49857)

Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com> Co-authored-by: aoshen02 <aoshen02@users.noreply.github.com>

aoshen02 committed Jul 27, 2026 at 03:09 UTC 9e50e1037e268b4488bbd472bd5dfee4cc08bb75
1 file changed +3
vllm/device_allocator/cumem.py
+3
@@ -291,6 +291,9 @@ class CuMemAllocator:
291 back to GPU memory. If None, all memory allocation will be loaded
292 back to GPU memory.
293 """
294 + gc.collect()
295 + torch.accelerator.empty_cache()
296 +
297 for ptr, data in self.pointer_to_data.items():
298 if tags is None or data.tag in tags:
299 handle = data.handle