code wiki / _hdl_build / nx_f32_matmul_perf.nx

nx_f32_matmul_perf.nx

buildroot/runtime/_hdl_build/nx_f32_matmul_perf.nx

3053 B64 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tooltopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_matmul_perf.nx -- MEASURE the sovereign f32 GEMM's throughput (the math-perf rung). Times nx_f32_matmul SOVEREIGNLY -- the clock (sys_now_ms) is read INSIDE the organ around the work (per "monitor the system natively, never a host stopwatch"). Reports measured MFLOP/s + ns per MAC across a few sizes, with adaptive repetition so the timed window is meaningful. HONEST (no wave, no fabricated head-to-head): this is OUR sovereign BITS-UP f32 GEMM -- no hardware FPU, no SIMD, no BLAS. BLAS/cuBLAS are NOT run here (they are 3rd-party, bench-lane only); the literature ceiling is ~tens of GFLOP/s single-thread, so the measured number below is the sovereign BASELINE and the gap to that ceiling is exactly the simd/FPU lock the genealogy names. Sovereign: imports nx_f32_matmul (-> nx_f32) + nx_syscalls. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_f32_matmul.nx nx_syscalls.nx nx_f32_matmul_perf.nx

imports: nx_f32_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 p_puts sys_write run_size sys_mmap sys_now_ms sys_mmap ↻ sys_clock_gettime_mono nx_f32_matmul p_puts ↻ p_putn sys_write ↻ sys_mmap ↻ sys_exit

structs

none

consts

14const K_MAGIC_8192: i64 = 8192
15const K_MAGIC_1000000: i64 = 1000000

functions

17func p_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 2: run_sizemain calls 1: sys_write
18func p_putn(v: i64) -> i64
called by 1: run_size calls 2: sys_writesys_mmap
30func run_size(N: i64) -> i64
56func main() -> i64