# Claude and Gemini coding agents beat expected speed limits on CUDA kernels

A RIKEN study ran 28 AI models through 840 sandboxed sessions, turning simple C loops into GPU code. The best closed models went past the speed the original algorithm should allow. Open-weight models fell far behind.

- Category: Code
- Readiness level: II (Benchmarked) on Science Underway's four-step scale, as proposed
- Published: 2026-12-01
- Editor: Stefan Perdal
- URL: https://scienceunderway.com/articles/claude-and-gemini-coding-agents-beat-expected-speed-limits-on-cuda-kernels

## The study

Omokage: Understanding How Agents Develop and Optimize HPC Kernels on GPUs (preprint, not peer reviewed). arXiv 2611.39217. https://arxiv.org/abs/2611.39217

## At a glance

- What it shows: AI coding agents from Anthropic and Google wrote GPU code that ran faster than the expected ceiling for the original method. They used cheaper maths, smarter memory use and, sometimes, a different algorithm. The best open-weight model reached about a third of that ceiling.
- What it does not show: It does not show these gains inside real applications, and each model ran only once per task. It also does not prove that the agents' careful working habits cause their better results.
- Why it matters: Teams that hand speed-critical code to AI agents now have a clearer picture of which models deliver and where the agents still need watching. That includes stopping too late and missing bugs that the tests do not catch.

## What the study shows

Researchers at RIKEN in Japan built a test harness they call Omokage. It runs AI coding agents in a sealed sandbox. The agents cannot see the answers or the scoring code. A fixed checking script with no AI in it decides whether code is correct and how fast it runs. Separate AI models then read each agent's log, the step-by-step record of what it did, to describe how it worked.

The task was the same for every agent. Each one took 30 kernels from PolyBench, a standard set of small maths and simulation loops written in plain C, and rewrote them in CUDA, NVIDIA's language for GPU code. The work ran on NVIDIA B300 GPUs, with no limit on time or budget. 28 models took part, inside four agent tools: Claude Code, Google's Antigravity, OpenAI's Codex and the open-source OpenCode.

Speed was measured against a roofline bound. This is the best speed the original algorithm should reach on this GPU, set by either its arithmetic or its memory traffic. The authors report that Gemini 4 Neon averaged about twice this bound on the kernels it passed. Opus 5.5 reached 1.6 times and Sonnet 5.5 1.5 times. The best open-weight model, Kimi K3, reached about a third of the bound.

The agents beat the bound in three ways, all without being asked to. Some ran the maths in lower precision on specialised units and then recovered full accuracy. Some kept data on the chip across many time steps, a method called temporal blocking. Some replaced the algorithm itself. In several cases, agents turned hundreds of simulation steps into a single calculation. Every passing answer was checked: floating-point results against a higher-precision reference, integer results exactly. The flagship closed models changed the algorithm on three to five kernels each. No open-weight model did.

The logs showed a pattern. The strongest models reasoned with numbers against hardware limits. They also worked in a loop: form a guess, change the code, measure. Yet only 6 of 840 sessions stopped for a sound reason. Profilers, the tools engineers use to see where time goes, made kernels faster about as often as slower. The full run cost about 7,100 US dollars at list prices. This is a preprint and has not been peer reviewed.

## Our reading

In our reading, the headline is not that agents can write GPU code. It is that the best ones now use tricks a skilled performance engineer would use, without being prompted. Examples include running the maths on lower-precision units while keeping full accuracy, and keeping data on the chip between steps. On a 3D simulation kernel, the authors report that Fable 5.2 ran 2.5 times as fast as a hand-tuned published version. That is a real result on a real GPU, checked by a script, not by an AI judge.

The gap between models is the second story. Closed frontier models led by a wide margin. Open-weight models ignored or missed about a third of their own performance errors, such as a new version that ran slower. Closed models missed about one in eleven. For anyone picking a model for this kind of work, the choice matters more than the tool around it, though the study cannot fully separate the two.

We would rate this at level II on our readiness scale: benchmarked. It uses a public suite and named models, and its scoring can be checked. The paper links no released code, tasks or logs, so it does not yet reach level III.

The rest of the article (what it means, limits, what to watch) is free for members: https://scienceunderway.com/articles/claude-and-gemini-coding-agents-beat-expected-speed-limits-on-cuda-kernels

## How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

---
Source: Science Underway, https://scienceunderway.com/. Please link to the article when you cite it.
