code wiki / (root) / nx_zimage_ffn_swiglu_verify.nx

nx_zimage_ffn_swiglu_verify.nx

buildroot/runtime/nx_zimage_ffn_swiglu_verify.nx

3627 B93 linesdepth 5pulls 11 transitivereach 0 importersview sourcekind tooltopic zimage
docsdependenciesstructsconstsfunctions

about

nx_zimage_ffn_swiglu_verify.nx -- SOVEREIGN Z-Image FFN sub-piece b: SwiGLU gate, verified vs oracle. ffh = silu(h_ff @ w1.T) * (h_ff @ w3.T) ([4,3840]@[10240,3840]->[4,10240], gated). silu(x)=x/(1+e^-x). Local accumulators (no scratch). Verifies vs dumped ffh. license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_le.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_f32_exp.nx nx_strconv.nx nx_zimage_ffn_swiglu_verify.nx

imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f32_exp.nxnx_strconv.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main zsw_load sys_mmap sys_openat_rd sys_read sys_close nx_i32_to_f32 nx_f32_div nx_f32_classify nx_f32_exp_field nx_f32_mant_field nx_f32_sign nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_le_read_u32 nx_f32_add nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_mul nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_exp nx_f32_classify ↻ nx_f32_sign ↻ _f32_to_i32_rne nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_exp_field ↻ nx_f32_mant_field ↻ nx_i32_to_f32 ↻ _f32_ldexp nx_f32_classify ↻ nx_f32_exp_field ↻ nx_f32_sign ↻ nx_f32_neg nx_f32_lt

structs

none

consts

12const K_MAGIC_3840: i64 = 3840
13const K_MAGIC_10240: i64 = 10240

functions

15func zsw_load(name: *u8, nl: i64, n_floats: i64) -> *u8
39func main() -> i64