w8a16_gemv_batch4

Function w8a16_gemv_batch4 

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

2026-09-25: Block-scaled FP8 GEMV for up to 4 rows (w8a16_gemv_batchm_impl<4>); one pass over the weight serves every row. input [M, K] BF16, output [M, N] BF16; weight [N, K] FP8 E4M3 and block_scale [N/128, K/128] FP32, as for w8a16_gemv.

Per row, the K order and the separate FP32 additions match w8a16_gemv (gb10 kernels); w8a16_batch_bitparity_microtest compares the two byte for byte.

Refuses m > 4: the kernel computes only rows below its MAX_M and never writes the rest. w8a16_gemv_batch16 takes the same arguments for 5..=16 rows.