code wiki / (root) / nx_forge_local_gen.nx

nx_forge_local_gen.nx

buildroot/runtime/nx_forge_local_gen.nx

8737 B241 linesdepth 10pulls 23 transitivereach 0 importersview sourcekind tooltopic forge
docsdependenciesstructsconstsfunctions

about

nx_forge_local_gen.nx -- L4 generation phase: the LOCAL Coder-0.5B (integer no-float tower) writes fbench candidates. nsv_init(coder) ONCE, then per task: prompt = mini-pack + task instruction -> nsv_generate (mode 0 i32 greedy) -> fence-strip -> write candidate file IMMEDIATELY (so a mid-run reap preserves finished tasks). Prints per-task nprompt/ngen: an nprompt > 384 also PROVES the L2 capacity raise (the pack prompt could not fit the old cap). Phase 2 = the existing nx_forge driver (fg_run) judges these candidate files byte-exact. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_nofloat_serve_core.nx nx_forge_ctx.nx nx_forge_local_gen.nx

imports: nx_nofloat_serve_core.nxnx_forge_ctx.nx

imported by: nobody (leaf or entry point)

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

main std_streq 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 nx_le_read_u64 ↻ nx_le_read_u32 ↻

structs

none

consts

10const K_MAGIC_32768: i64 = 32768
11const K_MAGIC_16384: i64 = 16384
12const K_MAGIC_30000: i64 = 30000

functions

15func lg_strip(src: *u8, n: i64, out: *u8) -> i64
called by 1: lg_task
61func lg_prompt(taskinstr: *u8, buf: *u8, cap: i64) -> i64
called by 1: lg_task
84func lg_read_pack(buf: *u8, cap: i64) -> i64
called by 1: lg_prompt_mp calls 1: sys_read
103func lg_prompt_mp(taskinstr: *u8, buf: *u8, cap: i64) -> i64
called by 1: lg_task calls 1: lg_read_pack
128func lg_task(taskinstr: *u8, candpath: *u8, tnum: i64, mp: i64, maxnew: i64) -> i64
192func main(argc: i64, argv: *i64) -> i64