A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 6, 00:45 UTC
[Hardware][XPU] Align memory usage with cuda on xpu (#37029)
Signed-off-by: Kunshang Ji <jikunshang95@gmail.com> Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Kunshang Ji committed
Mar 25, 2026 at 18:14 UTC
e9ae3f80779711eef52fa40741ed15cc025fb784
1 file changed
+1
vllm/platforms/xpu.py
+1
@@ -236,6 +236,7 @@ class XPUPlatform(Platform):
236
def get_current_memory_usage(
237
cls, device: torch.types.Device | None = None
238
) -> float:
239
+ torch.xpu.empty_cache()
240
torch.xpu.reset_peak_memory_stats(device)
241
return torch.xpu.max_memory_allocated(device)
242