residual_add_rms_norm_gatef32

Function residual_add_rms_norm_gatef32 

Source
pub fn residual_add_rms_norm_gatef32(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    hidden: DevicePtr,
    src: DevicePtr,
    weight: &DenseWeight,
    output: DevicePtr,
    output_f32: DevicePtr,
    residual: DevicePtr,
    num_tokens: u32,
    hidden_size: u32,
    eps: f32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: residual_add_rms_norm that also writes the normed row in FP32 to output_f32, the MoE router input, so routing does not see the BF16 rounding of the norm output. Callers use it when METRALE_FP32_ROUTING is active for the layer’s FFN.