flashinfer.fused_moe.CudnnGroupedGemmFp8PerTensorRunner

class flashinfer.fused_moe.CudnnGroupedGemmFp8PerTensorRunner(config: MoEConfig, device: device)

FP8 per-tensor MoE over grouped_mm_fp8.

The canonical per-tensor FP8 pack (no activation scale); the view carries the folded static scales. GEMM1 rows are scaled by fc1_dequant_scale, the bf16 intermediate is requantized to E4M3 with fc2_act_quant_scale before GEMM2, and the finalize applies fc2_dequant_scale. Extra packed inputs: [fc1_dequant_scale, fc2_act_quant_scale, fc2_dequant_scale].

__init__(config: MoEConfig, device: device) → None

Methods

__init__(config, device)

accepts(act, weights)

Select candidates with prepared weights and supported input geometry.

build()

check_support()

forward(inputs[, tactic, do_preparation])

Forward pass for tunable runners.

get_cache_key_extras(inputs)

Return extra values to include in the autotune cache key.

get_valid_tactics(inputs, _profile)

Rank each GEMM's plans on its own (the other GEMM at -1), then pair the top _num_top_tactics_per_stage of each and add the all-heuristic fallback.

launch_kwargs_for(inputs)

Return only the launch kwargs required by this packed call.

launch_state_for(inputs)

Return immutable per-call launch metadata paired with inputs.

pack_inputs(act, weights)

precompile_tactics(inputs, tactics, profile, ...)

Optionally perform compile-only work for all tactics before profiling.

supports_quant(quant)

Return whether this runner can execute quant's three format axes.

tuning_config_for(inputs)

Return the tuning config paired with inputs when one is present.

Attributes

backend_key

supported_activation_classes

supported_activation_classes_by_quant

supported_output_formats

supported_quant_variants

supported_routing_modes

supports_expert_parallelism

supports_fused_shared_experts

supports_nvfp4_4over6

supports_per_token_scale

weight_view_aliases

config