Expand description
Generic runtime-dispatch tiled GEMM kernel.
§Tiling policy selection
The tiling policy is selected solely from the runtime-dispatched
architecture A, not from a secondary hardware-detection pass. This
avoids a historical double-dispatch bug where AdaptiveDispatcher would
detect AVX-512 hardware and route the AVX2 kernel through TilingPolicy<3, 4> (17 live registers → spill on AVX2’s 16-register file, measured
30–60 % slower at 256²). The architecture parameter A already encodes
the correct register file width via A::LANE_COUNT.
A::LANE_COUNT | Register file | Tiling policy | Live registers |
|---|---|---|---|
| > 8 | AVX-512 (32 regs) | <6, 4> | 24+4+1 = 29 |
| > 1 | AVX2 (16 regs) | <3, 3> | 9+3+1 = 13 |
| > 1 | NEON (32 regs) | <3, 3> | 9+3+1 = 13 |
| 1 | Scalar | <1, 1> | 1+1+1 = 3 |