code wiki / _hdl_build / nx_f32_matmul_gate.nx

nx_f32_matmul_gate.nx

buildroot/runtime/_hdl_build/nx_f32_matmul_gate.nx

4304 B91 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_matmul_gate.nx -- KAT proving the SOVEREIGN f32 GEMM is correct (the math-axis foothold). nx_f32_matmul is a bits-up f32 GEMM (no BLAS, no SIMD). For small integers f32 is bit-exact, so a hand-computed integer reference is the exact expected output. This gate is the EVIDENCE that the genesis "math" axis is NOT bare-locked: a sovereign CPU matmul exists + is correct (BLAS-level PERFORMANCE is the remaining open rung). T1 kat-correct : [[1,2],[3,4]] @ [[5,6],[7,8]] == [[19,22],[43,50]] bit-exact N1 teeth : the result does NOT equal a deliberately-wrong matrix (compare has teeth) N2 bad-dim : m=0 -> NX_F32_MM_ERR_BAD_DIM (error handling) GREEN only if all three hold. Evidence -> knowledge/status/f32_matmul_gate.log. Sovereign: imports nx_f32_matmul (-> nx_f32, nx_tier) + nx_framed_append + nx_syscalls. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_f32_matmul.nx nx_framed_append.nx nx_syscalls.nx nx_f32_matmul_gate.nx

imports: nx_f32_matmul.nxnx_framed_append.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main mm_puts sys_write sys_mmap nx_f32_matmul mm_eq4 mm_row sys_mmap ↻ mm_cat fa_appendz fa_append sys_mmap ↻ sys_openat_append sys_flock fa_write_all sys_write ↻ sys_close fa_len mm_puts ↻ mm_cat ↻ mm_catn sys_mmap ↻ fa_appendz ↻

structs

none

consts

18const MMG_LOG: *u8 = "knowledge/status/f32_matmul_gate.log"

functions

20func mm_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: mm_rowmain calls 1: sys_write
21func mm_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != 0 as u8 { dst[off + i] = s[i]; i = i + 1 } return off + i }
called by 2: mm_rowmain
22func mm_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
32func mm_eq4(c: *i64, e: *i64) -> i64 { var i: i64 = 0; while i < 4 { if c[i] != e[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
33func mm_row(name: *u8, pass: i64) -> i64
46func main() -> i64