nx_f16_kat.nx
buildroot/runtime/nx_f16_kat.nx
about
nx_f16_kat.nx -- regression KAT for nx_f16_to_f32, guarding the subnormal fix (nx_f32_cvt.nx: f32_exp was
114-exp_adj, correct 113-exp_adj). The old bug DOUBLED every subnormal f16 -> the Q6_K ffn_down 2x forward bug
that blocked the sovereign LLM for the project's whole history. This KAT asserts exact f32 bits for normals,
subnormals (incl smallest 2^-24 and the largest-subnormal/smallest-normal boundary), and zero. GREEN = the
fix holds. license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_tier.nxnx_f32_cvt.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
| none |
functions
| 10 | func kw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 11 | func kh(v: i64) -> i64 { let b: *u8=sys_mmap(8); var i: i64=0; while i<8 { let n: i64=(v>>((7-i)*4))&0xF; if n<10 {b[i]=(48+n) as u8} else {b[i]=(87+n) as u8} i=i+1 } sys_write(1,b,8); return 0 } |
| 13 | func chk(label: *u8, f16: i64, want: i64, pass: *i64, tot: *i64) -> i64 |
| 21 | func main() -> i64 |