Skip to content

Commit 0565af1

Browse files
add checks in trtllm gen fused moe module
Signed-off-by: Pamela <[email protected]>
1 parent 8b4adfa commit 0565af1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tensorrt_llm/_torch/modules/fused_moe/fused_moe_trtllm_gen.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from ...distributed.ops import reducescatter
66
from ...model_config import ModelConfig
7-
from ...utils import Fp4QuantizedTensor
7+
from ...utils import Fp4QuantizedTensor, get_sm_version
88
from .interface import MoE, MoEWeightLoadingMode
99
from .quantization import (DeepSeekFP8BlockScalesFusedMoEMethod,
1010
NVFP4TRTLLMGenFusedMoEMethod)
@@ -68,6 +68,11 @@ def __init__(
6868
weight_loading_mode=weight_loading_mode,
6969
)
7070

71+
sm_version = get_sm_version()
72+
if sm_version >= 120:
73+
raise NotImplementedError(
74+
"TRTLLMGenFusedMoE does not support SM120 and above.")
75+
7176
assert not self.smart_router, "Smart router is not supported in TRTLLMGenFusedMoE."
7277

7378
self.num_slots = self.num_experts

0 commit comments

Comments
 (0)