@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4f4713f96e
Fork 0

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 4, 23:45 UTC

[XPU] [torch.compile] Skipping CUDA graph memory estimation to avoid startup errors. (#39977)

Signed-off-by: chaojun-zhang <chaojun.zhang@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>

Chaojun Zhang committed Apr 20, 2026 at 13:04 UTC 4f4713f96e01ebc799125a670c0bca9a2ae7d59d
1 file changed +6 -2
vllm/v1/worker/gpu_worker.py
+6 -2
@@ -374,10 +374,14 @@ class Worker(WorkerBase):
374 )
375
376 # Profile CUDA graph memory if graphs will be captured.
377 - # Skip on ROCm/HIP as graph pool handles and mem_get_info behave
377 + # Skip on ROCm/HIP/XPU as graph pool handles and mem_get_info behave
378 # differently and can produce incorrect/negative estimates.
379 cudagraph_memory_estimate = 0
380 - if not self.model_config.enforce_eager and not current_platform.is_rocm():
380 + if (
381 + not current_platform.is_rocm()
382 + and self.vllm_config.compilation_config.cudagraph_mode
383 + != CUDAGraphMode.NONE
384 + ):
385 cudagraph_memory_estimate = self.model_runner.profile_cudagraph_memory()
386
387 # Use the pre-cudagraph torch peak to avoid double-counting.