Skip to main content
The enigma.ops module provides higher-level operations built on top of the core DSL primitives.

GEMM

Computes C += A @ B over an M x N tile with K reduction. Call inside @enigma.kernel. Two lowering paths:
  • Simdgroup MMA (8x8x8): uses simdgroup_matrix_load / simdgroup_multiply_accumulate / simdgroup_matrix_store
  • Scalar fallback (any size): triple for_range with RegisterTensor accumulator

Quantization helpers

Pack / Unpack

Dequantize

Returns scale * (x - zero_point) as float. Useful for fused-dequant GEMM kernels.