code wiki / (root) / nx_qwen_wsl_timing_gate.nx

nx_qwen_wsl_timing_gate.nx

buildroot/runtime/nx_qwen_wsl_timing_gate.nx

3793 B90 linesdepth 14pulls 64 transitivereach 0 importersview sourcekind gate/prooftopic qwen
docsdependenciesstructsconstsfunctions

about

nx_qwen_wsl_timing_gate.nx -- WSL2 forward on the DEFAULT threaded pool (the production path: matmul pool_force + SwiGLU pool, hw_worker_count workers), SELF-TIMED around nx_f32_llm_run_v3 via sys_now_us (Linux clock). For the same-box WSL2-vs-native fair A/B: run at NX_WSL_NTOK=2 and =34, then decode_tok/s = 32e6 / (RUN_US_34 - RUN_US_2) (subtracts the common prefill). Model = /tmp/nx_real_model.gguf (symlink to the shared 491MB gguf). license_tier: ORIGINAL expect_exit: 0

dependencies 22 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_bpe.nx nx_gguf.nx nx_gguf_load.nx nx_gguf_meta.nx nx_f32.nx nx_f32_kv_cache.nx nx_f32_lazy_weight.nx nx_f32_llama_block.nx nx_qwen_wsl_timing_gate.nx

diagram shows first 10 each side; +12 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_tier.nxnx_bpe.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_meta.nxnx_f32.nxnx_f32_kv_cache.nxnx_f32_lazy_weight.nxnx_f32_llama_block.nxnx_f32_llama_block_v4.nxnx_f32_llama_stack_v4.nxnx_f32_llama_layer_lazy_load.nxnx_f32_llm.nxnx_f32_llm_v4.nxnx_f32_llm_read_dims.nxnx_f32_bpe_load.nxnx_f32_llm_special_tokens.nxnx_f32_sampler.nxnx_f32_llm_run_v2.nxnx_f32_llm_run_v3.nxnx_thread_pool.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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close sys_write ↻ nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gguf_skip_value ↻ sys_mmap ↻ nx_f32_llama_model_alloc sys_mmap ↻ nx_f32_llm_read_dims_from_ sys_mmap ↻ nx_gguf_meta_find nx_le_read_u64 ↻ nx_le_read_u32 ↻

structs

none

consts

31const NX_WSL_NTOK: i64 = 34 // emit count; run at 2 and 34 -> decode = 32/(us34-us2)

functions

33func _put_num(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
46func main() -> i64