Skip to content
DAH

An open FP8 GEMM kernel matching cuBLAS across LLM shapes on H100

OpenTo verify: GPU benchmarkPosed by FP8 tensor cores on Hopper (2022); open kernels such as DeepGEMM (2025) cover selected shapes
AI-reviewed
On this page14 sections
Difficulty
24/100Engineering
How far from a resolution. P vs NP = 100
Application value
50/100Significant
Realistic practical impact if resolved. P vs NP = 100
Leverage
29/100Local
How much other knowledge hinges on it. P vs NP = 100

Difficulty 24: the techniques (TMA, WGMMA, warp specialisation, Stream-K) are public in CUTLASS and DeepGEMM, and the gap is confined to small-M and odd shapes, so it sits with the implementable max-flow problem (30) as engineering rather than research. Application value 50: GEMM carries most LLM FLOPs, but parity replaces an existing vendor library rather than enabling something new, so it ranks below decode bandwidth (62). Leverage 29: fused epilogues, grouped MoE GEMMs and FP8 attention reuse the work; nothing theoretical hinges on it.

The problem

Can an open FP8 matrix-multiply program run as fast as NVIDIA's closed library on every size that matters?

  1. 1Closed library fast, open kernels partial
  2. 2Fix a sweep of real LLM shapes
  3. 3Warp-specialised TMA and WGMMA design
  4. 4Tune thin and odd shapes
  5. 5Reproduce at 97% of cuBLAS

What is asked. Matrix multiplication (C=ABC = AB) is where a language model spends most of its arithmetic. NVIDIA's H100 can do it in FP8, 8-bit floating-point numbers, at about twice the rate of 16-bit formats (see the entries on tiled GEMM and FP8). The fastest FP8 code is in cuBLAS, NVIDIA's closed library. The problem asks for an open kernel, whose source anyone can read and change, that reaches at least 97% of cuBLAS speed on every matrix shape in a fixed list taken from real models, with matching accuracy and the same scaling scheme (one scale per tensor, or one per 1×128 or 128×128 block).

Why every shape is the hard part. A product of an MimesKM imes K matrix with a KimesNK imes N matrix costs 2MNK2MNK floating-point operations. Large square products are easy to make fast: the work is split into tiles, each tile reuses its data many times, and every one of the H100's 132 cores stays busy. The list also contains M=1M = 1 or 1616, which is what happens when a model generates one token at a time. Then 2MNK2MNK is small compared with the bytes of BB that must be read, so the kernel waits on memory, not arithmetic. Shapes that are not multiples of the tile size cause a second problem, wave quantisation. With 132 cores and 140 tiles, the first wave runs 132 tiles and the second runs only 8, so most of the chip idles for a whole wave. The analogy is a bus company with 132 buses and 140 passengers' worth of trips. It breaks because tiles can be cut smaller or split along KK (Stream-K), which a bus trip cannot.

State of the art. Since cuBLAS 12.9, NVIDIA's library supports the block-scaled FP8 schemes on Hopper, so both scaling schemes now have a vendor baseline. DeepGEMM, DeepSeek's open FP8 library, first compared itself against DeepSeek's internal CUTLASS-based kernels, not cuBLAS. It reported 1.4–2.7× gains at M=64M = 64 and 1.0–1.2× at M=4096M = 4096. Its current README claims parity with expert-tuned libraries but gives no per-shape cuBLAS table. No source shows an open kernel at 97% of cuBLAS on every shape.

What a solution looks like. A public kernel plus a script that times it and cuBLAS in the same process on one H100, across the whole shape list. Independent reruns must show at least 97% everywhere, with error no worse than 1.1 times cuBLAS's own.

Go deeper

The full technical text.

Produce an openly licensed FP8 (E4M3 inputs, BF16 output) GEMM kernel with per-tensor or per-block scaling that, on a single H100 SXM, reaches at least 97% of the throughput of the cuBLAS FP8 GEMM (CUDA 12.9 or later, the first release with block-scaled FP8 on Hopper) with the same scaling scheme on every shape in a stated sweep of LLM-relevant shapes (M in {1, 16, 64, 128, 512, 2048, 8192}, N and K drawn from the Llama-3 70B and DeepSeek-V3 projection sizes), while matching cuBLAS output within the tolerance in the verification spec. Throughput is also reported as a fraction of the dense FP8 peak in the H100 datasheet.

