[XPU] Re-add intel xpu on triton paths in diffusion platforms (#36654)
This commit is contained in:
@@ -31,7 +31,7 @@ _CUDA_LIKE = frozenset({"cuda", "hip"})
|
||||
|
||||
|
||||
def platform_key() -> str:
|
||||
"""Return the live device family: ``cuda``/``hip``/``npu``/``mps``/``musa``/``cpu``.
|
||||
"""Return the live device family: ``cuda``/``hip``/``npu``/``mps``/``musa``/``xpu``/``cpu``.
|
||||
|
||||
Deliberately *not* memoized: :func:`select_impl` calls it at module import
|
||||
time, and latching that first answer would freeze the choice before the
|
||||
@@ -40,7 +40,7 @@ def platform_key() -> str:
|
||||
"""
|
||||
from sglang.multimodal_gen.runtime.platforms import current_platform
|
||||
|
||||
for name in ("cuda", "hip", "npu", "mps", "musa"):
|
||||
for name in ("cuda", "hip", "npu", "mps", "musa", "xpu"):
|
||||
if getattr(current_platform, f"is_{name}")():
|
||||
return name
|
||||
return "cpu"
|
||||
|
||||
@@ -201,6 +201,7 @@ def resolve_current_platform_cls_qualname() -> str:
|
||||
"mps": "sglang.multimodal_gen.runtime.platforms.mps.MpsPlatform",
|
||||
"npu": "sglang.multimodal_gen.runtime.platforms.npu.NPUPlatformBase",
|
||||
"musa": "sglang.multimodal_gen.runtime.platforms.musa.MusaPlatform",
|
||||
"xpu": "sglang.multimodal_gen.runtime.platforms.xpu.XpuPlatform",
|
||||
}
|
||||
qualname = forced_map.get(forced_platform.lower())
|
||||
if qualname is None:
|
||||
|
||||
Reference in New Issue
Block a user