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

2026-09-25: Widen an FP8 block-scale tensor to FP32 on the GPU, so the block-scale kernels read const float*. src is [total] BF16 (dtype 0), FP32 (1) or E8M0 (2); dst is [total] FP32. An E8M0 byte e becomes 2^(e - 127) (the bit pattern e << 23), e = 0 becomes 2^-127 and e = 255 becomes 0.0.