Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ template <
for (short iq = 0; iq < TQ; iq++) {
STEEL_PRAGMA_UNROLL
for (short ik = 0; ik < TK; ik += 2) {
STEEL_PRAGMA_UNROLL
// Unrolling the head-dim loop by 4 rather than fully lets the
// compiler interleave the next K-tile loads with the running mma
// chain instead of hoisting all TD loads up front; measures +11%
// at head_dim 128 on M5 Max and is a no-op at head_dim 64 (TD == 4,
// already a full unroll).
#pragma clang loop unroll_count(4)
for (short id = 0; id < TD; id++) {
NAXTile<T, 1, 1> Qtile;
NAXTile<T, 2, 1> Ktile;
Expand Down