Skip to main content

Module reduce

Module reduce 

Source
Expand description

Reduction algorithms

Structs§

SumAutotuneKey
Autotune key representative of sum versions

Enums§

KernelReduceStrategy
Select a strategy to perform a reduction.
SumStrategy
Select a strategy to perform a sum.

Functions§

autotune_reduceautotune
Executes autotune on reduce operations.
autotune_sumautotune
Executes autotune on reduce operations.
init_reduce_output
Creates an empty output tensor with the proper shape and decreasing strides to reduce the given axis of input or return None if axis is out-of-bound.
reduce
Reduce all elements of the input tensor using the instruction Rd and the given Strategy.
reduce_dim
Reduce the given axis of the input tensor using the instruction Rd and the given Strategy.
sum
Specialize reduce function to compute the sum of all elements of the input tensor and return the value into a single-element tensor of shape 1 x 1 x 1 x ... with the same rank as input.
sum_fallback
Sum with fallback when client doesn’t support atomic add for the type E.