CALCULATE · INSPECT · COMPARE
Blocked multiplication: inspect the traversal order
Keep the arithmetic fixed and change the order in which matrix tiles are visited.
On narrow screens, scroll the diagram horizontally or focus it and use the arrow keys to inspect full-size labels. Exact values follow below.
Your experiment
Compare block sizes 1, 2 and 3 with unchanged inputs. The final matrix and number of multiply-accumulates must agree. Scrub the intermediate steps: tile order and partial sums can differ. Edge tiles are clipped to the actual dimensions.
Play inspects the entire calculated trace over 60 seconds at 1×. Use 0.5× for two minutes, pause, or step through individual operations. Restart preserves your inputs. Changing a model input rebuilds the calculation without autoplay.
What the calculation means
The loop nest visits output-row, output-column and reduction tiles, then their scalar entries. Logical reads are two operand reads per term; they are not cache misses. No cache capacity, line size, eviction policy, SIMD, threads or hardware latency is simulated.
Matrix values at this step
Canvas and tables round labels for readability. The inspector preserves full JavaScript number values.
Full-precision operation inspector
A bounded mathematical teaching model. Playback measures inspection time, not computation or training latency. No model weights are downloaded; no external inference, storage or training is performed. Read the official AICassindra articles.
Blocked Matrix Multiplication: Exact Traversal: experiment guide
This experiment computes the product Y = XW and reveals the scalar operations in a blocked traversal. Input rows sets the number of rows of X and Y. Input width sets the shared reduction dimension, which is the number of columns of X and rows of W. Output width sets the number of columns of W and Y. Matrix fixture seed creates reproducible small integer arrays. Generated input scale multiplies X but leaves W unchanged. Tile edge length selects the extent of row, output-column and reduction tiles. Dimensions need not be divisible by the tile size: the final tile is clipped to each actual array boundary.
Worked details 1
The optional Input matrix JSON editor accepts an array of rows matching Input rows and Input width. Every entry must be a finite number between negative one hundred and one hundred. Supplying JSON overrides the generated X, so Generated input scale is intentionally inactive for that input; clearing the editor restores generated values. The seed still determines W even when X is supplied explicitly. Changing dimensions with a populated editor requires a matching matrix shape. Invalid JSON, wrong dimensions or excessive values produce an explicit error and disable playback. The displayed arrays and full-precision inspector contain the exact inputs used by the calculation, rather than an illustration unrelated to the controls.
Worked details 2
At the initial settings, X is [[-2,3,1],[3,-3,2]] and W is [[-1,-3],[-3,3],[3,0]]. The completed output is [[-4,15],[12,-18]]. For example, Y at row zero, column zero is (-2 times -1) plus (3 times -3) plus (1 times 3), giving -4. There are twelve multiply-accumulates, twenty-four logical operand reads and twelve accumulator writes. These are scalar operation counts; the counter does not include a hardware read of the old accumulator. Each highlighted operation exposes its two operand coordinates, output coordinate, previous accumulator and added term. The ordinary tables and JSON inspector provide numerical alternatives to the canvas highlights.
Worked details 3
Keep the initial dimensions, seed and scale fixed and compare tile sizes one, two and three. Their final output and arithmetic counts agree, while the traversal visits twelve, two and one tiles respectively. The reduction width three with tile edge two exercises a partial edge tile. Inspect intermediate frames to see which output entries accumulate first. Set Generated input scale to zero with an empty editor: every output becomes zero while the same operations are still performed. Enter [[1,0,0],[0,1,0]] in the editor: the output must equal the first two rows of W. Changing scale now leaves that explicit input unchanged, which demonstrates the override rather than a broken control.
Worked details 4
Play reveals the precomputed operation trace over sixty teaching seconds. Pause freezes it; Next operation advances one frame; Restart returns to the initial zero-output frame while preserving parameters. Speed offers quarter, half, normal and double speed. Inspection seeks directly and pauses. Editing an input rebuilds the history without autoplay. The full-precision inspector can be expanded to inspect all matrices and counters at any frame. This is an executable traversal and arithmetic model, not a hardware cache simulator: it has no cache lines, capacity, eviction, prefetching, vector instructions, bandwidth or measured CPU latency. Fewer tiles do not establish fewer misses or a speedup. Real floating-point kernels may also reorder reductions differently; this bounded fixture uses JavaScript numbers and exposes its specific operation order.