Instruction lab
simd-anim
A small static lab that animates real SIMD and SME instructions — then shows how they compose into kernels, and what decides a kernel's speed.
New to matrix multiply? Take the optional self-check
Instructions
One page per instruction, each animating the data it moves.
-
01
SME · Live
FMOPA
Outer product of z0.s and z1.s, accumulated into a 4×4 ZA tile.
Play this instructionfmopa za0.s, p0/m, p1/m, z0.s, z1.s
-
02
SVE · Live
Vector load / pack
Bring memory into a Z register, lane by lane, then pack those lanes.
Play this instructionld1w { z0.s }, p0/z, [x0]
-
03
SVE · Live
FMLA
A fused multiply-add along a predicated vector.
Play this instructionfmla z0.s, p0/m, z1.s, z2.s
-
04
SME · Live
Store
Write one horizontal slice of a ZA tile back to memory.
Play this instructionst1w { za0h.s[w12, 0] }, p0, [x0]
-
05
SVE · Live
WHILELT
Turn scalar bounds into a predicate: lane i is active while x0 + i < x1.
Play this instructionwhilelt p0.s, x0, x1
-
06
SVE · Live
ADDV
Collapse the active lanes of a vector into one scalar sum.
Play this instructionuaddv d0, p0, z0.s
-
07
SVE · Live
UZP1
Deinterleave: the even elements of two vectors gather into one.
Play this instructionuzp1 z0.s, z1.s, z2.s
-
08
SVE · Live
Gather load
Each lane reads the word its own vector index selects — duplicates included.
Play this instructionld1w { z0.s }, p0/z, [x0, z1.s, sxtw #2]
-
09
SME2 · Live
FMLAL
Half-precision operands, single-precision tile: a widening multiply-add with an indexed vector.
Play this instructionfmlal za.s[w11, 4:5], z0.h, z1.h[2]
-
10
SME · Live
ADDHA
One vector lands in every active row of the ZA tile.
Play this instructionaddha za0.s, p0/m, p1/m, z0.s
-
11
SVE · Live
TBL
Each lane picks any element of an eight-entry table — out of range gives zero.
Play this instructiontbl z0.s, { z1.s, z2.s }, z3.s
Kernels
Instructions composed into a whole that computes.
Strategy
The machine-level ideas — how data supply, reuse and latency decide what a kernel can reach.
-
01
Hardware · Live
The hardware
A register, the ZA tile, and the compute unit — three names every other page uses.
Open this pageZ · ZA · ×+
-
02
Performance model · Live
Roofline
Why reuse, not just FLOPs, decides speed — the memory wall in one picture.
Open this pageperformance = min(peak, supply × intensity)
-
03
Cache choreography · Live
Memory in flight
Prefetch and store traffic across two kernels, level by level — and the one slot where HBM reads and writes collide.
Open this pagepldl2keep / pldl1strm / stnt1w — across kernels
Words this lab uses
The four abbreviations, spelled out once so no page has to repeat them.
- SVE
- Scalable Vector Extension — the vector half of the ISA, where the z registers and p predicates come from.
- SME
- Scalable Matrix Extension — adds the ZA matrix accumulator and the outer-product instructions (fmopa, addha, st1w).
- SVL
- Streaming vector length — how many bits one vector holds, fixed by the hardware; 128 in every drawing here.
- ZA
- The SME matrix accumulator — the square tile that fmopa accumulates into and st1w writes back to memory.