LLM code generation agents fail at GPU optimization because treating CUDA compilers as opaque black boxes deprives the model of hardware scheduling feedback. When agents only receive runtime errors and benchmark timers, they struggle to reason about warp synchronization, register pressure, and shared memory pipelines.
CAKE solves this bottleneck through compiler-agent co-design. Instead of producing unstructured CUDA or PTX, the agent writes CAKE intermediate representation, a typed schedule abstraction that explicitly exposes warp roles, memory movement, and synchronization primitives. The compiler harness acts as an active verification partner, providing localized diagnostics, cost modeling, and evolving verification rules derived from recurring failure modes.
On an NVIDIA B200 GPU, CAKE synthesized kernel candidates that outperformed the tuned FlashML baseline by 1.144x under an eighty million token exploration budget. Applied to Kimi Delta Attention, the framework delivered a 2.05x geometric-mean speedup over official FlashKDA while passing strict serving validation tests.
Giving autonomous agents hardware-explicit abstractions beats asking them to guess raw assembly.









