- Simdgroup matrix ops — 8×8 tiles distributed across the 32 lanes of a SIMD group, lowered to Apple Silicon’s hardware MMA units.
- Matrix-type ops — operations on regular Metal
floatNxMmatrix types (matmul, transpose, determinant).
MetalRuntime.device_capabilities().supports_simdgroup_matrix.
Simdgroup matrix ops
Operate onsimdgroup_float8x8 (or other element types). Each matrix is held
collaboratively in registers across the 32 threads of one SIMD group — they
are not addressable per-thread.
enigma.simdgroup_matrix_load(buf, elements_per_row, elem="float", rows=8, cols=8) -> IRValue
Load an 8×8 tile from a device buffer into a simdgroup matrix register.
enigma.simdgroup_matrix_store(matrix, buf, elements_per_row) -> None
Store a simdgroup matrix back to a device buffer.
enigma.simdgroup_multiply_accumulate(a, b, c) -> IRValue
Matrix multiply-accumulate: result = a * b + c. All operands and the result
are simdgroup matrices.
enigma.make_filled_simdgroup_matrix(value, elem="float", rows=8, cols=8) -> IRValue
Create a simdgroup matrix initialized with a scalar value (typically zero
for accumulator setup).
Example: single-tile GEMM
enigma.gemm
— it picks the simdgroup path automatically when the tile shape is 8×8×8.
Matrix-type operations
These work on regular Metal matrix types (e.g.float4x4), modeled as
multi-dimensional vector types in MLIR. They are useful for affine transforms
and small dense linear algebra inside compute kernels.
Construction of matrix-typed values is currently blocked on a dialect-side
mat_make op. See docs/blocked-features.md in the repo for status.