Running maximum of array elements along a single dimension along with
the index of the last occurrence of the running maximum.
At output position j, the values output is max(input[1:j]) and the
indices output is the largest i in 1:j with
input[i] == values[j] (last-occurrence tiebreak).
Arguments
- operand
(
arrayish)
Arrayish value of any data type.- dim
(
integer(1))
Dimension along which to accumulate.
Value
list of two arrayish values:
The running maximum (same dtype as operand) and the
running argmax (dtype i32, 1-based). Both have
the same shape as operand.
StableHLO
Lowers to a variadic stablehlo::hlo_reduce_window() over (values, iota).