nx_genfix.nx
buildroot/runtime/nx_genfix.nx
about
nx_genfix.nx -- shared loader for image-generation oracle fixtures. MODEL-AGNOSTIC.
WHY THIS EXISTS
The sovereign gen migration verifies each re-implemented op against a tensor dumped from
the engine that ships images today. Those dumps used to be produced by throwaway
instrumentation into a per-session temp directory; both were reaped, and the 13 organs that
depended on them each carried their own private copy of the dead path, so all 13 died at
once and each needed its own edit.
WHY IT IS NOT NAMED FOR A MODEL
Z-Image is one model, not the lane. Flux, SD3/MMDiT, SDXL-UNet and Qwen-Image all need the
same treatment, and they differ in dimensions, block naming and product capability (negative
prompting, CFG, LoRA stacking). So nothing here may hardcode a model: the model id is an
argument, and every SHAPE is read from the manifest.tsv the oracle tap writes beside the
dumps. An organ that hardcodes 3840 is an organ that silently verifies the wrong model the
first time it is pointed at another one.
LAYOUT
<root>/<model_id>/manifest.tsv name \t ne0 \t ne1 \t ne2 \t ne3 \t type \t nelem \t bytes
<root>/<model_id>/<name>.f32 raw little-endian f32
license_tier: ORIGINAL
dependencies 1 imports · 16 importers
diagram shows first 10 each side; +0 more imports, +6 more importers in the complete lists below.
imports: nx_syscalls.nx
imported by: nx_gen_adaln_gate_verify.nxnx_gen_blockrun.nxnx_gen_ditchain.nxnx_gen_ditfull.nxnx_gen_embed_verify.nxnx_gen_linear_verify.nxnx_gen_lora_repr.nxnx_gen_lora_verify.nxnx_gen_prenorm_mod_verify.nxnx_gen_qknorm_verify.nxnx_gen_rmsnorm_verify.nxnx_gen_rope_verify.nxnx_gen_sdpa_verify.nxnx_gen_swiglu_verify.nxnx_gen_taedec.nxnx_genblock.nx
structs
| none |
consts
| 24 | const K_MAGIC_1024: i64 = 1024 |
| 25 | const K_MAGIC_1048576: i64 = 1048576 |
functions
| 28 | func nx_genfix_root() -> *u8 |
| 33 | func _gf_cpy(dst: *u8, at: i64, src: *u8, n: i64) -> i64 |
| 40 | func _gf_cpyz(dst: *u8, at: i64, src: *u8) -> i64 |
| 49 | func nx_genfix_name(out: *u8, scope: *u8, op: *u8, ol: i64) -> i64 |
| 58 | func _gf_path(model: *u8, name: *u8, nl: i64) -> *u8 |
| 77 | func nx_genfix_load(model: *u8, name: *u8, nl: i64, n_floats: i64) -> *u8 |
| 96 | func _gf_path_raw(model: *u8, name: *u8, nl: i64) -> *u8 |
| 115 | func nx_genfix_load_raw(model: *u8, name: *u8, nl: i64, n_bytes: i64) -> *u8 |
| 136 | func _gf_read_manifest(model: *u8, out_len: *i64) -> *u8 |
| 162 | func nx_genfix_dims(model: *u8, name: *u8, nl: i64, ne: *i64) -> i64 |