MXFP4 decode rows: review fixes and docs

The parts of the series' review rounds that concern these rows, carried over when the series was
split:

- gemm_mxfp4a8_decode: the 64-wide slab is chosen by the split the launch runs (a pin or a tuned
  point included), as before the register kernel; the header states the split-row bound the rule
  applies (ks*M = 1024).
- r4d_selftest: the priority order of the MXFP4 rows is checked (gemv / gemv_wide over decode,
  decode_shortk over gemv_wide, decode over tiled); gemv_wide's numeric cases at K 256 and at 56
  rows; the M-invariance check names the decode_shortk corner it does not cover.
- Comments: gemv_wide's two-tile condition (N >= 4096, K >= 3072, an even tile count), the
  decode_shortk corner's bit change at M = 33, decode_shortk in the list of rows whose state is
  keyed on the output.
- libr4d/README.md: the rows by row count, with the measurements behind each band;
  docs/TOOLS.md: r4d_selftest and its --perfmxd mode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
mici81andClaude Opus 5.5 authored and StillDeadcode committed 2026-10-24 11:09:03 +02:00
1 parent 40d205929a
commit fb880cbc2d
6 files changed
+140 -14

No files matched your search

+2 -1
View File
@@ -13,7 +13,8 @@
// Two forms, chosen from K alone so that a row's output bits do not depend on how many rows the
// step carries (a verify step's first row is bit-identical to a plain decode of it):
//
// - K a multiple of 128: the WMMA form. One 16-column tile a block (two from 25 rows), eight waves on
// - K a multiple of 128: the WMMA form. One 16-column tile a block (two from 25 rows where N >= 4096,
// K >= 3072 and the tile count is even), eight waves on
// its K in chunks of one 128 block, and up to four 16-row tiles (M <= 64), each weight word
// multiplied with every row tile's fragment once it is loaded. A lane loads its own B-fragment word of each k-step straight
// from the fragment-order weight (the order is the fragment's), the rows sit in the A fragments