triton.experimental.gluon.language.sum
- triton.experimental.gluon.language.sum(input, axis=None, keep_dims=False, dtype: constexpr = None)
Returns the sum of all elements in the
inputtensor along the providedaxisThe reduction operation should be associative and commutative.
- Parameters:
input (Tensor) – the input values
axis (int) – the dimension along which the reduction should be done. If None, reduce all dimensions
keep_dims (bool) – if true, keep the reduced dimensions with length 1
dtype (tl.dtype) – the desired data type of the returned tensor. If specified, the input tensor is casted to
dtypebefore the operation is performed. This is useful for preventing data overflows. If not specified, signed integer dtypes narrower than 32 bits are upcasted totl.int32, while unsigned integer and bool dtypes narrower than 32 bits are upcasted totl.uint32. Other dtypes are kept as-is.
This function can also be called as a member function on
tensor, asx.sum(...)instead ofsum(x, ...).