feat(moe): Add is_act_and_mul=False support for Triton MoE kernels (#31645)

Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
Rabi Mishra
2026-01-08 10:27:09 +08:00
committed by GitHub
parent 0d7667419f
commit 25eef3dc2e
7 changed files with 191 additions and 9 deletions
@@ -603,9 +603,15 @@ class FusedMoE(CustomOp):
"is_act_and_mul=False is supported only for unquantized "
", ModelOpt FP8, and ModelOpt NvFp4 checkpoints"
)
if not current_platform.is_cuda():
# ROCm without AITER MoE uses Triton which supports
# is_act_and_mul=False via standard PyTorch ops (F.silu, F.gelu)
rocm_without_aiter_moe = (
current_platform.is_rocm() and not rocm_aiter_ops.is_fused_moe_enabled()
)
if not current_platform.is_cuda() and not rocm_without_aiter_moe:
raise NotImplementedError(
"is_act_and_mul=False is supported only for CUDA for now"
"is_act_and_mul=False is supported only for CUDA, or ROCm "
"(when AITER MoE is disabled) for now"
)
if self.enable_eplb and not self.quant_method.supports_eplb: