Mojo function
tc_reduce
tc_reduce[in_type: DType, simd_width: Int, //, out_type: DType](val: SIMD[in_type, simd_width]) -> SIMD[out_type, 1]
Performs tensor core based reduction on a SIMD vector.
Note: Dispatches to either scalar or vector reduction implementation based on SIMD width. Supports various input/output type combinations using tensor core operations.
Parameters:
- in_type (
DType
): The input data type of the SIMD vector elements. - simd_width (
Int
): The width of the SIMD vector. - out_type (
DType
): The output data type for the reduced result.
Args:
- val (
SIMD[in_type, simd_width]
): Input SIMD vector to reduce.
Returns:
Scalar containing the reduced result.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!