venc debug: trunk shadow + GN-extent/temporal discriminators; localize #14 video gap to spatial trunk

Adds a fourth R4D_ENC_SEL=all shadow — the norm_out INPUT (v_lv[5].a, level-5 trunk) as an
f32 PERSIST cast twin (b_vtrunk), via a new trailing RadVideoGenDecl field dbg_ve_trunk (no ABI
bump) + layout rows + a 4-readback "all" slab (trunk|nout|q48|q2). ref_venc_parity.py gains
--evctrunk (whole-volume vs per-frame GroupNorm discriminator) and --expand/--zeropad (single-frame
temporal tests).

Device-anchored golden comparison on a 256x256 image exonerates, one by one: input normalization
(byte-identical affine + IMAGENET consts), norm_out (faithful, relFro 1.6e-3), GroupNorm extent
(device already per-frame; #20 closed), temporal handling (reference frame0 std flat 8.986 at N=1..17
under both replication and zero-padding vs device 4.40), a single multiplicative gain (nout differs
0.57 non-affinely after per-group norm => structural), and weight precision. The gap is a structural
~0.49x spatial-trunk deviation (conv_in/resnet/spatial-downsample), NOT confined/golden-fixable, so it
is documented precisely and left open — no shared-kernel edit. Host tier green.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
gearwave00001andClaude committed 2026-10-19 17:55:36 -05:00
1 parent 2acc0261ff
commit 1dc850d17f
6 files changed
+440 -17

No files matched your search

+20
View File
@@ -999,6 +999,26 @@ typedef struct RadVideoGenDecl {
* body-scale gap between pre_block and mean_proj. Trailing since ABI 23 with the fields above. */
rad_buf dbg_ae_amb;
int64_t dbg_ae_amb_bytes;
/* The video encoder's RAW (pre-fold) latent: an f32 PERSIST twin of the bf16 quant_conv output
* b_eq2. Read with R4D_ENC_SEL=q2 on the video pass; splits a latent-scale gap between the
* encoder convs (norm_out/conv_out/quant_conv) and the fixed-norm fold -- the video analogue of
* dbg_ae_amb. Trailing since ABI 23 with the fields above. */
rad_buf dbg_ve_q2;
int64_t dbg_ve_q2_bytes;
/* The video encoder's conv_out output (b_eq48) as an f32 PERSIST twin, read with R4D_ENC_SEL=q48;
* splits a raw-latent gain between conv_out (present here) and quant_conv (only in dbg_ve_q2). */
rad_buf dbg_ve_q48;
int64_t dbg_ve_q48_bytes;
/* The video encoder's norm_out output (v_lv[5].b) as an f32 PERSIST twin, read with
* R4D_ENC_SEL=nout (or included in =all); splits a raw-latent gain between norm_out's own weight
* (present here) and the convs after it. */
rad_buf dbg_ve_nout;
int64_t dbg_ve_nout_bytes;
/* The video encoder's norm_out INPUT (v_lv[5].a, the trunk) as an f32 PERSIST twin, read with
* R4D_ENC_SEL=all; with dbg_ve_nout it lets the norm's statistics be tested whole-volume vs
* per-frame (the reference is TemporalIsolatedGroupNorm, per-frame). Trailing debug field. */
rad_buf dbg_ve_trunk;
int64_t dbg_ve_trunk_bytes;
} RadVideoGenDecl;
int rad_declare_video_generator(RadBuilder* b, const RadVideoGenDecl* d);