---
title: "CUDA-L1 — paper by Li et al. (2025) · ICLR 2026"
description: "Making GPU code faster involves choices about how to move data, divide work among threads, and combine operations."
canonical: "https://research.elamur.ai/free/en/papers/li-2025-cuda-l1-improving-cuda-optimization/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/li-2025-cuda-l1-improving-cuda-optimization/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/) / CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learning

# CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learning

Paper · 2025 · Xiaoya Li, Albert Wang, Guoyin Wang et al.

**Authors:** [Xiaoya Li](https://md.research.elamur.ai/free/en/authors/xiaoya-li/), Albert Wang, [Guoyin Wang](https://md.research.elamur.ai/free/en/authors/guoyin-wang/), [Jiwei Li](https://md.research.elamur.ai/free/en/authors/jiwei-li/) and Chris Shum · **Year:** 2025 · **Venue:** ICLR 2026 · **Licence:** [CC BY 4.0 (arXiv OAI)](http://creativecommons.org/licenses/by/4.0/)

Cited by **48** papers in our library of the 163,136 papers whose bibliographies we read · ICLR 2026 · [licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2507.14111)
- [arXiv 2507.14111](https://arxiv.org/abs/2507.14111)

## Summary

Making GPU code faster involves choices about how to move data, divide work among threads, and combine operations. Engineers typically try several versions and time them because a promising change can leave the real bottleneck untouched. CUDA-L1 automates part of that process. Given a PyTorch workload, it generates CUDA code intended to produce equivalent outputs in less time. The paper asks whether an initially weak CUDA generator can learn to do this by testing its own proposals and examining which implementations run faster.

The authors first train the generator on augmented examples of working CUDA code. They then let it produce its own training examples, retaining implementations that run and pass checks against the reference. The final stage, called contrastive reinforcement learning, introduces execution speed as the objective. Timings serve two purposes. They influence the training updates, and they appear alongside earlier code variants in prompts for subsequent attempts. The generator is asked to explain the performance differences, propose a design, and implement it. The resulting code goes back through evaluation, allowing later attempts to draw on newly measured examples.

On the NVIDIA A100, CUDA-L1 achieves a mean speedup of ×3.12 and a median of ×1.42 against the default reference across the 250 workloads in [KernelBench](https://md.research.elamur.ai/free/en/papers/ouyang-2025-kernelbench-llms-write-efficient-gpu/). The largest reported speedup in that comparison is ×120. Across their respective eligible workloads, the mean speedups are ×2.77 against standard Torch Compile, ×2.88 against its reduce-overhead configuration, and ×2.81 against the authors’ CUDA Graph baseline. The A100-optimized code also runs faster on average than the default references on H100, L40, RTX 3090, and H20. The mean and median tell different parts of the story. H100 has the largest mean speedup, while A100 has the highest median.

The comparisons suggest that both the training stages and the choice of examples matter. In the study of training variants, selecting examples from distinct performance bands produces a higher rate of faster implementations than selecting examples at random. The generated code also contains familiar techniques such as operation fusion, changes to memory access, and adjustments to how threads are organized. The authors argue that the system learns to combine such techniques and can carry them over to new workloads. They also find that an early evaluator credited some candidates for work it failed to time. Their response is to strengthen measurement and validation and to limit how much unusual rewards can influence training.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

## Cite

Cite as Xiaoya Li, Albert Wang, Guoyin Wang, Jiwei Li and Chris Shum. 2025. CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learning. ICLR 2026.

The paper itself, not this page. BibTeX from the library's record of the work. [arXiv 2507.14111](https://arxiv.org/abs/2507.14111)

```bibtex
@inproceedings{li2025cuda,
  title = {{CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learning}},
  author = {Xiaoya Li, Albert Wang, Guoyin Wang, Jiwei Li and Chris Shum},
  booktitle = {ICLR 2026},
  year = {2025},
  eprint = {2507.14111},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.14111}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
