FastKernels: Benchmarking GPU Kernel Generation in Production

Gabriele Oliaro, Yichao Fu, May Jiang, Owen Lu, Junli Wang, Zhihao Jia, Hao Zhang, Samyam RajbhandariarXiv 2026

TL;DR

FASTKERNELS is a new benchmark and minimalistic inference framework designed to bridge the massive gap between AI-generated GPU kernels and actual production performance. By evaluating kernels within a real-world serving pipeline rather than isolated "sandboxes," the authors reveal that current state-of-the-art agents actually fail to outperform production-grade baselines, providing a much-needed reality check and a path forward for the field.

What Problem Does This Paper Address?

In the race to optimize AI, Large Language Model (LLM) agents are increasingly being used to write the low-level code—called GPU kernels—that handles heavy mathematical operations. While these agents often report impressive speedups in research papers, those gains frequently vanish when the code is actually plugged into production frameworks like vLLM or SGLang.

The authors identify this as "benchmark–production misalignment." Current benchmarks evaluate kernels in isolation using synthetic data and single-GPU setups. In the real world, kernels must deal with complex memory layouts, multi-GPU communication, and specific compilation stacks. A kernel that looks fast in a "sandbox" might be brittle, mathematically incorrect at scale, or simply slower than the highly optimized libraries (like cuBLAS or FlashAttention) already used in production.

Methods

The authors introduce a "benchmark-as-framework" approach. Instead of a standalone test suite, FASTKERNELS is a minimalistic, production-grade inference engine. This ensures that any kernel generated is immediately tested in the environment where it is intended to live.

Key methodological pillars include:

  • Compositional Task Hierarchy: Tasks are organized into four levels: Level 1 (primitives like SoftMax), Level 2 (fused operators), Level 3 (full layers), and Level 4 (end-to-end models). This allows agents to reuse lower-level optimizations to solve complex higher-level modules.
  • Interface Compatibility: Every task's code signature is designed to match the modules in state-of-the-art libraries. This enables "copy-paste" deployment of optimized kernels directly into production codebases.
  • Production-Faithful Evaluation: Unlike benchmarks that use random numbers, FASTKERNELS captures and replays the exact tensors encountered during real model execution. It also includes multi-GPU communication kernels as first-class citizens.
Figure 1: FASTKERNELS overview. Three benchmark–production misalignments (left) motivate three design pillars (center), which converge into a unified benchmark-as-framework design (right). Optimized kernels flow through a virtuous cycle (bottom): optimization, validation, integration as new baselines, and release.

Datasets

The benchmark is built around 46 representative architectures spanning eight categories, including LLMs (Dense and Mixture-of-Experts), Vision, Audio, Robotics, and 3D graphics.

The authors conducted an extensive audit of HuggingFace Transformers and found that these 46 architectures collectively cover 96.2% (409/425) of all models in the library. This ensures that the benchmark is not just a toy set but a comprehensive representation of the current AI landscape.

Key Insights and Ideas

  • The "Eager" Trap: Most existing benchmarks compare AI-generated code against "PyTorch eager" mode—a relatively slow baseline. FASTKERNELS compares agents against the "best-in-class" production kernels. This shift reveals that agents aren't actually beating the state-of-the-art yet.
  • Data Matters: The paper demonstrates that using synthetic data for Mixture-of-Experts (MoE) models gives a false sense of performance. Real-world requests create "hot experts" and load imbalances that synthetic data fails to replicate, leading to kernels that are optimized for the wrong patterns.
  • L2 is the Real Test: While agents are getting good at writing simple kernels (Level 1), they struggle significantly with fused operators (Level 2). These require understanding the "contract" of the surrounding system, such as how memory is managed across a full transformer block.

Key Results

The authors evaluated three top-tier kernel-generation agents (OpenAI Codex, KernelAgent, and Dr. Kernel) and found a sobering reality:

  • Aggregate Performance: Even the strongest agent (Codex) achieved only a 0.94× aggregate speedup—meaning it was actually slower than the production baselines on average.
  • The L1 to L2 Drop: Codex dropped from a 1.03× speedup on simple primitives to 0.84× on composite modules. Other agents fared worse, with some failing to produce any correct kernels for complex tasks.
  • Framework Parity: Despite its minimalistic design, the FASTKERNELS framework itself runs at performance parity with hardened systems like vLLM, proving it is a valid proxy for production environments.

Limitations and Future Work

The authors acknowledge several constraints:

  • Agent Scope: The current agent study only covers Levels 1 and 2. Future work is needed to see if agents can tackle Level 3 (full layers) and Level 4 (end-to-end models).
  • Hardware Specificity: Results were measured on NVIDIA H100 GPUs. Performance rankings might shift on different hardware like the B200 or AMD's MI300X.
  • Human Review: The mapping of HuggingFace models to kernels involved significant manual verification, which may be difficult to scale as new models are released daily.

By releasing FASTKERNELS, the researchers hope to steer the community away from "sandbox" victories and toward kernels that provide genuine throughput improvements in the real world.

Summary updated

BibTeX
@misc{oliaro2026fastkernels,
  author = {Gabriele Oliaro and Yichao Fu and May Jiang and Owen Lu and Junli Wang and Zhihao Jia and Hao Zhang and Samyam Rajbhandari},
  title = {{FastKernels: Benchmarking GPU Kernel Generation in Production}},
  year = {2026},
  eprint = {2605.23215},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.23215},
}
Figure