# CUDABench: Benchmarking LLMs for Text-to-CUDA Generation

*Jiace Zhu, Wentao Chen, Qi Fan, Zhixing Ren, Junying Wu, Xing Z Chai, Chotiwit Rungrueangwutthinon, Yehan Ma, An Zou*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/148268) · [Open on the map](../papers.html#p148268)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [Hardware-Accelerated Code and System Benchmarking](../pgroup/193.md) · Type: benchmark or dataset · Keywords: LLM text-to-CUDA generation, benchmark, GPU kernel evaluation, compilation correctness, functional verification, roofline performance

Areas: [Code & Coding Agents](../areas/codegen.md) › Code Generation and Optimization › LLM Code Benchmarks; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Benchmarks › Code and Hardware Benchmarks; [Benchmarks for LLMs & Agents](../areas/bench-llm-agents.md) › Cross-Domain Agent Evaluation › LLM Code Optimization

## Summary
CUDABench is a comprehensive benchmark that evaluates LLMs on the broader task of generating CUDA code directly from text, featuring a new dataset and evaluation pipeline that measures compilation correctness, functional consistency, and performance.

## Explained to a 5-year-old
GPUs are special computer chips that help games and scientific programs run fast. Writing code for them is hard because you have to think about how the chip works. Large language models are AI systems that can write text, and some can try to write GPU code from plain sentences. The researchers made a big test to see how well the models do. They found that the code often compiles, but sometimes it does not work right. The test shows that the models still need to learn more about how to make the code work well.

## Explained to a 5-year-old, longer
GPUs are special computer chips that help games and scientific programs run fast. Writing code for them is hard because you have to think about how the chip works. Large language models are AI systems that can write text, and some can try to write GPU code from plain sentences. The researchers made a big test to see how well the models do. They built a dataset that includes many different kinds of problems, from artificial intelligence to scientific computing. The test checks three things: whether the code compiles, whether it does the right thing when run, and how fast it runs. They found that the code often compiles, but functional correctness is low. The models also lack knowledge about specific algorithms and do not use the GPU hardware efficiently. This tells us that LLMs need more learning about GPU programming to be useful. The test will help future research improve these models and make better GPU code automatically.

## For a technical reader
The paper introduces a benchmark suite and evaluation pipeline for assessing LLMs that generate CUDA code from natural language. It constructs a dataset spanning multiple domains and difficulty levels, then measures compilation success, functional correctness via execution, and performance using a roofline metric. The results reveal a gap between high compilation rates and low functional correctness, highlighting deficiencies in domain knowledge and hardware utilization. This work provides a standardized way to compare and improve LLM-based GPU code generation.

## Problem
Existing benchmarks for LLM-generated GPU code focus on translating high-level languages into CUDA, missing the more general challenge of directly producing CUDA from text. Additionally, assessing the performance of generated GPU programs is difficult due to hardware-specific and performance-critical aspects.

## Method
The approach constructs a dataset covering a breadth-depth-difficulty space across AI, scientific computing, and data analytics, and introduces an evaluation pipeline that checks compilation correctness, functional consistency via execution, and a roofline-based performance metric. State-of-the-art LLMs are then benchmarked using this pipeline.

## Results
The evaluation shows that while compilation success is high, functional correctness is low, and LLMs struggle with domain-specific knowledge and efficient hardware utilization.

## Contributions
The work provides a comprehensive benchmark covering a breadth-depth-difficulty space across multiple domains and introduces an evaluation pipeline that assesses compilation correctness, functional consistency, and performance via a roofline metric.

## Research questions this paper is counted under

- [How can we create comprehensive benchmarks that evaluate LLM-generated GPU code for correctness, performance, and real-world applicability?](../q/132.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/148268)
