DSL-Monkeys: Self-Generated In-Context Examples for Low-Resource GPU DSL Kernels
Nathan PaekSGSimon GuoVSVishnu SarukkaiWilly ChanWilliam HuEthan Boneh
Simran Arora
Ludwig Schmidt
Kayvon Fatahalian
Azalia Mirhoseini Nathan Paek
SGSimon Guo
VSVishnu Sarukkai
Willy Chan
William Hu
Ethan Boneh

Simran Arora

Ludwig Schmidt

Kayvon Fatahalian

Azalia Mirhoseini
+10
DSL-Monkeys is a batched, test-time approach for GPU DSL kernel generation that treats a collection of tasks jointly rather than individually. It maintains a growing archive of successfully implemented kernels and retrieves them as in-context demonstrations for remaining tasks, resembling test-time reinforcement learning by curating a retrieval database instead of updating weights. Starting from only 3 seed examples, it achieves 71% and 18% correctness on 200 KernelBench Level 1-2 tasks for TileLang and ThunderKittens respectively, versus baselines below 20% and 1%. With curriculum decomposition, it solves complex linear attention variants approaching human-expert Triton performance, and with 10K GitHub PyTorch programs it produces thousands of verified DSL implementations, with fine-tuning improving Qwen's TileLang ability.

OpenReview · February 7, 2026