warp.tile_max#

warp.tile_max(
a: Tile[Scalar, tuple[int, ...]],
) → Tile[Scalar, tuple[Literal[1]]]#
  • Kernel: true
  • Python: false
  • Differentiable: false

Compute the maximum of all elements of a tile.

This is a cooperative operation: the threads of the block divide the work between them, so every thread must reach the call.

The reduction covers every element of a regardless of its rank. Floating-point comparisons follow C fmax semantics: a NaN element is treated as missing.

Parameters:

a – The tile to reduce. Must have a scalar element type.

Returns:

A shape-(1,) register tile holding the maximum. Read the value with [0].

See tile_min() for an analogous usage example.