libr4d, arch/gemma4_bf16: the four-rank all-reduce by message size, and the 31B's junction fold to 16 rows

The four-rank exact all-reduce picks its transport and block count by message size, for every
tp-4 model; the four-rank fused junction gains its tail form (the two-shot with the junction after
it), which the 31B takes up to 16 rows. Carries rmsnorm_quant_i8's register form until that PR
merges.

Squashed from:

- libr4d: the four-rank all-reduce's fold a word at a time, 16-row standalone all-reduces on the two-shot, counters in L2
- libr4d: the standalone four-rank all-reduce takes the exact two-shot from 32768 elements
- libr4d: the four-rank exact all-reduce's two-shot takes 2 blocks at a DFlash2 verify, not 4
- libr4d: the all-reduce rows' nblocks axis offers 2 and 4
- libr4d: rmsnorm_quant_i8 at decode heights loads the row's operands before its reductions
- libr4d: the four-rank fused junction's tail form -- the two-shot with the junction after it
- arch/gemma4_bf16: the four-rank fold up to 16 rows, on libr4d's tail form

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AshlynandClaude Opus 5.5 authored and StillDeadcode committed 2026-10-21 09:47:23 +02:00
1 parent 51db508f91
commit 239da14d17
9 files changed
+375 -50

No files matched your search

+6
View File
@@ -2152,6 +2152,12 @@ one rounding to bf16), so it is byte-identical to `all_reduce` + `rmsnorm_quant_
sends (ranks - 1) times the message a rank, so it is for decode heights; above them a caller
issues the pair, whose `all_reduce` goes two-shot.
From 5 to 32 rows (the `tail` axis, on by default) the four-rank row takes a third form: the
standalone exact two-shot over words, on the blocks the standalone `all_reduce` takes for that
message, with the junction as its tail -- one more block a row, which waits on a card-local count
of the transport blocks (no cross-card handshake), acquires, and runs `rmsnorm_quant_i8`'s row at
its own width. The bytes are the pair's; the launch the junction would take is saved.
## Vocabulary edges
| op | params | operands |