warp.tile_scan_max_inclusive#

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

Return a new tile containing the inclusive prefix maxima 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.

Element i of the result is the maximum of input elements 0 through i. Comparisons follow C fmax semantics. A multi-dimensional tile is scanned over its flattened row-major sequence and the result keeps the input shape. On CUDA, this operation reserves a tile’s worth of shared memory (see Shared Memory Budget).

Parameters:

a – The input tile, with dtype warp.float32, warp.int32, or warp.uint32.

Returns:

A register tile with the same shape and dtype as a.

See tile_scan_inclusive() for a usage example.