pub fn reduce_dim<Run: CubeRuntime>(
input: CubeTensor<Run>,
output_dtype: Option<DType>,
dim: usize,
strategy: KernelReduceStrategy,
config: ReduceOperationConfig,
) -> Result<CubeTensor<Run>, ReduceError>Expand description
Reduce the given axis of the input tensor using the instruction Rd and the given Strategy.
Return an error if strategy is Specific(strategy) and the specified strategy is not supported by the client.
Also returns an error if the axis is larger than the input rank or if the shape of output is invalid.
If there is no error, the output is a tensor with decreasing strides where the shape of reduced dim is set to 1 but all shape are similar to the input.