Skip to main content

GEMM_GPU_THRESHOLD

Constant GEMM_GPU_THRESHOLD 

pub const GEMM_GPU_THRESHOLD: usize = _; // 32_768usize
Expand description

Problem-size threshold (in m * n * k multiply-adds) below which GEMM stays on the CPU regardless of available accelerators. Small GEMMs are dominated by dispatch/transfer overhead, so the GPU path only earns its keep above this size. 1 << 15 (32768 FMAs, e.g. a 32×32×32 GEMM) is a conservative crossover that keeps the hand-checked unit tests (well below it) firmly on the CPU floor.