We gave a coding agent a CUDA skill and measured what happened
Same agent, same four KernelBench problems, twice: once with a custom cuda-kernel-super skill, once without. The full text of the pilot, with the complete narrated walkthrough embedded below.
The narrated 4:32 walkthrough of the whole pilot, with burned-in subtitles.
The question
KernelBench (ScalingIntelligence's public benchmark) asks an agent to write a CUDA kernel from a problem statement and scores it against a PyTorch reference with an allclose gate (rtol 1e-2, atol 1e-2). The question we cared about is narrow: does a well built "CUDA super skill" make a coding agent measurably better at this job, or does it just make it more confident?
The experiment
One agent (Amp), four KernelBench problems, two conditions, eight independent runs:
- Softmax, 4096×393216 fp32, memory bound
- Square matrix multiplication, 4096×4096 fp32, compute bound, cuBLAS baseline
- Sum reduction over dim 1, 128×512×4095 fp32, memory bound
- GEMM + bias + scale + LeakyReLU, 1024×8192, fusion
The "plain" runs got no skill. The "skill" runs got cuda-kernel-super, a skill assembled from three open source bodies of knowledge: KernelFlow's optimization methodology, KernelBench's evaluation contract, and NVIDIA kernel guidance. We then added what no source had: machine truths measured on the target GPU (sm_120 architecture flags, Triton autotune timeouts, the measured bandwidth ceiling).
The hardware is an RTX 5080 Laptop, 16 GB, running under a 55 W power cap inside WSL2, torch 2.14.1+cu130. That constraint shaped everything.
The measurement discipline
At 55 W the GPU throttles dynamically: we observed SM clocks as low as 180 MHz, and the identical softmax reference measured 55.9 ms in one session and 716.7 ms in another. Same GPU, same kernel, 12.8× spread. Two consequences:
- Every score comes from a serial evaluator that interleaves reference and candidate reps in one loop (medians of 100 reps), zeroing a 256 MB buffer between reps to flush the L2 cache. Sequential A-then-B timing is banned; it lies on a throttled GPU.
- The metric is only ever the speedup ratio. Raw milliseconds do not travel across sessions on this machine.
Correctness was gated on two seeds with fresh inputs, with a reward-hacking rule in both prompts: no caching, no hard-coded outputs.
The results
| Problem | Plain agent | With skill | What won |
|---|---|---|---|
| Square matmul (compute bound) | 1.43× | 2.81× | fp16 tensor-core GEMM, fp32 accumulate, no extra conversion epilogue |
| GEMM + LeakyReLU (fusion) | 1.71× | 3.69× | fp16 GEMM + one fused Triton epilogue for bias, scale and activation; fastest kernel of the pilot |
| Softmax (memory bound) | 0.95× | 0.80× | parity; the 540 GB/s wall decides |
| Sum reduction (memory bound) | 0.79× | 0.97× | parity at the bandwidth limit |
Mean speedup among scored runs: 1.22× plain vs 1.53× with the skill. At peak, the skill's matmul kernel does the same work in 36% of the reference's GPU time.
The numerics are worth a sentence. The winning matmul changes input precision to fp16 with fp32 accumulation: input rounding of 2⁻¹¹, the same structural error class as TF32, verified with ~180× margin against the per-element tolerance budget. That is not cheating under KernelBench's gate; it is exactly the reasoning the skill teaches: never hand-roll what cuBLAS does well, move precision under the tolerance gate, fuse the epilogue.
The wall
On the memory bound problems, the skill's agent measured the machine before optimizing: 540 GB/s of achievable linear read against a ~900 GB/s GDDR7 spec. torch.sum already saturates that wall. Nothing can win there, and the skill's stop rule (three consecutive attempts under 2% gain) stopped both agents from burning turns on an impossible target.
What the benchmark wrote back into the skill
A skill is only worth installing if the benchmark can change it. Three rules shipped into cuda-kernel-super during the pilot itself: interleaved A/B timing, clone once outside the clock (and profile realistic shapes), and a robustness rule: never manipulate global RNG state, and never patch a harness anomaly inside your own solution file; report it. The next agent inherits all three for free. That feedback loop, benchmark to failure to rule to skill, is the part we care about most.
