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

enqueue_apple_matmul

def enqueue_apple_matmul[in_type: DType, c_type: DType = DType.float32, transpose_b: Bool = False, elementwise_lambda_fn: Optional[def[dtype: DType, width: Int, *, alignment: Int = 1](IndexList[2], SIMD[dtype, width]) capturing -> None] = None](c: TileTensor[c_type, address_space=c.address_space, linear_idx_type=c.linear_idx_type, element_size=c.element_size], a: TileTensor[in_type, address_space=a.address_space, linear_idx_type=a.linear_idx_type, element_size=a.element_size], b: TileTensor[in_type, address_space=b.address_space, linear_idx_type=b.linear_idx_type, element_size=b.element_size], ctx: DeviceContext)

Enqueue the Apple M5 matmul kernel on the given device context.

Accepts row-major TileTensor operands. For transpose_b=True, B is expected with shape (N, K).

Raises:

If the attached GPU is not Apple M5 (compute_capability != 5). M1-M4 lack GPU neural accelerator; future generations require re-validation.