Skip to content

Commit 29032dd

Browse files
committed
Fix torch version check for mxfp4
Signed-off-by: Zifei Tong <[email protected]>
1 parent f0964e2 commit 29032dd

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

vllm/model_executor/layers/fused_moe/layer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -724,12 +724,12 @@ def __init__(
724724

725725
# we padding globally so EP buffer allocation works
726726
if quant_config and quant_config.get_name() == "mxfp4":
727-
if not is_torch_equal_or_newer("2.8.0"):
728-
raise RuntimeError("Mxfp4 on hopper requires torch >= 2.8.0")
729-
if current_platform.is_device_capability(
730-
90) and not has_triton_kernels():
731-
raise NotImplementedError(
732-
"Triton kernels must be installed for mxfp4 on hopper")
727+
if current_platform.is_device_capability(90):
728+
if not is_torch_equal_or_newer("2.8.0"):
729+
raise RuntimeError("Mxfp4 on hopper requires torch >= 2.8.0")
730+
if not has_triton_kernels():
731+
raise NotImplementedError(
732+
"Triton kernels must be installed for mxfp4 on hopper")
733733
if (current_platform.is_rocm()
734734
or envs.VLLM_USE_FLASHINFER_MOE_MXFP4_MXFP8
735735
or envs.VLLM_USE_FLASHINFER_MOE_MXFP4_BF16):

0 commit comments

Comments
 (0)