Decoded
Feed

CAKE: Compiler-Agent Co-Design for Frontier Kernel Evolution

arXiv:2608.12629LG12 aug 20261 min readHN ×6PDF

Letting AI agents write GPU kernels in a checkable compiler language beats writing raw CUDA.

1.144x

tuned baseline

Best Flash-KMeans kernel speed

Same agent writing raw CUDA/PTX only reached 0.928x

How it works

  1. Agents get thin feedback

    Kernel agents see only errors, pass/fail and timing, so they can't tell which decision caused a hang or stall.

  2. Typed IR plus verifier

    Agents write Cake IR, an explicit schedule of warp roles, buffers and barriers. The compiler checks it and pinpoints problems.

  3. Faster kernels, less time

    Cake IR runs beat a tuned Triton baseline in half the evolve time. Agent-built Kimi Delta Attention runs 2.05x faster.

candidatesdiagnosticssurvivorsfailuresnew rulesbestTask specAgentwrites IRVerifier +cost modelGPUbenchmarkHarnessupdateGeneratedCUDA kernelcandidatesdiagnosticssurvivorsfailuresnew rulesbestTask specAgentwrites IRVerifier +cost modelGPUbenchmarkHarnessupdateGeneratedCUDA kernel
From the paper