Skip to main content

select_hmma_kernel

Function select_hmma_kernel 

Source
pub fn select_hmma_kernel(
    kind: MmaKind,
    m: usize,
    k: usize,
    n: usize,
    sm_arch: u32,
    gpu: &GpuLimits,
) -> HmmaKernel
Expand description

Select the fastest LEGAL half-precision kernel for (kind, shape, arch): cp.async when the default tile divides the shape and its bf16/f16 footprint fits static shared memory on an Ampere+ part, else the basic kernel. Callers pass a shape already known WMMA-legal (16-aligned) via select_mma.