Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Triton

< >

Triton is a programming language created in 2021 by Philippe Tillet.

#377on PLDB 3Years Old
Download source code:
git clone https://github.com/openai/triton
HomepageSource Code

Triton is a language and compiler for parallel programming. It aims to provide a Python-based programming environment for productively writing custom DNN compute kernels capable of running at maximal throughput on modern GPU hardware.


Example from the web:
# This is a GPU kernel in Triton. # Different instances of this # function may run in parallel. @jit def add(X, Y, Z, N): # In Triton, each kernel instance # executes block operations on a # single thread: there is no construct # analogous to threadIdx pid = program_id(0) # block of indices idx = pid * BLOCK + arange(BLOCK) mask = idx < N # Triton uses pointer arithmetics # rather than indexing operators x = load(X + idx, mask=mask) y = load(Y + idx, mask=mask) store(Z + idx, x + y, mask=mask)

- Build the next great programming language Add About Search Keywords Livestreams Labs Resources Acknowledgements

Built with Scroll v144.0.0