code wiki / _hdl_build / nx_f32_hw_matmul.nx

nx_f32_hw_matmul.nx

buildroot/runtime/_hdl_build/nx_f32_hw_matmul.nx

2979 B67 linesdepth 2pulls 3 transitivereach 5 importersview sourcekind tooltopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_hw_matmul.nx -- HARDWARE-float GEMM (the rung above the software nx_f32_matmul). module: nishi-core.genealogy.f32_hw_matmul capability: CORE_COMPUTE (escape the math perf lock via the SSE hardware-float rung) Same GEMM as nx_f32_matmul, but the inner MAC uses nx_f32_hw's f32_add/f32_mul -- which compile to SSE addss/mulss on the real FPU (rung A, nx_f32_sse_kat_gate GREEN) -- instead of the bits-up SOFTWARE f32. binary32 layout is identical, so results are bit-for-bit cross-checkable against the software matmul (the gate's differential). This is the measured lever for the math/simd lock. Sovereign: imports nx_f32_hw (-> __f32_* SSE intrinsics) + nx_syscalls. license_tier: ORIGINAL

dependencies 2 imports · 5 importers

nx_f32_hw.nx nx_syscalls.nx nx_f32_hw_matmul.nx nx_f32_hw_matmul_curve.nx nx_f32_hw_matmul_gate.nx nx_f32_hw_matmul_mac4.nx nx_f32_hw_matmul_perf.nx nx_f32_intrin_matmul.nx

imports: nx_f32_hw.nxnx_syscalls.nx

imported by: nx_f32_hw_matmul_curve.nxnx_f32_hw_matmul_gate.nxnx_f32_hw_matmul_mac4.nxnx_f32_hw_matmul_perf.nxnx_f32_intrin_matmul.nx

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

main hmm_puts sys_write sys_mmap f32_of nx_f32_hw_matmul hmm_putn sys_write ↻ sys_mmap ↻ f32_int sys_exit

structs

none

consts

14const NX_HWMM_OK: i64 = 0
15const NX_HWMM_ERR: i64 = 1

functions

17func hmm_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 9: mainrunmainhg_rowmainmain+3 calls 1: sys_write
18func hmm_putn(v: i64) -> i64
30func nx_f32_hw_matmul(a: *i64, b: *i64, c: *i64, m: i64, k: i64, n: i64) -> i64
55func main() -> i64