code wiki / (root) / nx_nofloat_speed_bench.nx

nx_nofloat_speed_bench.nx

buildroot/runtime/nx_nofloat_speed_bench.nx

3748 B64 linesdepth 10pulls 22 transitivereach 0 importersview sourcekind benchtopic nofloat
docsdependenciesstructsconstsfunctions

about

nx_nofloat_speed_bench.nx -- honest tok/s baseline for the no-float Qwen serve (the inference-speed arc's "measure before you optimize" foundation). nsv_generate already self-times (meta[1]=gen_tokens, meta[3]=ms_per_token); this drives it with a fixed prompt + max_new and prints prompt-tokens, gen-tokens, ms/tok, and tok/s for BOTH i32-lossless (mode 0) and i8-fast (mode 1) so the real number + the i8 speed delta are on the record (memory had conflicting 3.2 vs 14.9 tok/s). Low-risk: reads the model, no serve edits. usage: nx_nofloat_speed_bench [model.gguf] [max_new] Sovereign: nx_nofloat_serve_core. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_nofloat_serve_core.nx nx_nofloat_speed_bench.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_nofloat_serve_core.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sb_int sb_puts sys_write nsv_init sys_now_ms sys_mmap sys_clock_gettime_mono nsv_log sys_write ↻ nf_pool nx_pool_new nx_hw_worker_count nx_hw_cpu_count sys_mmap ↻ sys_munmap sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ sys_mmap ↻ nsv_load_meta sys_mmap ↻ nsv_log ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value

structs

none

consts

11const SB_MODEL: *u8 = "/home/elderwesto/nx_stage/nx_real_model.gguf"

functions

13func sb_puts(s: *u8) -> i64 { var n: i64=0; while s[n] != (0 as u8) { n=n+1 } sys_write(1, s, n); return 0 }
called by 2: sb_runmain calls 1: sys_write
18func sb_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: sb_runmain calls 1: nxi_out
19func sb_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){ n=n+1 } return n }
called by 1: sb_run
20func sb_int(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ let c: i64=s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v }
called by 1: main
22func sb_run(mode: i64, label: *u8, maxnew: i64, pr: *u8, out: *u8, meta: *i64, gp: *i64) -> i64
41func main(argc: i64, argv: *i64) -> i64