nx_gen_prenorm_mod_verify.nx
buildroot/runtime/nx_gen_prenorm_mod_verify.nx
about
nx_gen_prenorm_mod_verify.nx -- SOVEREIGN DiT pre-norm + adaLN modulate, verified vs the oracle.
y[t][i] = ( x[t][i] / sqrt(mean_i(x[t]^2) + eps) * w[i] ) * (1 + scale[i])
This is the entry half of every modulated DiT block: RMSNorm, then scale-modulation broadcast
from one chunk of the adaLN vector. Z-Image, Flux and SD3/MMDiT all use this shape; only the
chunk COUNT and INDEX differ, so both are arguments.
Usage:
nx_gen_prenorm_mod_verify <model> <x> <norm_w> <adaln> <n_chunks> <scale_idx> <y> [rows] [eps_recip]
It is a TWO-op composite on purpose. RMSNorm is already verified standalone by
nx_gen_rmsnorm_verify, so if this organ is RED while that one is GREEN the fault is isolated to
the modulate half or to the chunk index -- which is the only reason a composite is acceptable
here rather than a fixture for the intermediate.
Hardware __f32_* intrinsics in the hot loop, never the nx_f32_* software twins.
license_tier: ORIGINAL
dependencies 8 imports · 0 importers
imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_strconv.nxnx_genfix.nxnx_genver.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 28 | const K_MAGIC_1000000: i64 = 1000000 |
functions
| 30 | func zp_strlen(s: *u8) -> i64 called by 1: main |
| 36 | func main(argc: i64, argv: *i64) -> i64 |