4 ms·
>extensive manual tuning I was surprised by how little low-level knowledge it took to get within a stone's throw of the theoretical peak. The general rule see
by iskander 14y ago
>extensive manual tuning
I was surprised by how little low-level knowledge it took to get within a stone's throw of the theoretical peak.
The general rule seems to be:
- keep data in packed registers (use YMM instead of XMM if you have them)
- interleave addition and multiplication
- unroll the loop sufficiently to avoid stalls
I wonder if how close to ATLAS you could get if you wrote a matrix multiply following these principles and additionally structured the row/column iterations into cache-sized tiles.