code wiki / (root) / nx_select_joint_test.nx

nx_select_joint_test.nx

buildroot/runtime/nx_select_joint_test.nx

8314 B208 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic select
docsdependenciesstructsconstsfunctions

about

nx_select_joint_test.nx -- smoke for nx_select_joint SA-5 MVP. Demonstrates the LOAD-BEARING joint-DAG property: independent argmin picks a locally-optimal pair that is layout-INCOMPATIBLE; joint solver picks a globally-optimal pair that costs more locally but composes through the edge. Two-node DAG: [node A: variant_class=100] --edge--> [node B: variant_class=200] Producer candidates (node A): A_cheap_row : cost=100, out_layout=ROW_MAJOR A_medium_col : cost=300, out_layout=COL_MAJOR A_expensive_col: cost=900, out_layout=COL_MAJOR Consumer candidates (node B): B_cheap_col : cost=100, in_layout=COL_MAJOR B_expensive_row : cost=900, in_layout=ROW_MAJOR Per-node argmin (single-class): node A picks A_cheap_row (cost=100) node B picks B_cheap_col (cost=100) But the edge A_cheap_row.out=ROW vs B_cheap_col.in=COL is INCOMPATIBLE. Joint argmin: (A_cheap_row, B_expensive_row): row->row compatible; total=100+900=1000 (A_medium_col, B_cheap_col): col->col compatible; total=300+100=400 <- WIN (A_expensive_col, B_cheap_col): col->col compatible; total=900+100=1000 The joint solver must pick (A_medium_col, B_cheap_col) -- INDICES (1, 0) -- demonstrating that the locally-suboptimal A_medium_col is the globally-optimal choice given the edge constraint. SA-5 verification gate per NISHI_SELF_ASSEMBLY_ROADMAP.md ยง8: "DAG composition smoke -- same algorithm, two layout choices, joint solver picks bit-coherent layouts across nodes"

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_probe.nx nx_calibrate.nx nx_select.nx nx_select_joint.nx nx_select_joint_test.nx

imports: nx_syscalls.nxnx_probe.nxnx_calibrate.nxnx_select.nxnx_select_joint.nx

imported by: nobody (leaf or entry point)

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

main _make_probe_rv64 nx_probe_new sys_mmap nx_policy_throughput_defau sys_mmap ↻ nx_manifest_new sys_mmap ↻ nx_isa_bit nx_manifest_set_layout sys_mmap ↻ nx_joint_node_new sys_mmap ↻ nx_select nx_select_variant_fits nx_isa_bit ↻ nx_select_score nx_layout_compatible nx_select_joint_2node nx_select_variant_fits ↻ nx_select_score ↻ nx_layout_compatible ↻

structs

none

consts

none

functions

45func _make_probe_rv64() -> *NxProbeRecord
called by 1: main calls 1: nx_probe_new
57func main() -> i64