Decoded
Feed

AI as a Compiler: Compiling Triton kernels without the Triton compiler

arXiv:2609.36800AI29 sep 20261 min readHN ×2PDF

An LLM agent writes GPU assembly straight from Triton code, sometimes beating Triton's own compiler.

3.34×

speedup

Best speedup over autotuned Triton

Gained by decoding packed binary weights directly into Tensor Core operands

How it works

  1. Compilers are costly

    Every new GPU feature needs hand-written lowering passes across several intermediate representations, which are slow to build and maintain.

  2. LLM writes PTX directly

    An agent generates PTX from Triton source. It is tested, profiled, and patched in loops until the budget runs out.

  3. Parity to 3.34× faster

    Generated kernels range from 0.83× to 3.34× of Triton speed. The biggest wins come from tricks Triton never attempts.

candidateif correctNCU metricspatchesbudget doneTritonkernelLLMgenerates PTXTestcorrectnessBenchmark+ profileDiagnose,patchBesteligible PTXcandidateif correctNCU metricspatchesbudget doneTritonkernelLLMgenerates PTXTestcorrectnessBenchmark+ profileDiagnose,patchBesteligible PTX
From the paper