nx_select_joint_test.nx
buildroot/runtime/nx_select_joint_test.nx
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
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
structs
| none |
consts
| none |
functions
| 45 | func _make_probe_rv64() -> *NxProbeRecord |
| 57 | func main() -> i64 |