dense_gemv_fp8w

Function dense_gemv_fp8w 

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

Dense FP8-weight GEMV (M=1): C = A @ (dequant(B_fp8) * row_scale).

A: [1, K] BF16, B: [N, K] FP8 E4M3, row_scale: [N] f32, C: [1, N] BF16. Halves weight bandwidth vs dense_gemv (1 byte/weight instead of 2). 4 outputs/block, 64 threads (2 warps) per output.

Kernel: dense_gemv_fp8w(A, B, row_scale, C, N, K) Grid: (ceil(N/4), 1, 1) Block: (256, 1, 1)