flashinfer.fused_moe.cute_dsl.cute_dsl_fused_moe_nvfp4¶
- flashinfer.fused_moe.cute_dsl.cute_dsl_fused_moe_nvfp4(x: ~torch.Tensor, x_sf: ~torch.Tensor | None, token_selected_experts: ~torch.Tensor, token_final_scales: ~torch.Tensor, w1_weight: ~torch.Tensor, w1_weight_sf: ~torch.Tensor, w1_alpha: ~torch.Tensor, fc2_input_scale: ~torch.Tensor | None, w2_weight: ~torch.Tensor, w2_weight_sf: ~torch.Tensor, w2_alpha: ~torch.Tensor, num_experts: int, top_k: int, num_local_experts: int | None = None, local_expert_offset: int = 0, output_dtype: ~torch.dtype = torch.bfloat16, use_fused_finalize: bool = True, moe_output: ~torch.Tensor | None = None, aux_stream: ~torch.cuda.streams.Stream | None = None, enable_pdl: bool = True, activation_type: int = 3, swiglu_alpha: float = 1.0, swiglu_beta: float = 0.0, swiglu_limit: float = 3.4028234663852886e+38, situ_beta: float | None = None, situ_linear_beta: float | None = None, *, quant_mode: str = 'w4a4', per_token_scale: ~torch.Tensor | None = None, localized_weights: list | None = None, localized_streams: list | None = None, localized_sm_count: int | None = None, localized_memset_stream: ~torch.cuda.streams.Stream | None = None, localized_allow_nonlocalized: bool = False, autotune_use_cuda_graph: bool = False, nvfp4_4over6: ~flashinfer.quantization.nvfp4_quantization_utils.NVFP44Over6Config | None = <nvfp4_4over6 unset: read FLASHINFER_NVFP4_4OVER6*>) Tensor¶
Run a fused MoE forward pass using the CuTe-DSL NVFP4 kernels.
Warning
This API will be deprecated in the future, please use
cute_dsl_fused_moe()withquant_mode="w4a4"instead.See
cute_dsl_fused_moe()for the full parameter documentation; this function forwards every argument unchanged.