Introducing Triton: Open-source GPU programming for neural networks
OpenAI
TL;DR
On July 28, 2021, OpenAI released Triton, an open-source language and compiler for custom GPU kernels. The problem it targets is practical: neural-net code built only from framework operators creates a lot of temporary tensors, and writing a fused CUDA kernel by hand is slow and easy to get wrong. Triton lets the author write the kernel at a higher level.
Why it matters
Fast training and inference often depend on kernels that are specific to one model, not on another generic library call. CUDA can express those kernels, but few researchers will maintain them. Triton sits in that gap. It became one of the common ways to write fused GPU code for PyTorch without dropping all the way to hand-scheduled CUDA.
Key takeaways
- Framework-only implementations often pay for extra memory traffic from temporary tensors.
- Specialized kernels fix that, and they are difficult to write correctly.
- OpenAI's release extends Triton, whose original author was by then at OpenAI, and publishes it for neural-network workloads.
- The aim is kernels that are competitive with expert CUDA while the source stays closer to a tile-level program than to per-thread microcode.
- The post is an engineering release, with the language and compiler as the artifact, not a new model.
…we have found them to be either too verbose, lack flexibility or generate code noticeably slower than our hand-tuned baselines.