code wiki / (root) / nx_dequant_bench_test.nx

nx_dequant_bench_test.nx

buildroot/runtime/nx_dequant_bench_test.nx

7922 B193 linesdepth 7pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic dequant
docsdependenciesstructsconstsfunctions

about

nx_dequant_bench_test.nx -- the throughput-measurement smoke. Builds a synthetic Q4_K buffer of NX_DB_N_BLOCKS super-blocks (NX_DB_N_BLOCKS * 256 values per run, NX_DB_N_BLOCKS * 144 bytes input), runs nx_gguf_dequant_q4_k NX_DB_K_RUNS times, measures wall-clock time via sys_clock_gettime_mono, computes ns/value and MB/s, writes to /tmp/nx_dequant_bench.tsv for the smoke wrapper to cat back to the operator. Pass condition: smoke exits 0 if dequant completes without OOM, timing values are positive, no output value stuck at the INF_SAT clamp (no catastrophic overflow). The MEASURED NUMBERS are reported via the side-channel TSV; the smoke does NOT assert a throughput threshold (that would be aspirational without a known reference for this hardware).

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_strconv.nx nx_gguf.nx nx_gguf_load.nx nx_dequant_bench.nx nx_dequant_bench_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_strconv.nxnx_gguf.nxnx_gguf_load.nxnx_dequant_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 nx_le_write_u16 nx_gguf_dequant_q4_k nx_le_read_u16 _gguf_f16_to_q24 nx_le_read_u8 sys_clock_gettime_mono sys_openat_wr _emit_kv sys_mmap ↻ nx_strconv_format_i64 sys_write sys_close

structs

none

consts

none

functions

27func _emit_kv(fd: i64, key: *u8, key_len: nx_int, value: i64) -> i64
43func main() -> i64