For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
tc_reduce
def tc_reduce[in_type: DType, simd_width: Int, //, out_type: DType](val: SIMD[in_type, simd_width]) -> Scalar[out_type]
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[out_type]: Scalar containing the reduced result.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!