w4a16_gemv_dual_batch3

Function w4a16_gemv_dual_batch3 

Source
pub fn w4a16_gemv_dual_batch3(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    input: DevicePtr,
    weight0: &QuantizedWeight,
    output0: DevicePtr,
    weight1: &QuantizedWeight,
    output1: DevicePtr,
    n: u32,
    k: u32,
    stream: u64,
) -> Result<()>
Expand description

Dual-projection GEMV for 3 tokens (K+V or any 2 weight matrices).

Reads each weight matrix once, produces 3 output vectors per projection. blockIdx.z selects projection 0 or 1.

Kernel: w4a16_gemv_dual_batch3(A, B0, S0, s2_0, C0, B1, S1, s2_1, C1, N, K) Grid: (ceil(N/4), 1, 2) Block: (256, 1, 1) Input A: [3, K], Output C0: [3, N], C1: [3, N].