Skip to content

Commit 1b3f107

Browse files
zifeitongmgoin
authored andcommitted
Fix torch version check for SM100 mxfp4 (vllm-project#22535)
Signed-off-by: Zifei Tong <[email protected]> Signed-off-by: mgoin <[email protected]> Co-authored-by: mgoin <[email protected]> Signed-off-by: Boyuan Feng <[email protected]>
1 parent d88a978 commit 1b3f107

File tree

1 file changed

+8
-6
lines changed
  • vllm/model_executor/layers/fused_moe

1 file changed

+8
-6
lines changed

vllm/model_executor/layers/fused_moe/layer.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,14 @@ def __init__(
741741

742742
# we padding globally so EP buffer allocation works
743743
if quant_config and quant_config.get_name() == "mxfp4":
744-
if not is_torch_equal_or_newer("2.8.0"):
745-
raise RuntimeError("Mxfp4 on hopper requires torch >= 2.8.0")
746-
if current_platform.is_device_capability(
747-
90) and not has_triton_kernels():
748-
raise NotImplementedError(
749-
"Triton kernels must be installed for mxfp4 on hopper")
744+
if not current_platform.is_device_capability(100):
745+
if not is_torch_equal_or_newer("2.8.0"):
746+
raise RuntimeError(
747+
"Mxfp4 on non-blackwell requires torch >= 2.8.0")
748+
if not has_triton_kernels():
749+
raise NotImplementedError(
750+
"triton_kernels must be installed for "
751+
"mxfp4 on non-blackwell")
750752
if (current_platform.is_rocm()
751753
or envs.VLLM_USE_FLASHINFER_MOE_MXFP4_MXFP8
752754
or envs.VLLM_USE_FLASHINFER_MOE_MXFP4_BF16):

0 commit comments

Comments
 (0)