@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 76c6e6da08
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 6, 23:00 UTC

[XPU] Support block fp8 moe by fallback to TritonExpert on XPU (#36458)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>

Kunshang Ji committed Mar 11, 2026 at 12:54 UTC 76c6e6da08dbe73c2ee0d92dabe01786b44845d2
2 files changed +10 -3
vllm/model_executor/layers/fused_moe/fused_moe.py
+5 -3
@@ -1940,7 +1940,7 @@ class TritonExperts(mk.FusedMoEExpertsModular):
1940
1941 @staticmethod
1942 def _supports_current_device() -> bool:
1943 - return current_platform.is_cuda_alike()
1943 + return current_platform.is_cuda_alike() or current_platform.is_xpu()
1944
1945 @staticmethod
1946 def _supports_no_act_and_mul() -> bool:
@@ -1959,8 +1959,10 @@ class TritonExperts(mk.FusedMoEExpertsModular):
1959 else:
1960 is_rocm_on_gfx9 = False
1961
1962 - device_supports_fp8 = is_rocm_on_gfx9 or (
1963 - p.is_cuda() and p.has_device_capability((8, 9))
1962 + device_supports_fp8 = (
1963 + is_rocm_on_gfx9
1964 + or (p.is_cuda() and p.has_device_capability((8, 9)))
1965 + or p.is_xpu()
1966 )
1967
1968 if not device_supports_fp8:
vllm/model_executor/layers/fused_moe/oracle/fp8.py
+5
@@ -94,6 +94,11 @@ def _get_priority_backends(
94 else:
95 _move_to_front(_AVAILABLE_BACKENDS, Fp8MoeBackend.TRITON)
96
97 + if current_platform.is_xpu():
98 + # XPU platform supports TritonExperts and XPUExpertsFp8,
99 + # move XPU backend to the front.
100 + _move_to_front(_AVAILABLE_BACKENDS, Fp8MoeBackend.XPU)
101 +
102 return _AVAILABLE_BACKENDS
103
104