code wiki / (root) / nx_gen_blockrun.nx

nx_gen_blockrun.nx

buildroot/runtime/nx_gen_blockrun.nx

16798 B330 linesdepth 9pulls 24 transitivereach 0 importersview sourcekind tooltopic gen
docsdependenciesstructsconstsfunctions

about

nx_gen_blockrun.nx -- run a WHOLE DiT block sovereignly, end to end, and grade the output. Takes ONLY the block input and the model weights. Every intermediate is computed by this organ and fed to the next stage; no oracle tensor is read except the final reference. WHY THIS EXISTS SEPARATELY FROM nx_gen_blockbench The bench proves each op matches the oracle WHEN HANDED THE ORACLE'S INPUTS. That is necessary and not sufficient: it says nothing about whether 17 chained ops stay on the rails, because every stage there starts from a clean reference. ★ VERIFIED IS NOT ASSEMBLED. Error compounding across a chain is a different question from per-op fidelity, and only this organ asks it. Usage: nx_gen_blockrun <model_id> [n_workers] All activations are kept as PACKED 4-byte f32, not i64-boxed floats, because that is the layout __f32_i8dot32a consumes -- the quantized dot needs 32 contiguous f32 activations per block, so packing is the kernel's requirement rather than a memory optimization. Weights: projections read as RAW Q8_0 (int8 + per-block f16 scale, pre-decoded once); norms and the adaLN vector read as f32. license_tier: ORIGINAL

dependencies 13 imports · 0 importers

nx_syscalls.nx nx_le.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_f16.nx nx_f32_exp.nx nx_f32_activations.nx nx_strconv.nx nx_genfix.nx nx_gen_blockrun.nx

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

imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f16.nxnx_f32_exp.nxnx_f32_activations.nxnx_strconv.nxnx_genfix.nxnx_genver.nxnx_genweights.nxnx_genblock.nx

imported by: nobody (leaf or entry point)

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

main br_puts sys_write 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 ↻ nx_strconv_parse_i64 nx_ascii_is_digit nx_gw_open sys_mmap ↻ sys_map_file sys_openat_rd sys_lseek sys_close stl_header_len stl_u64le stl_data_start stl_u64le ↻ 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_genver_emit

structs

none

consts

36const K_MAGIC_1000000: i64 = 1000000

functions

38func main(argc: i64, argv: *i64) -> i64