nx_par_matmul.nx
buildroot/runtime/nx_par_matmul.nx
about
nx_par_matmul.nx -- SOVEREIGN CPU parallelism: matmul across all cores via fork + shared memory, NO 3rd
party (operator: "no 3rd party, nishi ecosystem from the hardware rung up"). Pure syscalls -- sys_fork +
sys_mmap_shared (children write row-slices of C into shared mem) + sys_wait4 (parent joins). Inner MAC =
sovereign SSE (__f32_mul/__f32_add, nx_f32_hw). This is the tractable sovereign speed lever for the forward
(the matmul is the bottleneck): serial vs N-worker parallel, measured, bit-verified. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_f32.nxnx_f32_hw.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 PM_M: i64 = 384 |
| 11 | const PM_K: i64 = 384 |
| 12 | const PM_N: i64 = 384 |
| 13 | const PM_NW: i64 = 8 // worker forks (>= cores -> measures effective parallelism) |
functions
| 15 | func pm_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 16 | func pm_putn(v: i64) -> i64 |
| 28 | func matmul_rows(A: *i64, B: *i64, C: *i64, K: i64, N: i64, lo: i64, hi: i64) -> i64 called by 1: main |
| 44 | func main() -> i64 |