code wiki / _hdl_build / nx_f32_matmul_gate.nx
nx_f32_matmul_gate.nx
buildroot/runtime/_hdl_build/nx_f32_matmul_gate.nx
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
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
structs
| none |
consts
| 18 | const MMG_LOG: *u8 = "knowledge/status/f32_matmul_gate.log" |
functions
| 20 | func 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 } |
| 21 | func 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 } |
| 22 | func mm_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 32 | func 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 |
| 33 | func mm_row(name: *u8, pass: i64) -> i64 |
| 46 | func main() -> i64 |