@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 9b87a579aa
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 18:30 UTC

[Misc][XPU] Use None as device capacity for XPU (#14932)

Signed-off-by: yan ma <yan.ma@intel.com>

Yan Ma committed Mar 17, 2025 at 16:22 UTC 9b87a579aaf82338d5304219350932abae9b19ac
1 file changed +5 -4
vllm/platforms/xpu.py
+5 -4
@@ -37,10 +37,11 @@ class XPUPlatform(Platform):
37 return "vllm.attention.backends.ipex_attn.IpexAttnBackend"
38
39 @staticmethod
40 - def get_device_capability(device_id: int = 0) -> DeviceCapability:
41 - major, minor, *_ = torch.xpu.get_device_capability(
42 - device_id)['version'].split('.')
43 - return DeviceCapability(major=int(major), minor=int(minor))
40 + def get_device_capability(
41 + device_id: int = 0) -> Optional[DeviceCapability]:
42 + # capacity format differs from cuda's and will cause unexpected
43 + # failure, so use None directly
44 + return None
45
46 @staticmethod
47 def get_device_name(device_id: int = 0) -> str: