widen_block_scale_f32

Function widen_block_scale_f32 

Source
pub fn widen_block_scale_f32(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    src: DevicePtr,
    dst: DevicePtr,
    total: u32,
    input_dtype: u32,
    stream: u64,
) -> Result<()>
Expand description

Widen an FP8 block-scale tensor to FP32 on the GPU.

src is [total] BF16 (0), FP32 (1), or F8_E8M0 (2); dst is [total] FP32. E8M0 uses the exact exp << 23 power-of-two representation. Run once at load so downstream FP8 block-scale kernels read const float*. Grid: (ceil(total/256), 1, 1) Block: (256, 1, 1)