interleave_ba

Function interleave_ba 

Source
pub fn interleave_ba(
    a_weight: &DenseWeight,
    b_weight: &DenseWeight,
    nv: usize,
    nk: usize,
    k: usize,
    gpu: &dyn GpuBackend,
) -> Result<DenseWeight>
Expand description

2026-09-25: Interleave A (alpha) and B (beta) rows on the host into the BA layout dense_gemv_ba_gates reads, and upload it.

Per group of vpg = nv / nk value heads: the group’s vpg beta rows, then its vpg alpha rows. A and B are [nv, K] BF16; the result is [2*nv, K] BF16 on the GPU.