01 SME · outer product
FMOPA
z0.s runs down the rows, z1.s runs across the columns, and each product is added into the ZA tile.
fmopa za0.s, p0/m, p1/m, z0.s, z1.s
Types: z0.s, z1.s — 32-bit float, 4 lanes each; za0.s — a 4 × 4 tile of them. Drawn at SVL = 128 bits; at SVL = 512 the same picture is 16 lanes and a 16 × 16 tile.
p0/m
z0.s
p1/m
z1.s
za0.s
Ready. The tile still holds the values it had before this FMOPA.
Arrow keys step, space plays or pauses (step-by-step view).
This browser prefers reduced motion. Play still runs the instruction, and the tile jumps straight to the result.
Reading the picture
-
Outer product, then add
For each row i and column j the instruction does ZA[i, j] += z0.s[i] × z1.s[j]. It accumulates. It does not wipe the tile first. Lanes are numbered from 0.
-
Predicates
p0/m governs rows, one lane for each element of z0.s. p1/m governs columns, one lane for each element of z1.s. The tile element changes only when both lanes are active; otherwise /m leaves it as it was. Click a predicate bit to switch that lane off and watch it happen.
-
Why 4×4
za0.s names one of the four ZA tiles — the tile number is an immediate in the encoding, not a register, so the operand is simply za0.s…za3.s. Drawn at a streaming vector length of 128 bits, a .s vector has four lanes and a .s tile is 4×4.
-
On real hardware
FMOPA accumulates in single precision with rounding, and it is one instruction: every active pair is multiplied and added in the same step. This page uses small integers so every value stays exact and readable.
This pass uses z0.s = {1, 2, 3, 4} and z1.s = {2, 1, 3, 1}.