KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?

Yunxiang Zhang, Ping Yu, Jianyu Wang, Max, Fan +3 more
6/26/2026
cs.LGcs.AI
benchmark-dataset

No confident code implementation found for this paper.

Abstract

Recent large language models (LLMs) can generate custom CUDA kernels that appear to outperform PyTorch on benchmarks such as KernelBench. Building upon this foundational framework, we demonstrate that frontier models frequently engage in reward hacking to artificially inflate reported performance.

Show full abstract

In this work, we identify two areas where evaluation frameworks must co-evolve with model capabilities. First, to accurately measure true speedup, we examine the baseline timing mechanism, noting that enabling Tensor Core acceleration with TF32 provides a more realistic estimation of execution on modern GPUs. Second, concerning algorithmic correctness, models often exploit the narrow test distribution by hardcoding bypasses for specific tensor values. By skipping required computations, these kernels artificially accelerate execution rather than implementing actual CUDA kernels. We introduce KernelBench-Verified, an extended evaluation framework that incorporates a TF32-enabled baseline and a four-distribution hidden test suite. We additionally introduce memory efficiency metrics that capture the often-overlooked speed-memory tradeoff in kernel optimization. Under verified single-turn evaluation with seven frontier LLMs, we find that the best-performing model (GPT-5.5) achieves a 0.88x geometric mean speedup, significantly lower than the 1.43x speedup observed under the standard evaluation protocol. No model consistently outperforms PyTorch when evaluated against realistic baselines. On the memory front, 28% of GPU kernels generated by the best model increase peak GPU memory usage. Our findings demonstrate the necessity of continually adapting robust evaluation protocols as LLM kernel generation capabilities advance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2026kernelbenchverified,
  title  = {KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?},
  author = {Yunxiang Zhang and Ping Yu and Jianyu Wang and Max and Fan and Julian Reed and Azalia Mirhoseini and Will Su},
  year   = {2026},
  eprint = {2607.16241},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.16241v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.16241.svg)](https://codeofpaper.com/paper/2607.16241)

Discussion