q2_0_gemv_batchm

Function q2_0_gemv_batchm 

Source
pub fn q2_0_gemv_batchm(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    input: DevicePtr,
    weight: &PackedQ2Weight,
    output: DevicePtr,
    m: u32,
    stream: u64,
) -> Result<()>
Expand description

Q2_0 batched GEMV (M=1..8 decode): C[M,N] = A[M,K] @ dequant(B).

Reads each weight block once and accumulates across all m activation rows, amortizing the (2-bit) weight-byte read across the batch. A is BF16 [M, K] row-major, C is BF16 [M, N] row-major.

Kernel: q2_0_gemv_batchm(A, B, C, N, K, group, M).