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 14, 05:30 UTC
[XPU]avoid circular import during XPU init (#23017)
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Kunshang Ji committed
Aug 16, 2025 at 13:16 UTC
7caec10e7b978853f8f87fe1d0cf77aa85066cdb
1 file changed
+2
-1
vllm/platforms/xpu.py
+2
-1
@@ -7,7 +7,6 @@ from typing import TYPE_CHECKING, Optional
7
import torch
8
9
import vllm.envs as envs
10
-from vllm.config import CUDAGraphMode
10
from vllm.logger import init_logger
11
from vllm.utils import DEFAULT_MAX_NUM_BATCHED_TOKENS
12
@@ -105,6 +104,8 @@ class XPUPlatform(Platform):
104
and not cls.device_support_bf16():
105
model_config.dtype = torch.float16
106
107
+ # lazy import to avoid circular import
108
+ from vllm.config import CUDAGraphMode
109
compilation_config = vllm_config.compilation_config
110
if compilation_config.cudagraph_mode is None or \
111
compilation_config.cudagraph_mode.max_cudagraph_mode() \