IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

naive_batched_matmul_kernel

def naive_batched_matmul_kernel[rank: Int, c_type: DType, a_type: DType, b_type: DType, CTensorType: TensorLayout, ATensorType: TensorLayout, BTensorType: TensorLayout, transpose_b: Bool = False, elementwise_lambda_fn: Optional[def[c_type: DType, width: SIMDLength, rank: Int, *, alignment: Int = Int(1)](IndexList[rank], SIMD[c_type, width]) capturing thin -> None] = None, accum_type: DType = get_accum_type[c_type]()](c_tensor: TileTensor[c_type, CTensorType, MutAnyOrigin], a_tensor: TileTensor[a_type, ATensorType, ImmutAnyOrigin], b_tensor: TileTensor[b_type, BTensorType, ImmutAnyOrigin], c_buff_nd_shape: IndexList[rank])

Computes one element per thread of a batched matrix multiplication using a naive scalar accumulation loop over the contraction dimension.

Parameters:

Args:

Was this page helpful?