paper-with-me

Papers

KernelBench: Can LLMs Write Efficient GPU Kernels?

2025-02-14 · Anne Ouyang, Simon Guo, Simran Arora, Alex L. Zhang, William Hu, Christopher Ré, Azalia Mirhoseini

Efficient GPU kernels are crucial for building performant machine learning architectures, but writing them is a time-consuming challenge that requires significant expertise; therefore, we explore using language models (LMs) to automate kernel generation. We introduce KernelBench, an open-source framework for evaluating LMs' ability to write fast and correct kernels on a suite of 250 carefully selected PyTorch ML workloads. KernelBench represents a real-world engineering environment and making progress on the introduced benchmark directly translates to faster practical kernels. We introduce a new evaluation metric fast_p, which measures the percentage of generated kernels that are functionally correct and offer a speedup greater than an adjustable threshold p over baseline. Our experiments across various state-of-the-art models and test-time methods show that frontier reasoning models perform the best out of the box but still fall short overall, matching the PyTorch baseline in less than 20% of the cases. While we show that results can improve by leveraging execution and profiling feedback during iterative refinement, KernelBench remains a challenging benchmark, with its difficulty increasing as we raise speedup threshold p.

📄 PDF Abstract BibTeX arXiv:2502.10517

Code (1)

scalingintelligence/kernelbench pytorch

Tasks

GPU

Similar Papers 제목 키워드 기반

MobileKernelBench: Can LLMs Write Efficient Kernels for Mobile Devices?

2026-03-12 · Xingze Zou, Jing Wang, Yuhua Zheng, Xueyi Chen 외 arxiv

Large language models (LLMs) have demonstrated remarkable capabilities in code generation, yet their potential for generating kernels specifically for mobile devices remains largely unexplored. In this work, we extend th…

Code Generation

MultiKernelBench: A Multi-Platform Benchmark for Kernel Generation

2025-07-20 · Zhongzhen Wen, Yinghui Zhang, Zhong Li, Zhongxin Liu 외 arxiv

The automatic generation of deep learning (DL) kernels using large language models (LLMs) has emerged as a promising approach to reduce the manual effort and hardware-specific expertise required for writing high-performa…

DataKernelBench: Can LLMs Optimize Database Queries on GPUs?

2026-08-25 · Gokul Karthik Kumar, Yotam Perlitz, Corey Lammie, Andrea Giovannini 외 arxiv

GPUs increasingly accelerate database systems, but query-specific peak performance still often relies on hand-written kernels. Existing LLM kernel benchmarks focus on machine learning operators, leaving irregular, hetero…

KernelFoundry: Hardware-aware evolutionary GPU kernel optimization

2026-03-12 · Nina Wiedemann, Quentin Leboutet, Michael Paulitsch, Diana Wofk 외 arxiv

Optimizing GPU kernels presents a significantly greater challenge for large language models (LLMs) than standard code generation tasks, as it requires understanding hardware architecture, parallel optimization strategies…

Code Generation

Making LLMs Optimize Multi-Scenario CUDA Kernels Like Experts

2026-03-07 · Yuxuan Han, Meng-Hao Guo, Zhengning Liu, Wenguang Chen 외 arxiv

Optimizing GPU kernels manually is a challenging and time-consuming task. With the rapid development of LLMs, automated GPU kernel optimization is gradually becoming a tangible reality. However, current LLM-driven automa…