From 4f4713f96e01ebc799125a670c0bca9a2ae7d59d Mon Sep 17 00:00:00 2001 From: Chaojun Zhang Date: Mon, 20 Apr 2026 13:04:39 +0800 Subject: [PATCH] [XPU] [torch.compile] Skipping CUDA graph memory estimation to avoid startup errors. (#39977) Signed-off-by: chaojun-zhang Co-authored-by: Kunshang Ji --- vllm/v1/worker/gpu_worker.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vllm/v1/worker/gpu_worker.py b/vllm/v1/worker/gpu_worker.py index 5381649f04..4a73eddcdb 100644 --- a/vllm/v1/worker/gpu_worker.py +++ b/vllm/v1/worker/gpu_worker.py @@ -374,10 +374,14 @@ class Worker(WorkerBase): ) # Profile CUDA graph memory if graphs will be captured. - # Skip on ROCm/HIP as graph pool handles and mem_get_info behave + # Skip on ROCm/HIP/XPU as graph pool handles and mem_get_info behave # differently and can produce incorrect/negative estimates. cudagraph_memory_estimate = 0 - if not self.model_config.enforce_eager and not current_platform.is_rocm(): + if ( + not current_platform.is_rocm() + and self.vllm_config.compilation_config.cudagraph_mode + != CUDAGraphMode.NONE + ): cudagraph_memory_estimate = self.model_runner.profile_cudagraph_memory() # Use the pre-cudagraph torch peak to avoid double-counting.