Matrix Tiling and Arithmetic Intensity
Reuse blocks of matrices within faster memory and compare operation count with the traffic of one tile update.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A tile repeats work on the same inputs
For \(C\gets C+AB\), a square tile product of side \(b\) executes roughly \(2b^3\) floating-point operations if a multiply and add count separately. Each of the two input tiles contains \(b^2\) elements. If the output tile is kept resident across many products, those inputs may be reused \(b\) times each before transfer. Keeping an input tile in memory across updates depends on traversal order and capacity.
Tiling changes movement while preserving the mathematical result
A block update must accumulate every inner-dimension tile into the correct output tile. Edge tiles with smaller dimensions need boundary handling. Reordering accumulation can affect floating-point reproducibility even when real-arithmetic formulas agree. Tile size must also account for cache sets and the needed live tiles. Cache capacity and reuse explain the working set. The Roofline model uses arithmetic intensity at a chosen boundary to predict a throughput ceiling.[1][2]