code wiki / (root) / nx_nofloat_gemm.nx

nx_nofloat_gemm.nx

buildroot/runtime/nx_nofloat_gemm.nx

2204 B41 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind librarytopic nofloat
docsdependenciesstructsconstsfunctions

about

nx_nofloat_gemm.nx -- canonical sovereign INTEGER SIMD GEMM (vpmaddwd / __i16x16_madd): EXACT + DETERMINISTIC + fast = the no-float compute lever every Nishi model rides. Pure funcs, no main. Extracted from nx_nofloat_gemm_gate for debt-free reuse (gate + nx_gpu_bench both import this). __i16x16_madd accumulates 16 signed-int16 products into an int32x8 vector (vpmaddwd + vpaddd, proven VEX); integer add is associative -> bit-exact + deterministic (the no-float exceed axis, unlike float cuBLAS). license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_nofloat_gemm.nx nx_gpu_bench.nx nx_nofloat_gemm_gate.nx nx_nofloat_simd_dot_probe_gate.nx

imports: nx_syscalls.nx

imported by: nx_gpu_bench.nxnx_nofloat_gemm_gate.nxnx_nofloat_simd_dot_probe_gate.nx

structs

none

consts

none

functions

9func pack2(buf: *u8, idx: i64, val: i64) -> i64 { buf[idx*2]=(val) as u8; buf[idx*2+1]=(val>>8) as u8; return 0 }
15func i32x8_hsum(acc: *u8) -> i64 { let p: *i32 = acc as *i32; var s: i64=0; var i: i64=0; while i<8 { s = s + (p[i] as i64); i=i+1 } return s }
called by 1: simd_imm
17func scalar_imm(ai: *i64, bi: *i64, c: *i64, M: i64, N: i64, K: i64) -> i64
called by 2: mainmain
26func simd_imm(a16: *u8, b16: *u8, c: *i64, acc: *u8, M: i64, N: i64, K: i64) -> i64
called by 2: mainmain calls 1: i32x8_hsum