mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-14 06:34:58 +08:00
[XPU]avoid circular import during XPU init (#23017)
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
parent
1f83e7d849
commit
7caec10e7b
@ -7,7 +7,6 @@ from typing import TYPE_CHECKING, Optional
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
import vllm.envs as envs
|
import vllm.envs as envs
|
||||||
from vllm.config import CUDAGraphMode
|
|
||||||
from vllm.logger import init_logger
|
from vllm.logger import init_logger
|
||||||
from vllm.utils import DEFAULT_MAX_NUM_BATCHED_TOKENS
|
from vllm.utils import DEFAULT_MAX_NUM_BATCHED_TOKENS
|
||||||
|
|
||||||
@ -105,6 +104,8 @@ class XPUPlatform(Platform):
|
|||||||
and not cls.device_support_bf16():
|
and not cls.device_support_bf16():
|
||||||
model_config.dtype = torch.float16
|
model_config.dtype = torch.float16
|
||||||
|
|
||||||
|
# lazy import to avoid circular import
|
||||||
|
from vllm.config import CUDAGraphMode
|
||||||
compilation_config = vllm_config.compilation_config
|
compilation_config = vllm_config.compilation_config
|
||||||
if compilation_config.cudagraph_mode is None or \
|
if compilation_config.cudagraph_mode is None or \
|
||||||
compilation_config.cudagraph_mode.max_cudagraph_mode() \
|
compilation_config.cudagraph_mode.max_cudagraph_mode() \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user