code wiki / _hdl_build / nx_f32_intrin_matmul.nx

nx_f32_intrin_matmul.nx

buildroot/runtime/_hdl_build/nx_f32_intrin_matmul.nx

4633 B103 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_intrin_matmul.nx -- is the matmul bottleneck CALL OVERHEAD (wrapper) vs the inline intrinsic? nx_f32_hw.f32_add/f32_mul are wrapper FUNCTIONS around the __f32_* intrinsics. If nx_cc doesn't inline them, every MAC pays call/ret overhead. This tests the matmul written with __f32_add/ __f32_mul/__f32_from_i64 DIRECTLY (the compiler emits addss/mulss INLINE -- no call) vs the wrapper version, plus a direct+4-accumulator variant. Pure .nx, NO compiler change, ZERO build risk. Sovereign: imports nx_f32_hw_matmul (wrapper baseline) + nx_syscalls. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_f32_hw_matmul.nx nx_syscalls.nx nx_f32_intrin_matmul.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 sys_mmap intrin_matmul sys_exit it_time sys_now_ms sys_mmap ↻ sys_clock_gettime_mono nx_f32_hw_matmul intrin_matmul ↻ intrin_matmul_mac4 hmm_putn sys_write ↻ sys_mmap ↻

structs

none

consts

10const K_MAGIC_32768: i64 = 32768

functions

13func intrin_matmul(a: *i64, b: *i64, c: *i64, m: i64, k: i64, n: i64) -> i64
called by 2: it_timemain
31func intrin_matmul_mac4(a: *i64, b: *i64, c: *i64, m: i64, k: i64, n: i64) -> i64
called by 1: it_time
56func it_time(which: i64, A: *i64, B: *i64, C: *i64, N: i64) -> i64
74func main() -> i64