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_clamp_chain

def enqueue_apple_matmul_clamp_chain[in_type: DType, c_type: DType = DType.float32](c: TileTensor[c_type, Storage=c.Storage, address_space=c.address_space, linear_idx_type=c.linear_idx_type], a: TileTensor[in_type, Storage=a.Storage, address_space=a.address_space, linear_idx_type=a.linear_idx_type], b: TileTensor[in_type, Storage=b.Storage, address_space=b.address_space, linear_idx_type=b.linear_idx_type], ctx: DeviceContext)

Enqueue the clamp_v2 ragged-edge, 2-pass chained-accumulate dense GEMM (NN only). Pass 0 zero-seeds and covers the first half of K's strips; pass 1 seeds from c and covers the rest, overwriting c with the final result. No partials buffer, no separate reduce kernel.

Caller guarantees c_type == float32, no elementwise_lambda_fn, transpose_b == False, m >= BM, n >= BN, and k % block_k == 0. Re-asserted here (debug_assert) since violating them walks the shifted A/B/C pointers out of their buffers' allocations.

Was this page helpful?