nx_q8_mix_ab.nx
buildroot/runtime/nx_q8_mix_ab.nx
about
nx_q8_mix_ab.nx -- same-process, same-load A/B of the REAL per-layer block
matmul mix (Qwen2.5-0.5B: W_q/W_k/W_v/W_o/W_gate/W_up/W_down), m=1 decode.
A = force ALL through the pool (old behavior). B = threshold-routed
(small -> single-thread, big -> pool = new behavior). Run back-to-back
under IDENTICAL host load so the RATIO is noise-immune (absolute forward
benches are not -- this box runs concurrent sessions). Reports total us
for one "layer mix" repeated NLAY times, both ways, + the speedup.
license_tier: ORIGINAL expect_exit: 0
dependencies 8 imports · 0 importers
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
structs
| none |
consts
| 18 | const HID: i64 = 896 |
| 19 | const FFN: i64 = 4864 |
| 20 | const KVD: i64 = 128 |
| 21 | const Q8B: i64 = 34 |
| 22 | const Q8V: i64 = 32 |
| 23 | const NLAY: i64 = 24 |
functions
| 25 | func ab_nl() -> i64 { fmt_puts("\n" as *u8); return 0 } |
| 26 | func ab_lcg(s: i64) -> i64 { var v: i64 = s * 1103515245 + 12345; v = v & 2147483647; return v } |
| 27 | func ab_weight(k: i64, n: i64, seed: i64) -> *NxF32LazyWeight |
| 46 | func main() -> i64 |