code wiki / (root) / nx_gen_swiglu_verify.nx

nx_gen_swiglu_verify.nx

buildroot/runtime/nx_gen_swiglu_verify.nx

4482 B106 linesdepth 6pulls 14 transitivereach 0 importersview sourcekind tooltopic gen
docsdependenciesstructsconstsfunctions

about

nx_gen_swiglu_verify.nx -- SOVEREIGN SwiGLU feed-forward activation, verified vs the oracle. ffn_act == silu(ffn_w1) * ffn_w3 elementwise SwiGLU is the FFN gate in Z-Image, Flux, SD3/MMDiT and every Llama-class text encoder, so this organ is named for the OP and takes the model as an argument. Nothing about it is Z-Image. Usage: nx_gen_swiglu_verify <model_id> <tap_scope> model_id fixture directory under the gen fixture root, e.g. zimage_turbo_2602_q8 tap_scope block scope the oracle tap emitted, e.g. layers.0 Every SHAPE is read from the oracle's manifest.tsv. Pointing this at a different model or block needs no rebuild, and an organ that cannot silently keep a stale dimension cannot silently verify the wrong model. This is the cheapest real differential test in the lane -- pure elementwise, no weight matrices, no GGUF. Its job is to prove the harness end to end so the expensive organs above it fail for their own reasons rather than the harness's. license_tier: ORIGINAL

dependencies 10 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_f32_activations.nx nx_strconv.nx nx_genfix.nx nx_genver.nx nx_gen_swiglu_verify.nx

imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f32_exp.nxnx_f32_activations.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

main nx_genver_emit sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ nx_strconv_format_i64 sys_write ↻ sys_mmap ↻ nx_genfix_name _gf_cpyz _gf_cpy nx_genfix_dims sys_mmap ↻ _gf_read_manifest sys_mmap ↻ _gf_cpyz ↻ nx_genfix_root sys_openat_rd sys_read sys_close nx_genfix_load _gf_path sys_mmap ↻ _gf_cpyz ↻ nx_genfix_root ↻ _gf_cpy ↻ sys_openat_rd ↻ sys_mmap ↻

structs

none

consts

34const K_ROWS_CHECK: i64 = 4

functions

36func main(argc: i64, argv: *i64) -> i64