An intermediate representation (IR) is a compiler form between a Triton kernel’s Python source and its final GPU code. Inspecting successive forms helps reveal how the compiler transforms the kernel, particularly when investigating performance problems or unexpected behavior. section 2.3.2
Triton exposes compilation outputs including:
- Triton IR and Triton GPU IR. section 2.3.2
- LLVM IR, PTX assembly, and the final binary. section 2.3.2
Retrieve compiled forms
After launching a kernel, access its compiled representations through `compiled.asm`, a dictionary keyed by stage names such as `ttir`, `ptx`, and `cubin`. section 2.3.2
Figure 2.11 Programmatic access to all compiler stages for a Triton kernel and the corresponding file outputs produced after compilation
See how Triton’s compiler stages correspond to files produced after compilation. section 2.3.2


