code wiki / (root) / nx_q8_scaling.nx

nx_q8_scaling.nx

buildroot/runtime/nx_q8_scaling.nx

4111 B104 linesdepth 10pulls 30 transitivereach 0 importersview sourcekind tooltopic q8
docsdependenciesstructsconstsfunctions

about

nx_q8_scaling.nx -- pool SCALING probe: same-process ST vs MT(pool) cold Q8 matmul bandwidth -> the noise-immune scaling ratio (target: gcc 8.8x; we were 3.6x). Re-run after tuning NX_POOL_SPIN etc. to see if scaling improves. Cold 222MB sweep each way.

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_f32.nx nx_f32_cvt.nx nx_thread_pool.nx nx_f32_lazy_weight.nx nx_fmt.nx nx_q8_scaling.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_f32.nxnx_f32_cvt.nxnx_thread_pool.nxnx_f32_lazy_weight.nxnx_fmt.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sc_lcg nx_i32_to_f32 nx_lw_shared_pool nx_pool_is_native sc_weight sys_mmap ↻ sc_lcg ↻ nx_f32_lazy_weight_new_q8_ sys_mmap ↻ sys_now_us sys_mmap ↻ sys_clock_gettime_mono _lw_q8_0_matmul_st _q8st_apk sys_mmap ↻ _fq4m_pack_a _lw_q8_0_dot nx_f16_to_f32 nx_le_read_u16 _lw_q8_0_matmul_pool_force nx_lw_shared_pool ↻ _q8st_apk ↻ _fq4m_pack_a ↻ _q8mt_ctxs sys_mmap ↻ nx_pool_n_completed nx_atom_load_i64 nx_pool_submit nx_atom_faa_i64 nx_chan_send nx_chan_try_send _nx_chan_cell nx_thread_yield _pool_futex_wake_all sys_futex_wake nx_pool_wait nx_atom_load_i64 ↻ nx_thread_yield ↻

structs

none

consts

14const MK: i64 = 896
15const NG: i64 = 4864
16const Q8B: i64 = 34
17const NB: i64 = 48

functions

19func sc_nl() -> i64 { fmt_puts("\n" as *u8); return 0 }
called by 1: main calls 1: fmt_puts
20func sc_lcg(s: i64) -> i64 { var v: i64 = s * 1103515245 + 12345; v = v & 2147483647; return v }
called by 2: sc_weightmain
21func sc_weight(seed: i64) -> *NxF32LazyWeight
40func main() -> i64