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

+5
View File
@@ -357,6 +357,11 @@ void r4d_cfg_mxfp4_tiled(const RadArgs*, struct R4dMxTileCfg*);
void r4d_cfg_mxfp4_decode(const RadArgs*, struct R4dMxDecCfg*);
void r4d_cfg_split (const RadArgs*, struct R4dSplitCfg*);
void r4d_cfg_ar (const RadArgs*, struct R4dArCfg*);
/* Whether the four-rank fused junction takes its tail form from 5 rows (the row's `tail` axis). */
int r4d_cfg_ar_tail(const RadArgs*);
/* The four-rank exact one-shot's size, in elements, from which it takes the exact two-shot instead
* (0: never); the all-reduce rows' `ts_min` axis. */
long r4d_cfg_ar_ts_min(const RadArgs*);
void r4d_cfg_topk (const RadArgs*, struct R4dTopkCfg*);
void r4d_cfg_mv (const RadArgs*, struct R4dMvCfg*);
/* rmsnorm_quant_i8's decode form: 1 the row's operands in registers before the reductions, 0 the