code wiki / (root) / nx_zimage_qkv_verify.nx

nx_zimage_qkv_verify.nx

buildroot/runtime/nx_zimage_qkv_verify.nx

3376 B90 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind tooltopic zimage
docsdependenciesstructsconstsfunctions

about

nx_zimage_qkv_verify.nx -- SOVEREIGN Z-Image attention SUB-piece 2a: qkv projection, verified vs oracle. Small dedicated organ (the 285KB combined attention segfaults -> split into per-sub-step organs, each small enough to dodge the codegen issue; piece #1 adaLN proved small organs verify cleanly). Computes qkv = h_attn @ qkv_w^T [4,11520] sovereignly (f32) and verifies vs the oracle's dumped qkv. license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_le.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_strconv.nx nx_zimage_qkv_verify.nx

imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.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 zqv_load sys_mmap sys_openat_rd sys_read sys_close 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_i32_to_f32 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_le_read_u32 nx_f32_lt nx_f32_is_nan nx_f32_classify ↻ nx_f32_is_zero nx_f32_classify ↻ nx_f32_sub nx_f32_add ↻ nx_f32_neg sys_openat_wr sys_mmap ↻ sys_write nx_strconv_format_i64 sys_close ↻

structs

none

consts

13const K_MAGIC_3840: i64 = 3840
14const K_MAGIC_11520: i64 = 11520

functions

16func zqv_load(name: *u8, nl: i64, n_floats: i64) -> *u8
43func main() -> i64