act_scale_rowmajor_to_kmajor

Function act_scale_rowmajor_to_kmajor 

Source
pub fn act_scale_rowmajor_to_kmajor(
    src: &[f32],
    m: usize,
    m_pad: usize,
    l: usize,
) -> Vec<f32>
Expand description

CPU reference for the fp8_act_scale_to_kmajor CUDA kernel: read the quantizer’s row-major [m, l] scales, write cuBLASLt’s [l, m_pad], with the m..m_pad pad slots zeroed (their FP8 activation bytes are zeroed too, so the phantom rows contribute a defined zero).

Exists so the layout can be pinned by a unit test on any host — the GPU kernel is one line of index math and this is that line, in Rust.