code wiki / _hdl_build / nx_f32_hw_matmul_curve.nx

nx_f32_hw_matmul_curve.nx

buildroot/runtime/_hdl_build/nx_f32_hw_matmul_curve.nx

2502 B56 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_hw_matmul_curve.nx -- diagnose the matmul bottleneck (compute- vs memory-bound). Times the hardware-float GEMM across growing N (matrices grow from L1- to beyond-L2-resident) and reports MFLOP/s per size. The SHAPE of the curve names the next lever, evidence-first: * FLAT across N -> compute-bound on the scalar f32 MAC -> packed SIMD (addps/mulps, 4-wide) is the ~4x lever (needs the sovereign compiler extension: parse+IR+x86 backend). * DROPS at large N -> memory/cache-bound -> transpose-B + cache blocking is the lever (pure .nx). In-organ clock (sys_now_ms), sovereign. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_f32_hw_matmul.nx nx_syscalls.nx nx_f32_hw_matmul_curve.nx

imports: nx_f32_hw_matmul.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 hmm_puts sys_write run sys_mmap f32_of time_hw sys_now_ms sys_mmap ↻ sys_clock_gettime_mono nx_f32_hw_matmul hmm_puts ↻ hmm_putn sys_write ↻ sys_mmap ↻ sys_exit

structs

none

consts

11const K_MAGIC_65536: i64 = 65536
12const K_MAGIC_1024: i64 = 1024

functions

14func time_hw(A: *i64, B: *i64, C: *i64, N: i64) -> i64
called by 1: run calls 2: sys_now_msnx_f32_hw_matmul
28func run(N: i64) -> i64
40func main() -> i64