gemma4: the w4a8 decode step through the fused norm/quant ops

Between two w4a8 blocks the stream ran five single-row dispatches
(post-norm, add, layer scalar, norm, quantiser), q, k and v quantised the
same norm output three times, the attention prologue was five more ops
and down's input two. Now every junction is one rmsnorm_quant_i8 (at two
ranks on the exact wire ar_rmsnorm_quant_i8, with the all-reduce in it),
q, k and v read one int8 pair, the prologue is qkv_norm_rope and down's
input gelu_mul_quant_i8. The trunk pass at k=3 goes from 1786 to 840
dispatches.

Byte-identical to the unfused step: greedy output equal at k=0 and k=3.
A kernel set without an op keeps that op's chain; RADIANCE_G4_FUSE=0
keeps every chain, for an A/B against the same build. arch_test checks
the issued op sequence fused, at two ranks, and with the ops refused.
This commit is contained in:
keptn42 committed 2026-10-11 02:24:21 +00:00
1 parent bdb50b2a9c
commit 191972eb75
3 files changed
+322 -39

No files matched your search

+2 -1
View File
@@ -1860,7 +1860,8 @@ run a second time on the same inputs, to ask whether a kernel is a function of t
instruments, not features; grep `getenv` if you need one, and read the comment beside it first.
`libr4d` keeps the same culture under `R4D_DIAG` (master switch for selection/store/hidden-state
traces), `R4D_VERIFY_ATTN` and `R4D_VERIFY_OFF` (device kernels recomputed on the host and diffed),
and `RADIANCE_TRACE_RESID` (an arch-side residual ring); all default off.
`RADIANCE_TRACE_RESID` (an arch-side residual ring) and `RADIANCE_G4_FUSE=0` (Gemma 4's decode
step on the unfused chains, an A/B for the fused ops); all default off.
---