w4a16_gemv_qg_batch2

Function w4a16_gemv_qg_batch2 

Source
pub fn w4a16_gemv_qg_batch2(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    input: DevicePtr,
    weight: &QuantizedWeight,
    output: DevicePtr,
    n: u32,
    k: u32,
    num_heads: u32,
    head_dim: u32,
    stream: u64,
) -> Result<()>
Expand description

Q+Gate GEMV for 2 tokens with inline deinterleave.

Reads the Q+Gate weight matrix once, produces 2 deinterleaved output vectors (Q|Gate for each token). Replaces 2× w4a16_gemv_qg calls.

Kernel: w4a16_gemv_qg_batch2(A, B, S, s2, C, N, K, num_heads, head_dim) Grid: (ceil(N/4), 1, 1) Block: (256, 1, 1) Input A: [2, K], Output C: [2, N] deinterleaved [Q|G] per token.