vllm.models.qwen3_5.nvidia.ops.fused_allreduce_norm_quant
¶
TP all-reduce + residual add + Gemma RMSNorm + consumer input quant.
Calls FlashInfer's kARResidualRMSNormOut{FP8,FP4}Quant patterns directly
(no torch.compile custom op). The kernel writes the bf16 normed activation
(GDN's in_proj_ba reads it) next to the static FP8 / NVFP4 codes; its
outputs are bitwise identical to FlashInfer AR+norm followed by
scaled_fp8_quant / scaled_fp4_quant.
Returns None when the fused kernel does not apply (FlashInfer or a supported workspace unavailable, or a batch above the workspace budget); the caller then runs an explicit all-reduce and the Triton norm-quant.
Functions:
-
fused_allreduce_gemma_rms_norm_quant–Fused
gemma_rms_norm(all_reduce(hidden_states) + residual)+ quant.
_get_workspace(hidden_states, tp_size)
¶
The FlashInfer quant workspace if it can take hidden_states, else
None.
Source code in vllm/models/qwen3_5/nvidia/ops/fused_allreduce_norm_quant.py
fused_allreduce_gemma_rms_norm_quant(hidden_states, residual, weight, eps, scale, key)
¶
Fused gemma_rms_norm(all_reduce(hidden_states) + residual) + quant.
hidden_states is the per-rank partial of a row-parallel linear;
scale is the consumer's static FP8 input scale or NVFP4 global scale
inverse. Returns the quantized normed activation, the normed activation in
hidden_states' dtype, and the new residual (written into the
hidden_states buffer), or None when the fused kernel does not apply.