Inside the Omokage Framework: How Coding Agents Optimize GPU Kernels

The sandbox framework Omokage reveals the real behavior and model stratification of coding agents in GPU kernel optimization.
The paper introduces Omokage, a sandbox-based inspection framework for evaluating general-purpose coding agents on GPU HPC kernel optimization. Testing 28 models on an NVIDIA B300 GPU across Claude Code, Antigravity, Codex, and OpenCode, it ports 30 PolyBench kernels from serial C to CUDA with no budget limit. Using isolated execution, hidden ground truth, deterministic verification, LLM-assisted bug reproduction, and trace analysis, it measures performance via roofline bounds and numerical correctness. Frontier models lead: Gemini 4 Neon reaches 2.0x and Opus 5.5 reaches 1.6x the roofline bound, while the best open-source model, Kimi K3, reaches only 0.32x.
Coding agents are steadily making inroads into performance engineering, but most existing evaluations only report end-to-end speedups under a fixed budget and rarely dig into how agents actually optimize code. A recent paper introduces Omokage — a sandbox-based inspection framework for evaluating general-purpose coding agents on GPU high-performance computing (HPC) kernels. The study tested 28 models on an NVIDIA B300 GPU, covering Claude Code, Antigravity, Codex, and OpenCode, porting 30 PolyBench kernels from serial C to CUDA with no budget limit.

