fp8_gemm_n128_mfast

Function fp8_gemm_n128_mfast 

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

Pre-dequant NVFP4 → FP8 E4M3. One-time conversion at model load.

Reads B_packed[N, K/2] + B_scale[N, K/GROUP_SIZE] + scale2 → B_fp8[N, K].

Grid: (ceil(N*K/2 / 256), 1, 1) Block: (256, 1, 1) fp8_gemm_t_mfast: same GEMM as fp8_gemm_n128 with the CTA grid axes swapped so M is the fast axis. The M-blocks that share a B panel then run co-resident and read it from L2 instead of DRAM; see the kernel comment.