[Hardware][XPU] using current_platform.is_xpu (#9605)

This commit is contained in:
Mengqing Cao
2024-10-23 08:28:21 +00:00
committed by GitHub
parent 51c24c9736
commit 2394962d70
6 changed files with 16 additions and 38 deletions
+2 -2
View File
@@ -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