nx_q4k_gemm_mt.nx
buildroot/runtime/nx_q4k_gemm_mt.nx
about
nx_q4k_gemm_mt.nx -- multi-threaded integer GEMM: wire nx_thread into the Q4_K integer dot.
sd-server -> Nishi migration (cross-hw census PARTIAL -> HAVE: threading). The GEMM is embarrassingly
parallel across output neurons: each worker thread computes a disjoint output range via nx_q4k_dot_row_col
(its own iterator), joined by a done-flag (matches the nx_thread_spawn smoke: raw *i64 ctx, spin-join).
Works on ANY multicore CPU. Verified bit-exact vs single-thread + measured speedup.
ctx (flat *i64, 9 slots): [0]buf [1]w_off [2]o_start [3]o_end [4]n_blocks [5]rstride [6]col [7]out [8]done
license_tier: ORIGINAL
dependencies 14 imports · 0 importers
diagram shows first 10 each side; +4 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_strconv.nxnx_tensor.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_meta.nxnx_placement.nxnx_gguf_load_lazy.nxnx_q4k_matmul.nxnx_dequant_iter.nxnx_thread.nxnx_clock.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
| none |
functions
| 24 | func mt_worker(ctx_ptr: *u8) -> i64 |
| 43 | func mt_emit(fd: i64, key: *u8, kl: i64, v: i64) -> i64 |
| 57 | func main() -> i64 |