Words on this page (10)
Words on this page
GEMM
General matrix multiply, C = A·B: the operation that takes most of the arithmetic in neural networks.
FP8
An 8-bit floating-point format; E4M3 keeps more precision, E5M2 more range.
cuBLAS
NVIDIA's closed-source library of tuned linear-algebra routines, the usual speed baseline for matrix multiply.
kernel (GPU)
A function that runs on the GPU, executed by thousands of threads in parallel.
tensor core
A unit inside each GPU core that multiplies small matrix tiles in one instruction, much faster than ordinary arithmetic.
Hopper (H100)
NVIDIA's 2022 data-centre GPU generation; the H100 is its main chip.
scale factor
A multiplier applied before rounding to a narrow format so values fit its range, divided out afterwards.
tiling
Splitting a large matrix operation into small blocks that fit in fast on-chip memory and are reused many times.
memory bandwidth
How many bytes per second can move between memory and the processor.
CUTLASS
NVIDIA's open-source C++ template library of fast matrix-multiply building blocks.
New to this? Read first (3)
New to this? Read first
AI-reviewedAn AI drafted this explanation. Check it against the technical text.

Path to understanding

foundations → problem

The research entries this problem rests on, in the order to read them. Each links to its explainer.

  1. Start with
  2. Step 2
  3. Then
    • An open FP8 GEMM kernel matching cuBLAS across LLM shapes on H100The problem

State of the art

cuBLAS 12.9 added 1x128 and 128x128 block-scaled FP8 GEMMs on Hopper, so per-tensor and block-scaled kernels now both have a vendor baseline. DeepGEMM's original benchmark (H800, February 2025) compared against DeepSeek's internal CUTLASS-based kernels, not cuBLAS, and reported its largest gains at small M (1.4–2.7x at M = 64) and 1.0–1.2x at M = 4096; its current README claims it matches or exceeds expert-tuned libraries without a per-shape cuBLAS table. Small-M (decode-like) shapes and non-multiple-of-tile sizes are where open kernels most often fall behind, because wave quantisation and memory-bound behaviour dominate there. No primary source known to the curator documents a kernel meeting the 97%-on-every-shape bar.

Realistic applications

FP8 inference and training are the main consumers of GEMM FLOPs; an open, inspectable kernel lets researchers modify scaling, fuse epilogues and port to new hardware without a vendor binary.

What counts as solved

Two independent reruns of the stated harness on H100 SXM report the kernel at or above 97% of cuBLAS on every shape, with correctness checks passing, from a public repository at a pinned commit.

How it gets verified

To verify: GPU benchmark

A kernel run and timed on stated hardware against a baseline.

Hardware: one NVIDIA H100 SXM 80 GB, default clocks, power cap recorded. Dtypes: E4M3 A and B, FP32 accumulation, BF16 C; per-tensor scaling and 1x128 / 128x128 block scaling variants reported separately. Shapes: the sweep in the statement, K up to 16384. Baseline: cuBLAS (cublasLt FP8 matmul, per-tensor scaling and the VEC128 / BLK128x128 block-scale modes) from CUDA 12.9 or later, exact version recorded, default (non-fast) accumulation. Metric: median TFLOP/s over at least 100 timed iterations after warmup, CUDA events, three independent runs; also % of the datasheet dense FP8 peak. Correctness: max relative error to an FP32-dequantised reference no worse than 1.1x the cuBLAS kernel's own error on the same inputs. Harness: a public script at a pinned commit that also times cuBLAS in the same process.

Claims

No claimed results on this problem.

Where the work is

Theory
4%
New mathematical or conceptual ideas
Engineering
78%
Building instruments, chips, systems, software, formal proofs
Compute
10%
Raw computation, search, simulation
Empirical
8%
Observation, experiment, data collection

Mostly kernel engineering with a measurement loop on real hardware; some tuning compute and a little new scheduling insight.

Connected problems