nx_fabric_collective_gate.nx
buildroot/runtime/nx_fabric_collective_gate.nx
about
nx_fabric_collective_gate.nx -- LIVE GATE for R4 (collective communication: ring all-reduce).
Proves ring all-reduce is byte-exact correct AND its per-process bottleneck stays ~constant as N grows,
where naive root-based all-reduce bottlenecks at O(N) -- with negative controls.
criteria:
1 ring all-reduce byte-exact correct (N=8) (the algorithm is REAL, not a cost model)
2 naive all-reduce byte-exact correct (N=8) (baseline sanity)
3 ring bottleneck * 3 <= naive bottleneck (N=8) (>=3x less per-process data; actual ~Nx)
4 ring max_bytes(N=16) <= 2 * ring max_bytes(N=4) (ring per-process BOUNDED as N grows)
5 naive max_bytes(N=16) >= 3 * naive max_bytes(N=4)(naive root grows ~linearly -- the contrast)
negative controls:
NC1 ring with the REDUCTION disabled -> WRONG result (the sum is load-bearing, not the shuffle)
NC2 ring correct at N=4 AND N=16 (correct across scale, not a fixed-N fluke)
NC3 ring(N=8) result == naive(N=8) result byte-exact (two independent algorithms agree)
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_fabric_collective.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
| 19 | func gp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 20 | func gn(v: i64) -> i64 |
| 30 | func fdn(fd: i64, v: i64) -> i64 called by 1: main |
| 39 | func chk(name: *u8, ok: i64) -> i64 |
| 43 | func show(tag: *u8, m: *ColMetrics) -> i64 |
| 48 | func main() -> i64 |