Verba/Rapida

Experiments #lrx2

Redesign after [mac lrx1] (over): the row-exact multi-row qmv at rps 2 with each lane's packed word loaded...

queued

What was tested

Redesign after [mac lrx1] (over): the row-exact multi-row qmv at rps 2 with each lane's packed word loaded once and its masked halfwords extracted once per block for the 3 rows, every row keeping one-row qmv's operation sequence; must 0.944 ms a verify joined (1.042 as parts) over lrx1's rps 2 to reach 0.48 ms; identity gate and lrx1's microbench and lines; cost sheet 2026-12-02-lrx2-load-once (settled build); LESTO row/lrx2 6089b89e (`MLX_LESTO_QMV_ROWS_LOAD_ONCE`), the AIR of its kernels read beside the verdict; full lane (`rlrx2_job.sh`, about 6 M4 minutes after the build)

Model and setup

C14

Expected gain

none (a microbench; a pass queues C14's identity and speed row)

Where the idea came from

`2026-11-30-mac-lrx1-row-exact-rows/README.md` § Pre-registration: row [mac lrx2]

Outcome

queued 2026-11-30 (lanes-fix helper for config-board); built 2026-12-02 (LESTO row/lrx2 6089b89e, 3 rounds); build lablrx2b ok 02:58:26, `rlrx2_job.sh` lock 02:58:29, RLRX2_DONE ok 03:02:14 M4 clock; done 2026-12-02 03:02: over, rx3_lo +1.365 ms a verify joined over C9's lanes, 0.060 ms below rps 2, identity passed, the unpack hoisted in the AIR; cause not established, check row [mac lrx2k] (README § Result, row [mac lrx2])

Lesson

sharing each packed halfword's load, masks and converts across the 3 rows (confirmed hoisted in the AIR) saves only 0.06 ms of the multi-row qmv's +1.42 ms a verify over C9's lanes, so the per-row unpack is not what makes it slow; the excess over one-row qmv (+7 to +30 us a call) has another cause, and copies per row in the AIR do not price a kernel.

Adopted

no (C14's verify on this kernel lands below C0; nothing served changes).

Want to see what these experiments produced? Lesto, the Gemma 4 inference engine for Apple silicon Macs, is on lestoengine.com

Made by Federico Andrioli, @fedeandri on X A research lab's own measurements, generated from its files. Data built