[Hardware][XPU] using current_platform.is_xpu (#9605)
This commit is contained in:
@@ -7,7 +7,7 @@ import vllm.envs as envs
|
||||
from vllm.compilation.levels import CompilationLevel
|
||||
from vllm.logger import init_logger
|
||||
from vllm.platforms import current_platform
|
||||
from vllm.utils import is_hip, is_xpu, print_warning_once
|
||||
from vllm.utils import is_hip, print_warning_once
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
@@ -78,7 +78,7 @@ class CustomOp(nn.Module):
|
||||
return self.forward_cpu
|
||||
elif current_platform.is_tpu():
|
||||
return self.forward_tpu
|
||||
elif is_xpu():
|
||||
elif current_platform.is_xpu():
|
||||
return self.forward_xpu
|
||||
else:
|
||||
return self.forward_cuda
|
||||
|
||||
Reference in New Issue
Block a user