feat: support cutlass_moe_fp8 kernel for fusedmoe in sm90 (#8678)

This commit is contained in:
tql.99
2025-08-04 01:47:15 +08:00
committed by GitHub
parent 0242bb9c74
commit e67276ecb3
3 changed files with 32 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ from sglang.srt.layers.quantization.utils import (
per_tensor_dequantize,
requantize_with_max_scale,
)
from sglang.srt.layers.utils import is_sm100_supported
from sglang.srt.layers.utils import is_sm90_supported, is_sm100_supported
from sglang.srt.utils import (
cpu_has_amx_support,
get_bool_env_var,
@@ -619,7 +619,7 @@ class Fp8MoEMethod(FusedMoEMethodBase):
if (
get_bool_env_var("SGLANG_CUTLASS_MOE")
and self.cutlass_fp8_supported
and is_sm100_supported()
and (is_sm100_supported() or is_sm90_supported())
):
self.ab_strides1 = torch.full(
(num_experts,),
@@ -1034,7 +1034,7 @@ class Fp8MoEMethod(FusedMoEMethodBase):
get_bool_env_var("SGLANG_CUTLASS_MOE")
and self.cutlass_fp8_supported
and self.block_quant
and is_sm100_supported()
and (is_sm100_supported() or is_sm90_supported())
):
from sglang.srt.layers.moe.cutlass_moe import cutlass_fused_experts_fp8