code wiki / (root) / nx_q5q8_ab.nx

nx_q5q8_ab.nx

buildroot/runtime/nx_q5q8_ab.nx

3942 B117 linesdepth 10pulls 30 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_q5q8_ab.nx -- the memory-bound-era re-test: does reading FEWER BYTES (Q5_0 @ 0.69 B/weight, +__q5_unpack32 SSE unpack) now BEAT Q8_0 @ 1.06 B/weight (no unpack), on the COLD forward-representative access pattern under the FUTEX pool? Earlier (yield-storm pool + software elementwise) Q5_0 lost 2x -> repacked to Q8_0. Now the matmul is memory-bound, so fewer bytes SHOULD win if the SSE unpack stays hidden. Same process, same load, COLD (NB distinct buffers each read once). license_tier: ORIGINAL expect_exit: 0

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_q5q8_ab.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 qa_lcg nx_i32_to_f32 nx_lw_shared_pool nx_pool_is_native q8_weight sys_mmap ↻ qa_lcg ↻ nx_f32_lazy_weight_new_q8_ sys_mmap ↻ q5_weight sys_mmap ↻ qa_lcg ↻ nx_f32_lazy_weight_new_q5_ sys_mmap ↻ sys_now_us sys_mmap ↻ sys_clock_gettime_mono nx_f32_lazy_matmul nx_f32_matmul_t_pool 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 ↻ nx_atom_store_i64 _pool_futex_wait sys_futex_wait sys_munmap nx_lw_shared_pool ↻

structs

none

consts

18const MK: i64 = 896
19const NG: i64 = 4864
20const Q8B: i64 = 34
21const Q5B: i64 = 22
22const NB: i64 = 40

functions

24func qa_nl() -> i64 { fmt_puts("\n" as *u8); return 0 }
called by 2: qa_repmain calls 1: fmt_puts
25func qa_lcg(s: i64) -> i64 { var v: i64 = s * 1103515245 + 12345; v = v & 2147483647; return v }
27func q8_weight(seed: i64) -> *NxF32LazyWeight
46func q5_weight(seed: i64) -> *NxF32LazyWeight
67func qa_rep(tag: *u8, us: i64, bpw: i64) -> i64
called by 1: main calls 3: fmt_putsfmt_putnqa_nl
80func main() -> i64