Matrix multiply unit

Also known as: matrix engine · MXU

On this page 7

A matrix multiply unit is a dedicated hardware block inside a processor that computes dense matrix multiply-accumulate operations, the form D = A times B plus C, in large tiles per clock cycle rather than one scalar or vector operation at a time. In AI hardware, it is the component that delivers most of a chip’s advertised tera-operations per second, because neural network training and inference reduce largely to matrix multiplication.

The term is used generically for any such engine and specifically as MXU, the name for the systolic matrix units in Google TPUs. Comparable blocks appear as Tensor Cores in NVIDIA GPUs, Matrix Cores in AMD Instinct accelerators, the AMX tile extension in Intel server CPUs and the matrix engines inside most mobile and PC neural processing units.

How a matrix multiply unit computes

A matrix multiply unit is built from a grid of multiply-accumulate cells. Each cell multiplies two operands and adds the product to a running sum, and the grid processes a whole tile of the output matrix in parallel. A unit with a 128 by 128 grid performs 16,384 multiply-accumulates per cycle, which equals 32,768 floating-point operations, because each multiply-accumulate counts as two.

Most designs follow one of two organizations. A systolic array, used in TPUs, streams operands through neighboring cells so that each value fetched from memory is reused many times without returning to a register file. A tensor-core style unit, used in GPUs, executes a small fixed-shape matrix instruction, for example a few dozen multiply-accumulates on 4 by 4 or 8 by 8 fragments, issued by many parallel threads. Both approaches aim to raise arithmetic intensity, the ratio of operations to bytes moved.

The table below lists the internal components that determine how a matrix unit behaves.

ComponentRoleDesign consequence
Multiply-accumulate arrayPerforms the arithmeticSets peak operations per cycle
Operand buffersHold input tiles near the arrayLimit data reuse and tile size
AccumulatorsKeep partial sums at higher precisionProtect accuracy in long sums
Data movement logicFeeds and drains the arrayDetermines achievable utilization
Format convertersHandle FP8, bfloat16 and integer inputsDefine supported precisions
Main components of a matrix multiply unit

Precision formats and throughput

Matrix multiply units gain much of their speed from low-precision arithmetic. Multipliers for narrow formats need far less silicon area and energy than 32-bit floating-point multipliers, so a chip can fit many more of them. A common pattern is mixed precision: inputs in bfloat16, FP16, FP8 or INT8, and accumulation in FP32 or INT32 to limit rounding error across long dot products.

As a rough rule, halving the input width roughly doubles peak throughput on the same unit, provided the hardware supports the format natively. Newer accelerators add FP4 and block-scaled microscaling formats, which share one exponent across a small group of values. The following table summarizes typical formats and where they are used.

Input formatTypical accumulatorMain use
TF32FP32Training without code changes
bfloat16FP32Mainstream training
FP16FP16 or FP32Training and inference
FP8FP32Large-model training and inference
INT8INT32Quantized inference
FP4 and microscalingFP32High-throughput inference
Typical input formats for matrix units

Matrix units compared with other compute blocks

A matrix multiply unit differs from scalar and vector units in how much work one instruction expresses. A scalar unit computes one result per instruction, a vector unit computes one result per lane, and a matrix unit computes a full tile of results with operand reuse built into the hardware. This reuse is why matrix units reach far higher operations per watt on dense linear algebra, and also why they are idle on code that is not matrix-shaped.

The comparison below places the matrix unit among the other compute blocks found on modern accelerators.

Compute blockWork per instructionBest suited to
Scalar unitOne operationControl flow, addressing
Vector or SIMD unitOne operation per laneActivations, normalization, softmax
Matrix multiply unitA full matrix tileDense layers, attention, convolutions
Special function unitTranscendental approximationsExponentials, square roots
Compute blocks in AI processors

Because operations such as layer normalization, softmax and elementwise activations still run on vector units, a model never spends all of its time in the matrix unit. Kernel fusion and careful scheduling keep the matrix unit busy while vector work overlaps.

Utilization and the memory wall

Peak matrix throughput is reached only when operands arrive fast enough. The roofline model expresses this limit: if a workload’s arithmetic intensity is below the chip’s ratio of peak operations to memory bandwidth, the matrix unit waits on memory. Large-batch training usually sits on the compute-bound side, while small-batch token generation in language models is often memory-bound, leaving matrix units underused.

Shape alignment matters as well. Matrix dimensions that are not multiples of the native tile size, often 8, 16, 64 or 128 elements depending on the chip, force padding and waste cycles. Typical sustained model FLOPs utilization in large training runs falls well below peak, commonly in the range of 30 to 60 percent, depending on model size, parallelism strategy and interconnect.

The table below links common symptoms to their causes and remedies.

SymptomLikely causeTypical remedy
Low utilization at small batchMemory-bound weight loadingBatch requests, quantize weights
Padding overheadDimensions off the native tileRound layer sizes to tile multiples
Stalls between layersUnfused vector operationsFuse kernels, overlap work
Poor scaling across chipsCommunication waitsOverlap collectives with compute
Causes of low matrix unit utilization

Design trade-offs and limitations

Larger arrays raise peak throughput but lose efficiency on small or irregular matrices, because a partially filled array still consumes time and power. Designers therefore balance array size against flexibility, and many chips use several medium arrays rather than one very large one. Sparse workloads benefit only when the hardware supports a specific pattern, such as 2:4 structured sparsity, which can double effective throughput on qualifying layers.

A further limitation is numerical behavior. Low-precision inputs require scaling and calibration, and accumulation order in hardware can make results differ slightly from a reference FP32 computation. Teams validating models across hardware should compare outputs against tolerance thresholds rather than expecting bitwise identical results.

Understanding it simply

Most of the math inside an AI model is multiplying large tables of numbers together. A matrix multiply unit is a part of the chip built to do only that job. It does it many thousands of times per clock tick.

Think of a factory line with one machine for every step of one task. It is very fast at that task and useless for others. The rest of the chip handles everything else. The matrix unit is why AI chips are so fast, but it only helps when it gets data quickly enough.

Applied in practice

An engineering team serves a 7-billion-parameter language model on a data-center accelerator and notices that the matrix units are busy for only a small share of each generation step. Profiling shows that with one request at a time, every new token reloads all model weights from high-bandwidth memory, so the step is memory-bound.

The team enables continuous batching of up to 32 concurrent requests and converts weights to FP8 with FP32 accumulation. Each weight load now feeds many more multiply-accumulates, and the smaller format halves the bytes moved. Total token throughput rises several times while per-request latency stays within the service target, and validation on a held-out prompt set shows output quality within the agreed tolerance of the bfloat16 baseline.