liveBook · Manning

Autotuning

As explained in GPU Programming with Triton

Autotuning is the process of evaluating alternative implementation configurations and selecting one based on measured performance.

Autotuning selects an implementation configuration by measuring alternatives. For Triton kernels, it can replace a hand-picked launch configuration with a supplied set of candidates. section 5.8.3

A Triton configuration combines tile sizes, warp count, and pipeline-stage count. The autotuner benchmarks the candidates when its key changes, then reuses the selected configuration for later launches with the same key. The first launch for a new key includes tuning work, so steady-state timing requires a warm-up. section 5.8.3

Tuning a matrix product

For C = AB, candidate tile sizes can suit different matrix shapes: a wide output may favor a wider N tile, while a small matrix may need smaller tiles to create enough GPU programs. Correctness tests and performance comparisons help assess the resulting kernel. section 5.8.3 section 5.10

How GPU Programming with Triton covers it

How deep it goes
Measures supplied tile, warp, and pipeline-stage configurations and reuses the winner by key, without detailing the search algorithm.
Examples
Compares matrix-product configurations across shapes, including tile choices for wide outputs and small matrices.
What you can do after
Apply Triton's autotune decorator to benchmark candidate configurations and reuse a selected setup for matching keys.
How it connects
Connects Triton launch configurations with matrix multiplication, tile sizes, warps, and software pipelining.

Also explained in

Compare how 2 books explain autotuning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of GPU Programming with Triton. The section links point to the parts of the book it draws on.