Triton
1 program
Added 2026-02-09T19:30:00Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Triton-lang, OpenAI Triton
Provenance: commit aea407936a · authored 2026-02-09T19:46:11+01:00 · agent claude-code · model sonnet
Sources mentioning this language
2 sources · pl_id:
pl/tritonRelated languages
LLM-contributed programs
Vector Addition Kernel
Provenance: commit aea407936a · authored 2026-02-09T19:46:11+01:00 · agent claude-code · model sonnet · WebSearch disabled
import triton
import triton.language as tl
@triton.jit
def add_kernel(x_ptr, y_ptr, output_ptr, n_elements, BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(axis=0)
block_start = pid * BLOCK_SIZE
offsets = block_start + tl.arange(0, BLOCK_SIZE)
mask = offsets < n_elements
x = tl.load(x_ptr + offsets, mask=mask)
y = tl.load(y_ptr + offsets, mask=mask)
output = x + y
tl.store(output_ptr + offsets, output, mask=mask)
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)