🏠 ESL - Engineering Software Lab KernelBench CUDA Skill A/B Pilot · RTX 5080 Laptop
Technical program brief · 01

Does a CUDA super skill make the coding agent measurably better at GPU kernels?

A controlled A/B benchmark of the same agent model with and without a custom cuda-kernel-super skill, on KernelBench problems, executed end to end on one RTX 5080 Laptop GPU: the measured evidence and the honest verdict

AmpAmp (ampcode.com) · the agent under test
ESLESL · skill design, hardware, scoring
Experiment
4 problems × 2 conditions

One base model, one serial evaluator, every run preserved on disk

Peak result (skill)
2.81×

fp16 tensor-core GEMM vs fp32 cuBLAS reference, 4096×4096

GPU time saved at peak
64%

less GPU time per matmul with the skill's fp16 tensor-core kernel (2.81×)

Daniel Liezrowice
Daniel Liezrowice CTO, ESL - Engineering Software Lab

Embedded software consultancy, Parasoft and Perforce partner in Israel for over 20 years. This brief documents the ESL KernelBench agent skill pilot.

linkedin.com/in/liezrowice
Engineering Software Lab Ltd. · 10 November 2026 · Every number in this deck was measured on the documented hardware; the harness, solutions, and scoring scripts are all on disk and reproducible. Charts are inline SVG plotted from the recorded values.
The question · 02

Three candidate benchmarks, one runs on this laptop

The selection criterion was brutal and simple: the benchmark must execute on a 16 GB consumer Blackwell GPU in WSL2 without renting cloud silicon

BenchmarkWhat it evaluatesBaseline hardwareRuns on RTX 5080 Laptop?
KernelBench (ScalingIntelligence)Agent writes optimized CUDA/Triton kernels from PyTorch references; fast_p metric = correct and fasterAny local GPU; published runs on RTX 3090Yes · selected
NVIDIA SOL-ExecBench235 production kernel problems scored against B200 roofline (SOL-Score)B200, SM clocks locked 1500 MHzHarness runs locally, but SOL-Score normalization is B200-specific; relative-only locally
NVIDIA SWE-Serve53 SWE-style tasks from SGLang: 41 GPU inference-serving tasks, 12 CPU tasksH100 80 GBNo · 16 GB VRAM cannot hold the serving workloads
Pilot design

KernelBench, subset, both conditions

4 problems spanning the performance regimes: memory-bound reduction (Softmax, sum reduction), compute-bound GEMM (square matmul), and a Level-2 fusion chain (GEMM + multiply + LeakyReLU).

Metric contract

fast_p simplified: correct and faster

A solution scores only if it passes allclose(rtol=1e-2, atol=1e-2) on multiple seeds against the PyTorch reference; the reported number is the median speedup ratio.

Benchmark triage from the maintainer documentation of all three projects; selection made before any code was written.
The machine · 03

One consumer Blackwell GPU, one WSL2 host, zero cloud

Everything ran on the laptop the pilot owns: the same machine that browses email also compiled and timed every kernel

GPU
sm_120

NVIDIA GeForce RTX 5080 Laptop, Blackwell, 16 GB GDDR7, 55 W power cap (80 W default); this detail shapes the whole methodology

Stack
13.2

Host driver 595.71 / CUDA 13.2; toolkit CUDA 12.8 at /usr/local/cuda-12.8; WSL2 kernel 6.6

Runtime
2.14.1

torch 2.14.1+cu130 on Python 3.10 (KernelBench pins ==3.10.*), built with uv sync, ~6.6 GB of wheels

Environment bring-up, measured
  • uv venv --python 3.10 + uv sync: 22 min, dominated by the CUDA wheel set
  • load_inline first compile per extension: 30-90 s (nvcc, arch=compute_120,code=sm_120)
  • Build cache ~/.cache/torch_extensions makes later iterations near-instant; the skill teaches agents to keep CUDA source stable to reuse it
The constraint that defines the methodology

At a 55 W cap the GPU dynamically throttles: SM clocks observed as low as 180 MHz, and the reference softmax measured 55.9 ms in one session and 716.7 ms in another. Sequential A-then-B timing is worthless on this machine; the pilot's protocol uses interleaved ref/candidate timing to cancel it (slide 09).

