Skip to content

Commit 3112271

Browse files
authored
[XPU] log clean up for XPU platform (#20553)
Signed-off-by: yan <[email protected]>
1 parent 1fd471e commit 3112271

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

vllm/_custom_ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
logger = init_logger(__name__)
1515

16-
if not current_platform.is_tpu() and not current_platform.is_hpu():
16+
if not current_platform.is_tpu() and not current_platform.is_hpu()\
17+
and not current_platform.is_xpu():
1718
try:
1819
import vllm._C
1920
except ImportError as e:

vllm/platforms/xpu.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_attn_backend_cls(cls, selected_backend: _Backend, head_size: int,
3737
dtype: torch.dtype, kv_cache_dtype: Optional[str],
3838
block_size: int, use_v1: bool,
3939
use_mla: bool) -> str:
40-
if selected_backend != _Backend.IPEX:
40+
if selected_backend is not None and selected_backend != _Backend.IPEX:
4141
logger.info("Cannot use %s backend on XPU.", selected_backend)
4242
use_v1 = envs.VLLM_USE_V1
4343
if not use_v1:
@@ -133,8 +133,7 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
133133

134134
@classmethod
135135
def is_pin_memory_available(cls):
136-
logger.warning("Pin memory is not supported on XPU.")
137-
return False
136+
return True
138137

139138
@classmethod
140139
def get_current_memory_usage(cls,

0 commit comments

Comments
 (0)