Skip to content

Commit f91ead3

Browse files
committed
avoid circular import
Signed-off-by: Kunshang Ji <[email protected]>
1 parent 8008fd3 commit f91ead3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vllm/platforms/xpu.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import torch
88

99
import vllm.envs as envs
10-
from vllm.config import CUDAGraphMode
1110
from vllm.logger import init_logger
1211
from vllm.utils import DEFAULT_MAX_NUM_BATCHED_TOKENS
1312

@@ -109,6 +108,8 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
109108
and not cls.device_support_bf16():
110109
model_config.dtype = torch.float16
111110

111+
# lazy import to avoid circular import
112+
from vllm.config import CUDAGraphMode
112113
compilation_config = vllm_config.compilation_config
113114
if compilation_config.cudagraph_mode is None or \
114115
compilation_config.cudagraph_mode.max_cudagraph_mode() \

0 commit comments

Comments
 (0)