Triton is a language and compiler for writing efficient deep-learning primitives in Python, installable from pip with GPU backends for NVIDIA and AMD.
Overview
Triton provides a programming environment to author custom deep neural network compute kernels with higher-level productivity than raw CUDA while remaining flexible compared with some domain-specific alternatives. It includes a compiler pipeline built on MLIR and LLVM targeting modern GPUs.
Stable releases install from pip with prebuilt wheels for supported CPython versions. Documentation covers tutorials, Python APIs, language semantics, and lower-level MLIR dialect references, plus an interpreter mode that can run kernels without a GPU for learning and debugging.
The project supports NVIDIA GPUs above a stated compute capability threshold and AMD GPUs on recent ROCm releases, with CPU support described as under development. Linux is listed among supported platforms for deployment and development containers exist for consistent environments.
Kernels can include patterns such as back-to-back matrix multiplies used in attention-style workloads. Extensive environment variables and knobs expose compiler debugging, autotuning output, caching, and override hooks for advanced development.
Key features
- Python-based kernel language
- MLIR and LLVM compilation stack
- Pip-installable stable releases
- GPU interpreter without hardware
- NVIDIA and AMD GPU targets
- Autotuning and compiler debug hooks
- Conference and tutorial materials
Use cases
- Writing custom DNN GPU kernels
- Prototyping attention-style matmul chains
- Learning GPU programming via tutorials
- Debugging kernels with interpreter mode