nx_q4k_speed_bench.nx
buildroot/runtime/nx_q4k_speed_bench.nx
about
nx_q4k_speed_bench.nx -- measure the CPU speedup of the integer fused-dequant-dot vs emulated-f32.
sd-server -> Nishi migration (CPU perf payoff). Both paths now agree with ggml (dequant tech debt fixed).
This times, on the real blk.0.attn_q Q4_K weight row (4096), N iterations of:
(A) INTEGER: nx_q4k_dot_row_col (fused dequant + integer-Q34 dot; the SOTA quantized-GEMM route).
(B) F32: nx_q4k_to_f32 (dequant to f32) + emulated-f32 dot (the correctness route).
Activation is converted to f32 ONCE outside the timed loop (amortized in a real GEMM), so we compare the
per-output-neuron cost fairly. Reports us/op each and the speedup x100.
license_tier: ORIGINAL
dependencies 16 imports · 0 importers
diagram shows first 10 each side; +6 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_q4k_to_f32.nxnx_f32.nxnx_f32_cvt.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
| 27 | func sb_emit(fd: i64, key: *u8, key_len: i64, value: i64) -> i64 |
| 41 | func main() -> i64 |