Verba/Rapida

Esperimenti #115

Seam prologue (row 114's SEAM-ONLY verdict, `megakernel-114.md` option (c)): the two RMSNorm seams per...

done

Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.

Cosa è stato provato

Seam prologue (row 114's SEAM-ONLY verdict, `megakernel-114.md` option (c)): the two RMSNorm seams per layer (seam1 before the FFNs, seam2 before the next layer) recomputed inside every consumer threadgroup instead of one-threadgroup seam kernels on the critical path (seam1 7.9 us dependent against 3.9 overlapped, row 84k); bit-identical if every threadgroup sums the 2816 values in the seam kernel's order

Modello e configurazione

the best

Guadagno atteso

+2 to +3.5% (0.2 to 0.4 ms of 11.2, inferred from 60 seams x 4 to 8 us)

Da dove viene l'idea

kb114 seam-only verdict

Esito

done 2026-10-31: bit-exact (0 of 24.6M elements, engine check 0 differ), screen 40 of 40 identical but decode -1.18% (1k) / -1.49% (8k); split seam2 -0.90%, seam1 -0.28%; not adopted (README § Screen, row 115)

Lezione

removing the seam dispatches by recomputing each seam in every consumer threadgroup is lossless (40 of 40) but 1.2% to 1.5% slower on the M4: every threadgroup then serializes the seam's reductions before its own weight reads, and the idle-GPU prefetch that hid the separate seam is lost, so a removed dispatch level is not a saving when the work it held moves in front of every consumer's reads.

Adottato

no (screen).

Vuoi vedere cosa hanno prodotto questi esperimenti? Lesto, il motore di inferenza per Gemma 4 sui Mac con Apple silicon, è su lestoengine.com

Creato da Federico Andrioli, @fedeandri su X Le misure di un laboratorio di ricerca, ricavate direttamente dai suoi file. Dati aggiornati al