Evaluation Methodology: Sandbox Isolation and Rigorous Verification
The core of Omokage's design is an isolated execution environment, hidden ground truth, and a combination of deterministic verification and LLM-assisted bug reproduction, along with analysis of the code and execution traces left behind by agents. The study measures performance along two dimensions: first, comparison against roofline bounds verified by the researchers; second, validation of floating-point solutions using higher-precision references and exact validation of integer solutions. This design moves evaluation beyond "is it fast?" to answering "why is it fast?" and "where did it fall short?"
This fine-grained observation approach helps reveal agents' decision-making patterns during optimization, rather than just final scores.
The Roofline model is an analytical tool in high-performance computing for determining the upper bound of kernel performance. It plots operational intensity (floating-point operations per byte of memory access) on the horizontal axis and achievable floating-point performance on the vertical axis, drawing two boundary lines for memory-bandwidth limits and compute peak limits, which intersect to form a "roof" shape. If a kernel's actual performance falls below the boundary, there is still room for optimization; if it approaches or reaches the boundary, it means the hardware's theoretical limit has been approached. The "2.0x the roofline bound" mentioned in this article means that the kernels generated by the agent exceeded the theoretical upper bound estimated by the researchers for that kernel, which typically means the agent changed the algorithm itself (e.g., reducing computational complexity) rather than merely writing an implementation closer to the hardware — this is precisely why the researchers use roofline as a reference frame to measure "optimization depth."
PolyBench is a widely used benchmark suite containing dozens of computational kernels from fields such as linear algebra, data mining, and physics simulation, commonly used in compiler optimization and performance portability research. This paper selects 30 of these kernels and provides serial C reference implementations, requiring agents to rewrite them as CUDA versions, thereby testing automatic parallelization and kernel tuning capabilities on real GPUs.
Model Performance: The Gap Between Frontier and Open-Source Models
The test results show a clear stratification. Gemini 4 Neon reached a geometric mean of 2.0x the roofline bound, Opus 5.5 reached 1.6x, while the best-performing open-weight model, Kimi K3, reached only 0.32x. Frontier models were able to exceed the bound through unprompted precision reduction with precision recovery, temporal blocking, and algorithmic changes. Each of the three flagship models changed the algorithm on up to five kernels.
You may not have noticed that Neon is stronger at algorithmic optimization, while Opus 5.5 excels at kernel optimization targeting hardware characteristics. This difference shows that different models have different emphases in optimization strategies, and it cannot be simply summarized as "who is stronger."
Optimization Behavior Analysis: Modeling, Loops, and the Unexpected Profiler Findings
Trace analysis shows that quantitative performance modeling and the "hypothesis-implement-verify" loop consistently co-occur in the four large Claude models and Gemini 4 Neon. However, unlike traditional performance engineering workflows, most models rarely use the profiler even when it is enabled, and the frequency with which kernels get faster after using the profiler is roughly equal to the frequency with which they get slower. This finding is quite counterintuitive — the profiler is a sharp tool for performance engineers, but agents appear not to use it effectively.
Temporal blocking is a classic loop optimization technique: when the data size exceeds on-chip cache or shared memory capacity, the computation is divided into multiple stages along the time dimension so that each stage's working set can reside in high-speed storage, thereby reducing repeated access to global memory or external storage. Unlike spatial blocking (tiling along data dimensions), temporal blocking typically requires reorganizing the loop nest order across multiple time steps, making it harder to implement, and it serves as a marker of whether an optimizer truly understands data reuse patterns.
A Profiler is an analysis tool in performance engineering (such as Nsight Compute, nvprof) that can collect hardware counter metrics such as instruction throughput, memory access hit rates, and occupancy of kernels to help locate bottlenecks. In traditional workflows, engineers profile first and then optimize accordingly; however, the trace analysis in this paper shows that agents rarely proactively invoke the profiler even when granted profiler access, and after invocation, the probability of performance improvement and degradation is comparable, indicating that they have not yet learned to effectively translate profiling data into optimization decisions.
Significance and Limitations
The value of the Omokage framework and these findings goes beyond model rankings themselves. They can help performance engineers, practitioners, and model developers understand where coding agents succeed and where they still fall short. For teams hoping to introduce agents into HPC kernel optimization, this research provides a reusable evaluation methodology and concrete behavioral insights.
However, the study also exposes the limitations of current agents: there is a significant gap between open-source and frontier models, the effectiveness of profiler use is unstable, and the coverage of algorithm-level optimization remains limited. Solving these problems requires joint efforts from model developers and performance engineers.
One-line Summary
The sandbox framework Omokage reveals the real behavior and model stratification of coding agents in GPU kernel optimization.
Paragraph Summary
The paper introduces Omokage — a sandbox-based inspection framework for evaluating general-purpose coding agents on GPU high-performance computing kernel optimization. The study tested 28 models on an NVIDIA B300 GPU, covering Claude Code, Antigravity, Codex, and OpenCode, porting 30 PolyBench kernels from serial C to CUDA with no budget limit. The framework measures performance along two dimensions — roofline bounds and numerical correctness — through isolated execution environments, hidden ground truth, deterministic verification combined with LLM-assisted bug reproduction, and trace analysis. Results show frontier models lead significantly: Gemini 4 Neon reaches a geometric mean of 2.0x the roofline bound, Opus 5.5 reaches 1.6x, while the best open-source model, Kimi K3, reaches only 0.32x. Frontier models can exceed the bound through precision reduction, temporal blocking, and algorithmic changes, and different models emphasize different optimization strategies.
Related articles

Jensen Huang Testifies Before Congress: Key Takeaways on Chip Export Controls
NVIDIA CEO Jensen Huang faces questioning from the U.S. House Foreign Affairs Committee on AI chip export controls, commercial interests, and national security.

Tencent WorkBuddy in Practice: Building an AI Automated Testing Workbench with SKILL Capabilities
Based on Bilibili creator Baili Yang's sharing, this article analyzes how Tencent WorkBuddy AI agent desktop workbench can be used for automated testing: the shift from AI-assisted to AI-led, the relationship among large models, agents, and SKILL capabilities, zero-configuration installation and permission control, and practical ideas for building a personal AI automated testing workbench.

Adding Authentication to Remix SaaS Apps: A Practical Guide to WorkOS AuthKit
Based on the official WorkOS AuthKit guide, this article covers the full approach to integrating authentication in Remix or React Router SaaS apps, including session management, protected routes, multi-tenant organizations, enterprise SSO, and SCIM sync, and analyzes its engineering value for SaaS teams.