Skip to content

vllm.compilation.passes.fusion.rms_quant_fusion

Classes:

FusedAddRMSNormNvfp4QuantPattern

Fuse add-RMSNorm with NVFP4 quantization for either scale layout.

FusedRMSQuantKey

Bases: NamedTuple

Named tuple for identifying the type of RMSNorm + quant fusion. quant: type of quantization fused_add: does the op also perform the residual add

RMSNormQuantFusionPass

Bases: VllmPatternMatcherPass

This pass fuses rms_norm & quant custom ops into a fused rms_norm_quant op. It also supports fused_add_rms_norm.

_flashinfer_fused_add_rms_norm_nvfp4_quant(result, result_block_scale, residual, input, weight, input_global_scale, block_scale_unswizzled, is_sf_swizzled_layout, epsilon)

FlashInfer fused add + RMSNorm + NVFP4 quantization.

_rms_input_weight_dtype_match(match)

Prevent fusion when rms_norm input and weight dtypes differ.