nx_q4k_matmul_rate.nx
buildroot/runtime/nx_q4k_matmul_rate.nx
about
nx_q4k_matmul_rate.nx -- isolate the SSE Q4_K matmul rate (no 491MB model load) to pinpoint why the LM
forward is slow (408s/8tok). Times nx_f32_q4k_matmul on a real LM size (W_gate: m=8, k=896, n=4864) on
DUMMY Q4_K bytes (timing is layout-correct regardless of byte values). MFLOP/s tells us: ~30 = matmul is
OVERHEAD-bound (dequant + i64-boxing + indexing dominate; scalar SSE can't help) -> packed SIMD/codegen is
the lever; ~300 = matmul is fast and the forward's slowness is elsewhere (attention/softmax/rmsnorm).
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_f32_q4k_matmul.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
| 9 | func bn_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 10 | func bn_putn(v: i64) -> i64 |
| 21 | func main() -> i64 |