Codex Auto-Research: 232x Faster GPU QR Kernel
Original: Auto-research with codex: How I achieved a 232x Faster Kernel
Why This Matters
Demonstrates that LLM-driven auto-research loops can achieve competitive GPU kernel performance at scale.
A developer used OpenAI's Codex in an automated research loop to achieve a 232x speedup over baseline in GPU Mode's batched QR decomposition contest, placing 12th out of 183 participants. The approach relied on iterative agent-driven kernel development using the popcorn CLI.
GPU Mode, in collaboration with Core Automation, hosted an auto-research contest requiring participants to implement batched square compact-Householder QR factorization matching the output of torch.geqrf(). Submissions were ranked by geometric mean runtime across matrix shapes including 512×512, 1024, 2048, and 4096 sizes.
The author, competing in their first serious auto-research attempt, used OpenAI's Codex to iteratively develop and benchmark CUDA kernels. GPU Mode provided the popcorn CLI, enabling agents to test, benchmark, and submit results directly to the leaderboard — making the problem well-suited to automated research workflows.
Key techniques included applying the blocked Householder algorithm to minimize serial work, using FP16/FP8 precision internally while satisfying FP32-accuracy checks, and introducing idea diversity to escape local optima. The author described iterative 'breakthrough' moments in kernel performance, driven by Codex-generated implementation hints and continuous benchmarking feedback from the contest checker.
The final result was a 232x speedup over the baseline, securing 12th place out of 183 participants. The author notes the approach is broadly applicable to similar GPU kernel optimization problems where agent-friendly tooling and fast feedback loops are available.