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 4, 20:00 UTC
[xpu][rocm] Update `current_platform.supports_fp8()` for TritonExperts (#40132)
Signed-off-by: Hank <hcc.mayday@gmail.com>
Hank_ committed
Apr 22, 2026 at 19:39 UTC
a4905133f375ec721be441e7ec4a3f923daa28f3
3 files changed
+6
-19
vllm/model_executor/layers/fused_moe/fused_moe.py
+1
-18
@@ -1952,24 +1952,7 @@ class TritonExperts(mk.FusedMoEExpertsModular):
1952
weight_key: QuantKey | None,
1953
activation_key: QuantKey | None,
1954
) -> bool:
1955
- p = current_platform
1956
- if p.is_rocm():
1957
- from vllm.platforms.rocm import on_gfx9, on_gfx12x
1958
-
1959
- is_rocm_on_gfx9 = on_gfx9()
1960
- is_rocm_on_gfx12x = on_gfx12x()
1961
- else:
1962
- is_rocm_on_gfx9 = False
1963
- is_rocm_on_gfx12x = False
1964
-
1965
- device_supports_fp8 = (
1966
- is_rocm_on_gfx9
1967
- or is_rocm_on_gfx12x
1968
- or (p.is_cuda() and p.has_device_capability((8, 9)))
1969
- or p.is_xpu()
1970
- )
1971
-
1972
- if not device_supports_fp8:
1955
+ if not current_platform.supports_fp8():
1956
return (weight_key, activation_key) == (None, None)
1957
1958
SUPPORTED_W_A = [
vllm/platforms/rocm.py
+1
-1
@@ -800,7 +800,7 @@ class RocmPlatform(Platform):
800
801
@classmethod
802
def supports_fp8(cls) -> bool:
803
- return any(gfx in _GCN_ARCH for gfx in ["gfx94", "gfx95", "gfx12"])
803
+ return on_gfx9() or on_gfx12x()
804
805
@classmethod
806
def is_fp8_fnuz(cls) -> bool:
vllm/platforms/xpu.py
+4
@@ -323,6 +323,10 @@ class XPUPlatform(Platform):
323
)
324
return "vllm.distributed.device_communicators.xpu_communicator.XpuCommunicator" # noqa
325
326
+ @classmethod
327
+ def supports_fp8(cls) -> bool:
328
+ return True
329
+
330
@classmethod
331
def get_default_ir_op_priority(
332
cls, vllm_config: "VllmConfig"