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 module

utils

Provides shared CPU matmul utilities including tile-consumer traits, kernel shape selection, and partial SIMD load/store helpers.

comptime values​

elementwise_compute_lambda_type​

comptime elementwise_compute_lambda_type = def[dtype: DType, width: SIMDLength, *, alignment: Int = Int(1)](IndexList[Int(2)], SIMD[dtype, width]) capturing thin -> SIMD[dtype, width]

elementwise_epilogue_type​

comptime elementwise_epilogue_type = def[dtype: DType, width: SIMDLength, *, alignment: Int = Int(1)](IndexList[Int(2)], SIMD[dtype, width]) capturing thin -> None

Structs​

  • ​GemmShape: Helper class to unpack gemm dimension and layout.
  • ​InnerKernelID: Identifies the inner matmul kernel variant selected for a target.
  • ​KernelConfig: Static configuration of the matmul inner kernel.
  • ​MicroKernelShape: Record describing the inner kernel shape.
  • ​NullTileConsumer: No-op TileConsumer. Used as the default when no fusion is requested, and as the placeholder type when a kernel's tile_consumer Optional is None.
  • ​NullTileOperation: No-op TileOperation sentinel: parallel to NullTileConsumer. Used as the default TileOperationType so kernels without a fused op compile without callers having to spell out a placeholder.
  • ​SubMatmulConfig: Static configuration of sub-matrices in parallel matmul.

Traits​

  • ​TileConsumer: Trait for an epilogue operation which consumes a tile of data.
  • ​TileOperation: Non-terminal counterpart to TileConsumer: mutates a tile in place between MMA and store. Composes additively with capability subtraits like AuxLoading for ops that need pre-loaded data.

Functions​

Was this page helpful?