Triton → CUTLASS → CuTe-DSL
Triton → CUTLASS → CuTe-DSL
Kernel engineering in 2025-2026 has transitioned from hand-written CUDA C++ toward declarative and high-level DSL frameworks.
OpenAI Triton
Triton allows writing high-performance GPU kernels in idiomatic Python. The programmer writes code at the granularity of block tiles rather than individual threads. The Triton compiler handles intra-block scheduling, memory coalescing, and shared memory allocation automatically.
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)
tl.store(output_ptr + offsets, x + y, mask=mask)CUTLASS & CuTe
NVIDIA CUTLASS 3.x is structured around CuTe: a C++ template library that unifies data layouts, coordinates, and hierarchical tensor tiling through mathematical layout algebra: \[ ext{Layout} = ( ext{Shape}, ext{Stride})\]