bf16_absmax

Function bf16_absmax 

Source
pub fn bf16_absmax(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    data: DevicePtr,
    out_max: DevicePtr,
    n_elems: u32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: Max absolute value of n_elems BF16 values, folded into the f32 at out_max with an atomic max. The caller zeroes out_max first; the FP8 KV calibration (fp8_calibration.rs) does so before each K/V pair.