Improving GEMM Kernel Auto-Tuning Efficiency on NVIDIA GPUs with Heuristics and CUTLASS 4.2

AI-generated summary of reporting by NVIDIA Developer Blog. Read the original for the full story.

Why it matters

GPU developers can now find near-optimal GEMM kernels in minutes instead of spending hours on exhaustive compile-and-tune searches, directly cutting JIT compilation time in frameworks like PyTorch.

Read this as

NVIDIA released a tool called nvMatmulHeuristics that picks the best version of the math kernels (matrix multiplication routines) that power AI models. Normally computers must try thousands of versions to find the fastest one, which takes over 700 minutes; the tool predicts a few good candidates first, reaching 96-99% of the best speed in roughly 150 minutes or less. This matters for anyone training large AI models or building fast AI software.

NVIDIA's nvMatmulHeuristics, now in early access and integrated into CUTLASS 4.2, cuts GEMM kernel tuning from an hours-long exhaustive search into a quick heuristic-guided selection. On Llama 3 405B training it hit 96% of peak performance in ~150 minutes versus 700+; on DeepSeek-R1 671B on B200 it reached 99% with over 5x faster build and tuning, and 104% with static cluster sizes. Teams doing JIT compilation (PyTorch, Triton) and large-scale training gain the most.

nvMatmulHeuristics analyzes GEMM problem shape, data types, and auto-detected hardware (including MIG, green contexts) to emit a top-N list of CUTLASS configurations covering CTA/warp/instruction tiles, split-k, swizzling, and cluster dims; CUTLASS 4.2 then compiles only these candidates and profiles runtime parameters via cutlass_profiler with a generated CSV testlist. It supports Ampere, Ada, Hopper, and preliminary Blackwell across FP4 through INT8 precisions. Benchmarks: Llama 3 405B on H100 SXM, 96% of exhaustive baseline in ~150 min vs 700+; DeepSeek-R1 671B on B200, 99% with >5x speedup, 104% when static cluster sizes are exploited. Early access, with internal discovery-set loading for accuracy.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

nvMatmulHeuristics CUTLASS 4.2 Llama 3 405B DeepSeek-R1 671B H100 SXM B200 cuBLAS

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading