code wiki / (root) / nx_dequant_iter_bench_test.nx

nx_dequant_iter_bench_test.nx

buildroot/runtime/nx_dequant_iter_bench_test.nx

7019 B201 linesdepth 7pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic dequant
docsdependenciesstructsconstsfunctions

about

nx_dequant_iter_bench_test.nx -- iter vs whole-block bench. Measures elapsed ns for: path A: nx_gguf_dequant_q4_k (always 256 values) path B: nx_q4k_iter_init + K * iter_value (K of 256) for K in {1, 8, 32, 256}. Writes results to /tmp/nx_dequant_iter_bench.tsv for the smoke wrapper to cat. Smoke exits 0 if all paths complete without stale-INF saturation (sanity), regardless of measured numbers.

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_strconv.nx nx_gguf.nx nx_gguf_load.nx nx_dequant_iter.nx nx_dequant_iter_bench.nx nx_dequant_iter_bench_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_strconv.nxnx_gguf.nxnx_gguf_load.nxnx_dequant_iter.nxnx_dequant_iter_bench.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 _build_blocks nx_le_write_u16 nx_gguf_dequant_q4_k nx_le_read_u16 _gguf_f16_to_q24 nx_le_read_u8 nx_q4k_iter_alloc sys_mmap ↻ nx_q4k_iter_init nx_le_read_u16 ↻ _gguf_f16_to_q24 ↻ nx_le_read_u8 ↻ nx_q4k_iter_value nx_le_read_u8 ↻ _q4k_iter_scale_at _q4k_iter_min_at _time_path_a sys_mmap ↻ sys_clock_gettime_mono nx_gguf_dequant_q4_k ↻ _time_path_b nx_q4k_iter_alloc ↻ sys_mmap ↻ sys_clock_gettime_mono ↻ nx_q4k_iter_init ↻ nx_q4k_iter_value ↻ sys_openat_wr sys_write _emit sys_mmap ↻ nx_strconv_format_i64 sys_write ↻ sys_close

structs

none

consts

none

functions

22func _emit(fd: i64, label: *u8, label_len: nx_int,
45func _build_blocks(buf: *u8, n: i64) -> nx_int
called by 1: main calls 1: nx_le_write_u16
72func _time_path_a(buf: *u8, n_blocks: i64, runs: i64,
92func _time_path_b(buf: *u8, n_blocks: i64, runs: i64, k: i64) -> i64
125func main() -> i64