diff --git a/vllm/platforms/xpu.py b/vllm/platforms/xpu.py index 3bb76425e..3d2c2cca1 100644 --- a/vllm/platforms/xpu.py +++ b/vllm/platforms/xpu.py @@ -236,6 +236,7 @@ class XPUPlatform(Platform): def get_current_memory_usage( cls, device: torch.types.Device | None = None ) -> float: + torch.xpu.empty_cache() torch.xpu.reset_peak_memory_stats(device) return torch.xpu.max_memory_allocated(device)