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 struct

Inner_matmul_default

struct Inner_matmul_default

Generic CPU matmul microkernel using scalar FMA accumulation.

Implements InnerMatmulKernel for the fallback path used when no architecture-specific kernel (VNNI, NEON, I8MM) applies. Accumulates partial products from a packed B tile into a local SIMD register buffer and writes the result back to the C matrix with optional boundary checks.

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, InnerMatmulKernel, Movable

Methods​

__inner_matmul__​

def __inner_matmul__[kernel_rows: Int, kernel_cols: Int, simd_size: Int](self, c: TileTensor[Storage=c.Storage, address_space=c.address_space, linear_idx_type=c.linear_idx_type], a: TileTensor[Storage=a.Storage, address_space=a.address_space, linear_idx_type=a.linear_idx_type], b_packed: TileTensor[Storage=b_packed.Storage, address_space=b_packed.address_space, linear_idx_type=b_packed.linear_idx_type], global_offset: GemmShape, global_bound: GemmShape, tile_n_k: IndexList[Int(2)], skip_boundary_check: Bool)

Utility function on the inner loop. Run the inner kernel on the whole (kernel_rows, TileN, TileK) tile.

Parameters:

  • ​kernel_rows (Int): Number of rows in the microkernel tile along the M dimension.
  • ​kernel_cols (Int): Number of columns in the microkernel tile along the N dimension.
  • ​simd_size (Int): SIMD vector width used for packed B loads and accumulation.

Args:

Was this page helpful?