liveBook · Manning

Tl.argmax

As explained in GPU Programming with Triton

tl.argmax is a Triton operation that returns the index of a maximum value along a tensor dimension.

`tl.argmax` returns the index of a maximum value along a tensor dimension. Its axis refers to a dimension of the tile held by one Triton program instance, not the full global tensor; it does not reduce across program instances. section 4.1.2

How GPU Programming with Triton covers it

How deep it goes
Defines tile-local reduction scope and distinguishes it from grid-wide reduction, without detailing argmax implementation.
Examples
Illustrates reduction axes with a one-dimensional tensor reduced along axis 0 to a scalar.
What it assumes
Builds on Triton’s tile-based program-instance model and explains how reduction axes refer to tile dimensions.
What you can do after
Understand that `tl.argmax` operates within a program instance and cannot combine values across the launch grid.
How it connects
Connects `tl.argmax` to `tl.max`, `tl.argmin`, and Triton’s block-based programming model.

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.