gpuemu logo gpuemu
Measured: 9/9 bugs caught, 0 false positives

Catch silently-wrong
GPU kernels before they ship

Every modern stack ships LLM-generated CUDA/Triton kernels, and the field-standard correctness check — torch.allclose on one shape — is blind to the bugs they contain. gpuemu is the GPU-less correctness oracle that finds them.

gpuemu fuzz flash_attention
$ gpuemu fuzz flash_attention --iterations 100

   op-schema fuzzing · adversarial values · fp64 oracle
   FAIL  seed=0x6f3a91  dtype=fp16  shape=[8,257,64]
        max abs err 0.31 > tol 0.02  (tail-mask leak, N > BLOCK_N)
        input snapshot saved — replay with:
        gpuemu reproduce 0x6f3a91

  Passed: 73/100   27 failing seeds stored

Built for the teams shipping LLM-generated kernels

Frontier labsvLLMSGLangTensorRT-LLMllama.cppInference vendors

Every benchmark says your kernel is “correct”

The industry-standard correctness oracle is one line — one shape, one dtype, one seed. Every modern LLM-kernel benchmark (KernelBench, TritonBench, GEAK, KernelBand, STARK) uses it. In a measured 26-op corpus, it accepts 9/9 of these LLM-style buggy kernels as correct.

# the oracle the whole field trusts
torch.allclose(my_kernel(x), reference(x), atol=1e-5, rtol=1e-2)
Bug class Example Why allclose misses it
Tail-mask leak softmax forgets to mask the last partial tile Only fires when H isn't a multiple of BLOCK — H=256 looks fine
Accumulator scale matmul writes acc = instead of acc += Result happens to match within rtol on the chosen shape
Missing normalisation attention without 1/√D Saturates softmax differently; one shape looks correct
Online-softmax rescale flash-attention forgets acc *= α after a max update Only wrong when N > BLOCK_N

An operator-aware correctness regime

Every default is shaped by a measured study. gpuemu replaces “allclose on one shape” with five layers — and runs the validation step without a GPU.

fp64 reference oracle

P1

Validates GPU-kernel output against a high-precision CPU reference, per dtype — not a single allclose on one shape.

100% illusion catch on 9/9 LLM-style bugs across 5 GPU classes; 0 false positives on 15/15 controls.

Op-schema-aware fuzzing

P3

A per-op shape generator with boundary, regular, and adversarial value distributions — built to hit the partial-tile and edge cases real kernels break on.

99% bug recall under adversarial values; +28 pp over the field-standard default oracle.

Per-op calibrated tolerances

P2

A p95-of-controls × 1.5 envelope fit individually per op and dtype, instead of one hand-picked atol/rtol for everything.

+17 pp recall (65% → 82%) over a single fixed atol=1e-5, rtol=1e-2 — at zero precision cost.

Static PTX/SASS lint

P4

Reads register pressure, spills, and instruction counts straight from compiled artifacts and gates on regressions vs a baseline.

Structural Δregs predicts Δperf% consistently across H100/A100/L40S/A10/3060. Pair with the oracle — semantic bugs compile to identical PTX.

Reproducible RNG

A bit-identical xorshift128+ generator in Rust and Python, with exact input snapshots on every failure.

Every flagged failure replays byte-for-byte from its seed — on any machine, with or without a GPU.

9/9
LLM-style kernel bugs caught
across 5 GPU classes (P1)
0
false positives
on 15/15 control kernels (P1)
99%
bug recall
under adversarial inputs (P3)
65→82%
recall from calibrated tolerances
+17 pp over fixed atol/rtol (P2)

“Isn’t this just assert_close?”

It’s the first question gpuemu gets asked. The short answer: the standard check caught 0/9 LLM-style bugs in our corpus. Compute Sanitizer sees memory bugs only. The benchmarks use the same one-shape oracle inside.

See gpuemu vs the alternatives →
  • torch.testing.assert_close — 0/9 LLM-style bugs caught (P1)
  • NVIDIA Compute Sanitizer — memory bugs only — silent wrong-output invisible
  • KernelBench / TritonBench — use the same one-shape oracle inside
  • Framework fuzzers (FreeFuzz et al.) — API layer, not the kernel — 6.5% real-bug catch

Frequently Asked Questions

What is gpuemu?

gpuemu is a GPU-less correctness oracle for deep-learning kernels. It validates CUDA/Triton kernels against a high-precision fp64 reference with op-schema-aware adversarial inputs, calibrated per-op tolerances, and static PTX/SASS lint — finding the silent numerical bugs that a single torch.allclose check misses.

How is gpuemu different from torch.allclose or torch.testing.assert_close?

The standard check runs one shape, one dtype, one seed. In a measured 26-op corpus that oracle accepted 9/9 LLM-style buggy kernels as correct. gpuemu replaces it with an operator-domain-aware regime that caught all 9 with zero false positives, and reports the exact seed, shape, and input snapshot for every failure.

Does gpuemu need a GPU to run?

No. The validation step runs without a GPU by comparing your kernel’s output against a CPU fp64 reference. You only need a GPU for the optional artifact (PTX/SASS) step. Failures reproduce byte-for-byte on a laptop because the RNG is bit-identical across Rust and Python.

What languages and frameworks does it support?

A Rust daemon and CLI (cargo install gpuemu) plus a Python client (pip install gpuemu) with adapters for PyTorch, JAX, and TensorFlow. Platforms: Linux (primary) and macOS (CPU validation).

Is gpuemu open source?

Yes. gpuemu is dual-licensed under MIT or Apache-2.0. An enterprise tier adds private rule packs, an on-prem daemon, and signed correctness reports.

Stop shipping silently-wrong kernels

Open source, dual-licensed MIT / Apache-2.0. Validate your first kernel in five minutes — or talk to us about an enterprise pilot.