Bump FlashInfer to 0.6.15 and revert regressions (#31502)

Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
Mohammad Miadh Angkad
2026-07-17 00:50:12 -07:00
committed by GitHub
co-authored by Brayden Zhong
parent e835512303
commit d67aa05697
7 changed files with 20 additions and 15 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ ARG PIP_DEFAULT_INDEX
ARG UBUNTU_MIRROR ARG UBUNTU_MIRROR
ARG GITHUB_ARTIFACTORY=github.com ARG GITHUB_ARTIFACTORY=github.com
ARG INSTALL_FLASHINFER_JIT_CACHE=0 ARG INSTALL_FLASHINFER_JIT_CACHE=0
ARG FLASHINFER_VERSION=0.6.14 ARG FLASHINFER_VERSION=0.6.15
ARG MOONCAKE_VERSION=0.3.11.post1 ARG MOONCAKE_VERSION=0.3.11.post1
ARG MSCCLPP_VERSION=sglang-v0.9.1 ARG MSCCLPP_VERSION=sglang-v0.9.1
#if need other arg please add in MOONCAKE_COMPILE_ARG #if need other arg please add in MOONCAKE_COMPILE_ARG
+1 -1
View File
@@ -31,7 +31,7 @@ dependencies = [
"einops", "einops",
"fastapi", "fastapi",
"flash-attn-4==4.0.0b15", "flash-attn-4==4.0.0b15",
"flashinfer_python[cu13]==0.6.14", # keep it aligned with jit-cache version in Dockerfile "flashinfer_python[cu13]==0.6.15", # keep it aligned with jit-cache version in Dockerfile
"gguf", "gguf",
"humming-kernels[cu13]==0.1.10", "humming-kernels[cu13]==0.1.10",
"interegular", "interegular",
+1 -1
View File
@@ -1304,7 +1304,7 @@ def _set_envs_and_config(server_args: ServerArgs):
if server_args.attention_backend == "flashinfer": if server_args.attention_backend == "flashinfer":
assert_pkg_version( assert_pkg_version(
"flashinfer_python", "flashinfer_python",
"0.6.14", "0.6.15",
"Please uninstall the old version and " "Please uninstall the old version and "
"reinstall the latest version by following the instructions " "reinstall the latest version by following the instructions "
"at https://docs.flashinfer.ai/installation.html.", "at https://docs.flashinfer.ai/installation.html.",
@@ -222,6 +222,17 @@ def resolve_cutedsl_standard_scales(
return w1_alpha, fc2_input_scale, w2_alpha, used_input_scale return w1_alpha, fc2_input_scale, w2_alpha, used_input_scale
def _cutedsl_wrapper_activation_type(activation: str, activation_type_cls: Any) -> Any:
if activation == "silu":
return activation_type_cls.Swiglu
if activation == "relu2":
return activation_type_cls.Relu2
raise ValueError(
f"CuteDSL MoE wrapper supports 'silu' (gated) or 'relu2' (non-gated) "
f"activation, got {activation!r}."
)
def ensure_cutedsl_wrapper(layer: torch.nn.Module) -> None: def ensure_cutedsl_wrapper(layer: torch.nn.Module) -> None:
"""Lazily create CuteDslMoEWrapper and resolve scales on first forward. """Lazily create CuteDslMoEWrapper and resolve scales on first forward.
@@ -237,7 +248,7 @@ def ensure_cutedsl_wrapper(layer: torch.nn.Module) -> None:
return return
try: try:
from flashinfer import CuteDslMoEWrapper from flashinfer import ActivationType, CuteDslMoEWrapper
except ImportError as e: except ImportError as e:
raise ImportError( raise ImportError(
"flashinfer_cutedsl backend requires FlashInfer with CuteDSL support. " "flashinfer_cutedsl backend requires FlashInfer with CuteDSL support. "
@@ -284,7 +295,9 @@ def ensure_cutedsl_wrapper(layer: torch.nn.Module) -> None:
local_expert_offset=layer.moe_ep_rank * layer.num_local_experts, local_expert_offset=layer.moe_ep_rank * layer.num_local_experts,
output_dtype=layer.moe_runner_config.params_dtype, output_dtype=layer.moe_runner_config.params_dtype,
device=str(layer.w13_weight.device), device=str(layer.w13_weight.device),
activation=layer.moe_runner_config.activation, activation_type=_cutedsl_wrapper_activation_type(
layer.moe_runner_config.activation, ActivationType
),
) )
w1_alpha, fc2_input_scale, w2_alpha, used_input_scale = ( w1_alpha, fc2_input_scale, w2_alpha, used_input_scale = (
-8
View File
@@ -459,14 +459,6 @@ class MoEGate(nn.Module):
"quark", "quark",
): ):
correction_bias_dtype = torch.bfloat16 correction_bias_dtype = torch.bfloat16
# NOTE(kpham-sgl): flashinfer trtllm routing requires a bf16
# routing_bias; an fp32 bias yields NaN routing on exact ties.
# Mirror the fp8 path's cast.
if (
quant_config.get_name() == "modelopt_fp4"
and get_moe_runner_backend().is_flashinfer_trtllm()
):
correction_bias_dtype = torch.bfloat16
self.e_score_correction_bias = nn.Parameter( self.e_score_correction_bias = nn.Parameter(
torch.empty((config.n_routed_experts), dtype=correction_bias_dtype) torch.empty((config.n_routed_experts), dtype=correction_bias_dtype)
) )
+1 -1
View File
@@ -1907,7 +1907,7 @@ def check_pkg_version_at_least(pkg: str, min_version: str) -> bool:
Args: Args:
pkg: Package name (distribution name, e.g., "flashinfer-python") pkg: Package name (distribution name, e.g., "flashinfer-python")
min_version: Minimum version required (e.g., "0.6.14") min_version: Minimum version required (e.g., "0.6.15")
Returns: Returns:
True if package is installed and version >= min_version, False otherwise True if package is installed and version >= min_version, False otherwise
@@ -21,7 +21,7 @@ class TestGLM52NVFP4TPMTP(
model = "nvidia/GLM-5.2-NVFP4" model = "nvidia/GLM-5.2-NVFP4"
tp_size = 4 tp_size = 4
mem_fraction_static = 0.8 mem_fraction_static = 0.8
bs_1_speed_thres = 250 bs_1_speed_thres = 280
extra_server_args = [ extra_server_args = [
"--moe-runner-backend", "--moe-runner-backend",
"flashinfer_trtllm", "flashinfer_trtllm",