Environment facts from nvidia-smi, nvcc --version, and the recorded uv sync logs on 9-10 November 2026.
The intervention · 04

The super skill: three sources fused into one loop

cuda-kernel-super did not exist; no CUDA optimization skill was installed. It was built the morning of the pilot from researched public material plus machine-specific truths

  KernelFlow cuda-kernel-optimizer (MIT, GitHub)      KernelBench eval methodology (ICML '25)
  · ncu-driven profile → optimize → verify loop        · task contract: same Model.__init__/forward,
  · roofline gap analysis (Δc / Δm / Δl)                 same shape, same dtype
  · SASS verification of claimed optimizations         · 2-seed allclose(rtol=1e-2, atol=1e-2) gate
  · per-method ablation attribution                    · anti-reward-hacking stance
                └──────────────┬──────────────────────────────────────┘
                               ▼
              ┌─────────────────────────────────────────────┐
              │  cuda-kernel-super  (SKILL.md + reference/  │
              │  + pitfalls + bundled scripts/bench.py)     │
              └─────────────────────────────────────────────┘
                               ▲
  Machine-specific truths (none of the sources had these)
  · arch flag compute_120/sm_120 (a silent failure otherwise)
  · interleaved ref/cand timing (the 55 W throttle)
  · Triton autotune timeouts; TORCH_CUDA_ARCH_LIST="12.0"
What was deliberately left out

Hugging Face cuda-kernels (HF Hub packaging, irrelevant to KernelBench), NVIDIA TileGym (cuTile-DSL only), and KernelFlow's heavyweight orchestration scripts (geared to optimizing an existing kernel with fixed dims, not writing one from a problem statement). The skill keeps the methodology, not the machinery.

Skill anatomy

SKILL.md (workflow, contract, checklist) + reference/techniques.md (bottleneck → technique catalog with CUDA snippets) + reference/pitfalls.md (failure modes that waste turns) + scripts/bench.py (the honest evaluator itself ships with the skill).

Skill sources: KernelFlow-ops/cuda-optimized-skill (MIT), ScalingIntelligence/KernelBench docs, and measurements taken on this machine during setup.
Inside the skill · 05

The technique catalog: bottleneck first, cleverness second

The skill forces an analysis step before any code: classify the op's regime, compute the roofline, and only then pick techniques in expected-impact order

BottleneckDiagnosticTechniques, in order
Bytes moved (memory-bound)element-wise, norms, reductions; ceiling = bytes / ~900 GB/s1. fuse the op chain · 2. coalesce + vectorize (float4) · 3. shared-memory staging with bank-conflict padding · 4. __ldg / read-only path · 5. warp-shuffle reductions
Math throughput (compute-bound)large GEMM/conv; ceiling = tensor-core TFLOPS1. tiled matmul in shared memory · 2. mma.sync / TF32 or fp16 tensor cores, fp32 accumulate · 3. cp.async K-tile pipelining · 4. occupancy repair (--ptxas-options=-v) · 5. or: stay on cuBLAS and fuse the epilogue instead
Launch overhead (tiny kernels)runtime ≈ 2-5 µs per launchmerge kernels · precompute in __init__ · CUDA graphs only for static sequences
The stop rule

Iterate one technique per edit, re-verify, re-benchmark. Stop at 10-20% from the roofline, or after three consecutive attempts gain under 2% (the noise floor). This rule exists because the throttling makes endless micro-tuning a trap.

Roofline, this machine

The skill quotes ~900 GB/s GDDR7 as the spec ceiling. The skill-condition agent later measured 540 GB/s achievable linear read under the throttle; the skill's numbers are spec sheets; the pilot's numbers are the machine (slide 10).

Catalog adapted from KernelFlow's optimization references (MIT) with sm_120-specific corrections measured on this GPU.
The protocol · 06

A/B: one model, two conditions, one serial evaluator

Both conditions are the same base model instantiated as subagents of the same thread; nothing differs except access to the skill

  KernelBench problem (reference Model + get_inputs + fixed shapes)
        │
        ├──▶ Condition NOSKILL: plain task prompt
        │         └─▶ agent run ──▶ pilot/<problem>/noskill/model_new.py
        │                                    │
        └──▶ Condition SKILL: same prompt          │
              + "read and follow                  │
               cuda-kernel-super first"           │
                    └─▶ agent run ──▶ pilot/<problem>/skill/model_new.py
                                                    │
                                                    ▼
              ┌────────────────────────────────────────────────────────┐
              │ SINGLE SERIAL EVALUATOR (bench.py, one scoring session)│
              │  1. two-seed correctness, allclose(1e-2, 1e-2)         │
              │  2. L2 cache flushed (256 MB zero_) between reps       │
              │  3. ref and candidate INTERLEAVED, medians of 100 reps │
              └────────────────────────────────────────────────────────┘
                                    │
                                    ▼
              speedup = ref_ms / cand_ms   (ratio only; slide 09 explains why
                                           absolute milliseconds do not travel)
Why one wave at a time

The two agents of a wave run in parallel but their self-timing shares the GPU; final scores are always produced serially afterward, never from an agent's own claim. Agent self-timings are recorded only as corroboration.

Anti-gaming

Two seeds with fresh inputs, a reward-hacking rule in both prompts ("no caching, no hard-coded outputs"), and an evaluator that reseeds before each model construction.

Protocol as executed 9-10 November 2026; every run's solution file and self-report are preserved under /home/danie/KernelBench/pilot/.
Results · 07

Speedup by problem and condition, one scoring session

Median speedup vs the PyTorch reference, bench.py final harness, 100 interleaved L2-flushed reps. All scores from a single session on 10 November 2026

NOSKILL (plain agent)SKILL (cuda-kernel-super)- - parity with PyTorch reference
4.0x3.0x2.0x1.0x0x 0.95 0.80 Softmax memory-bound 1.43 2.81 Square matmul compute-bound · cuBLAS baseline 0.79 0.97 Sum reduction memory-bound 1.71 3.69 GEMM+LeakyReLU Level 2 fusion
Below 1.0x means the agent's kernel lost to the PyTorch reference. On the memory-bound problems that is the expected outcome at this throttle: torch already saturates the achievable ~540 GB/s. On the fusion problem the skill's fp16 tensor-core pipeline is the fastest kernel of the pilot at 3.69x.
Raw JSON from bench.py, one session: 0.9511 / 0.8019 / 1.4327 / 2.8082 / 0.7901 / 0.9726 / 1.7124 / 3.6874 speedups.
Results · 08

Correctness histogram: every scored kernel inside the gate

Max absolute deviation from the reference for each scoring run, on a log10 axis. The gate is allclose(rtol=1e-2, atol=1e-2); every bar left of 10⁰ passes with margin

43210 1e-121e-101e-8 1e-61e-41e-21e01e2 232 runs per decade of max abs diff; all bars green: passed the gate
Runs: softmax 2.7e-12 and 1.4e-12 (Triton/CUDA fp32 exact-path), sum reduction 0.0022 and 0.0044, matmul 0.055 (fp16 inputs) and 0.757 (TF32), GEMM+LeakyReLU 0.0011. Every pass has ≥ 3x margin; the fp16 matmul has ~180x margin against its per-element budget.
Reading the left edge

The two softmax kernels differ from the reference by ~10⁻¹²: bit-level agreement on a numerically hard op, because both reimplemented the same online-softmax rescaling in fp32.

Reading the middle

The 10⁻²-to-10⁻¹ bars are tensor-core runs: TF32 and fp16 input rounding. Legal, they pass the gate, and the skill's tolerance-margin analysis (diff 0.055 against a per-element budget of ~10) is exactly the reasoning that keeps them honest.

Verified, not claimed

Every scored run was verified on two seeds with fresh inputs; no solution caches outputs or hard-codes results. The gate plus fresh inputs is what makes the speedup numbers on the previous slide trustworthy.

Values from bench.py max_abs_diff fields, one scoring session, 10 Nov 2026.
Measurement reality · 09

Trend chart: the same reference kernel, three sessions, a 12x swing

Median time of the identical softmax reference across scoring sessions. Absolute milliseconds do not survive this machine; ratios do. This is why the pilot's metric is the speedup ratio and nothing else

800 ms533 ms267 ms0 ms 55.9 630.5 716.7 253.3 253.7 agent sessionpause-evalpause-evalresume evalresume eval 9 Nov 10:199 Nov 10:409 Nov 10:5510 Nov 07:3010 Nov 07:35
Median ms of torch.softmax on the identical problem, five scoring runs across two days, no kernel change between any of them. The 630-717 ms cluster predates the final measurement harness and was measured under 55 W throttling; 253 ms is the final harness; 55.9 ms was the agents' healthier-clock session. Same GPU, same kernel, 12.8x spread.
Methodological consequence

Speedup ratios from interleaved reps stayed in a narrow band across all of this (0.80-1.25x on softmax across sessions); raw milliseconds moved 12x. Cross-session comparisons of absolute time on this machine are meaningless, and any benchmark protocol that does not control for it produces fiction.

Data from the scoring log; timestamps are WSL2 local time.
Roofline · 10

Bandwidth reality: why both agents tied torch on the memory-bound problems

The skill-condition agent measured the machine before optimizing: pure linear read bandwidth under throttle. That single number explains the softmax and sum-reduction results

9006003000 GB/s ~900 spec (GDDR7) 540 measured linear read, throttled torch.sum / custom both ≈ at the wall
Roofline arithmetic from the skill agent's sum-reduction report: 8.59 GB input, isolated-kernel mins 15.3 ms (ref) vs 15.5 ms (kernel), both ≈ 530-540 GB/s.
What follows

When the ceiling is bandwidth and the reference already touches it, no kernel technique wins. The 0.79x-0.97x scores on memory-bound problems are not agent failures; they are the machine refusing to be beaten at parity. The skill's stop rule (three attempts under 2% → stop) prevented both agents from burning turns on an impossible target.

Where wins live

Compute-bound problems are a different story: torch's fp32 SGEMM leaves 2-3x on the table for any solution that may change input precision under the tolerance gate. That is where both conditions' only >1.4x results came from.

540 GB/s: skill agent measurement, 10 Nov 2026. Spec ~900 GB/s: RTX 5080 Laptop GDDR7 class. Achieved TFLOPS on matmul under throttle: ~12.4 (noskill agent measurement).
Verdict · 11

Measured answer: the skill buys peak speed where physics allows it

Same model, same problems, same evaluator. The difference the skill makes is not uniform; it is concentrated exactly where its guidance has something to say

Mean speedup, correct solutions
1.53×

skill condition (3 runs) vs 1.22x noskill (4 runs)

Fastest kernel of the pilot
3.69×

fp16 tensor-core GEMM with fused bias + scale + LeakyReLU epilogue

Largest scored effect
2.81×

fp16 tensor-core GEMM with fp32 accumulate: the skill's "don't hand-roll against cuBLAS; change precision under the tolerance gate; fuse the epilogue" path

Where the skill did NOT help

Memory-bound problems: both conditions scored 0.79-0.97x against references that already saturate the throttled 540 GB/s. The skill cannot repeal the roofline; it correctly told its agent to stop trying (the stop rule), which saved turns, not milliseconds.

What the pilot wrote back

Three rule changes shipped into the skill during the pilot itself: interleaved timing, profiling hygiene, and a robustness rule (slide 12). The next agent inherits them for free.

Verdict restricted to what was measured: 4 problems, 1 model, 1 GPU, 1 scoring harness. It is a pilot-sized experiment, not a leaderboard claim.
Closing the loop · 12

Skill v1.1: the pilot wrote back into the skill

A skill is only worth installing if the benchmark can change it. Three changes shipped while the pilot was still running

ChangeTriggerWhere it lives now
Interleaved timing rule: never time A fully before B; alternate reps, compare mediansSmoke test showed identical code at 0.65x; both wave-1 agents independently hit the same wallSKILL.md §Benchmark honestly + bench.py itself
Clone once, outside the clock; realistic-shape profilingSkill agent proved the timed region was 94% memcpy on 8.6 GB inputsbench.py + pitfall material
Pitfall #15: never manipulate global RNG state; report harness anomalies, never patch them in the solutionRobustness review of the fusion runreference/pitfalls.md
The pattern

Benchmark → failure → rule → skill. Each iteration is cheap (one pitfall, one paragraph), which is the same economy the ESL zero-program applies to MISRA fixes: versioned, reviewable units of improvement, not one-off patches.

Unchanged by design

The technique catalog needed no edits: every technique it recommends was either used by a winning run or correctly deprioritized by a stop rule. The catalog predicted the matmul result before the pilot ran it.

Skill files: /home/danie/KernelBench/.agents/skills/cuda-kernel-super/: SKILL.md, reference/techniques.md, reference/pitfalls.md, scripts/bench.py.
Reproduce · 13

Everything is on disk and re-runnable

No cloud, no secrets, no lost state: the pilot is a directory tree plus one venv

  Repo            /home/danie/KernelBench            (KernelBench clone, main)
  Environment     /home/danie/KernelBench/.venv      (Python 3.10, torch 2.14.1+cu130)
  Skill           /home/danie/KernelBench/.agents/skills/cuda-kernel-super/
  Solutions       /home/danie/KernelBench/pilot/<problem>/{noskill,skill}/model_new.py
  Resume state    /home/danie/KernelBench/pilot/STATE.md
  Progress log    Amp artifact: KernelBench CUDA skill A/B pilot (rev 6)

  # score any solution the way this deck did
  /home/danie/KernelBench/.venv/bin/python \
    /home/danie/KernelBench/.agents/skills/cuda-kernel-super/scripts/bench.py \
    --ref KernelBench/level1/1_Square_matrix_multiplication_.py \
    --cand pilot/matmul/skill/model_new.py --reps 100

  # next experiments the data points to
  · re-run the fusion skill condition with pitfall #15 in place (expect: correct, ~3.7x)
  · rescore both conditions in a fixed-clock session (plugged in, locked power)
  · extend to Level 3 full-model problems where fusion compounding shows up
Paths as deployed on the WSL2 host; Windows view via \\wsl.localhost\<distro>\home\danie\KernelBench.
Executive summary · 14

The skill doubles the win where speed is real

One glance: the same agent, with and without the CUDA skill, scored by one honest evaluator

Peak speedup
2.81×

with the skill, vs 1.43× plain: the fastest kernel of the pilot

GPU time saved at peak
64%

less GPU time per matmul with the skill's tensor-core kernel (2.81×)

Average speedup (correct runs)
1.53×

with the skill vs 1.22× plain; compute-bound gain roughly doubles

ProblemPlain agentWith CUDA skillReading
Square matmul (compute-bound)1.43×2.81×skill doubles the GPU-time saving
GEMM + LeakyReLU (fusion)1.71×3.69×fastest kernel of the pilot; its working practice is now a rule in the skill
Softmax (memory-bound)0.95×0.80×parity; the hardware wall decides, not the agent
Sum reduction (memory-bound)0.79×0.97×parity at the 540 GB/s bandwidth limit
Bottom line

Where GPU time costs money (compute-bound kernels), the skill roughly doubles the agent's speedup, up to 2.81× (64% less GPU time). Where the reference already saturates memory bandwidth, nothing wins. Every lesson of the pilot is already built into the skill, so the next run starts ahead.

All numbers: single scoring session, 10 November 2026, RTX 5080 Laptop (55 W), 100 interleaved L2-flushed reps per comparison, two-seed correctness gate per run.
Thank you · 15

Seed it, split it, measure it, and let the benchmark write back

The pattern generalizes beyond CUDA: one question, two conditions, one honest evaluator, and every lesson becomes a rule the next run starts with

Benchmark

KernelBench
github.com/ScalingIntelligence/KernelBench

The skill

cuda-kernel-super
KernelFlow methodology + KernelBench contract + machine truths

The evidence

Pilot artifact, rev 6
all scores, reports, and decisions

Daniel Liezrowice
Daniel Liezrowice CTO, ESL - Engineering Software Lab

Embedded software consultancy, Parasoft and Perforce partner in Israel for over 20 years.

linkedin.com/in/liezrowice
ESL - Engineering Software Lab · eswlab.com · Contact ESL · All measurements 9-10 November 2026 on the documented RTX 5080 Laptop / WSL2 host.
← Swipe to navigate →