code wiki / _hdl_build / nx_f32_intrin_matmul.nx
nx_f32_intrin_matmul.nx
buildroot/runtime/_hdl_build/nx_f32_intrin_matmul.nx
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
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
structs
| none |
consts
| 10 | const K_MAGIC_32768: i64 = 32768 |
functions
| 13 | func intrin_matmul(a: *i64, b: *i64, c: *i64, m: i64, k: i64, n: i64) -> i64 |
| 31 | func intrin_matmul_mac4(a: *i64, b: *i64, c: *i64, m: i64, k: i64, n: i64) -> i64 called by 1: it_time |
| 56 | func it_time(which: i64, A: *i64, B: *i64, C: *i64, N: i64) -> i64 |
| 74 | func main() -> i64 |