nx_nofloat_autograd_ddp_gate.nx
buildroot/runtime/nx_nofloat_autograd_ddp_gate.nx
about
nx_nofloat_autograd_ddp_gate.nx -- DEEPER R4->LLM: bit-reproducible data-parallel training driven by the
REAL no-float autograd tape (vs the linear/SGD stand-in in nx_nofloat_ddp_train_gate).
(knowledge/research/2026-06-23-fabric-applies-to-room-and-elsewhere.md ยง4.)
Each of D workers builds the SAME SSE loss graph on its OWN sample shard via the general Q16 autograd
(nfa_leaf/nfa_matvec/nfa_mse/nfa_vadd -> one nfa_backward reverse sweep -> nfa_grad), extracts its W
gradient, then R4's `ring_allreduce` sums the per-worker gradients and `nfa_sgd` applies the update. THE
EXCEED: the updated weights are BYTE-IDENTICAL across D in {1,2,4,8} AND equal to a single-process
full-batch step -- because the autograd is exact integer (associative) AND the all-reduce is order-
independent. Real trainer components, not a stand-in. Float DDP/NCCL cannot guarantee this.
Composes the verified nx_nofloat_autograd (gate B/C pattern) + nx_fabric_collective.ring_allreduce.
HONEST SCOPE: a linear W[1x8] model trained by the GENERAL tape (same engine the Q16 transformer uses);
N logical workers in one box. license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_nofloat_autograd.nxnx_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
| 20 | func dda_build(tape: *i64, vals: *i64, st: *i64, Wp: *i64, X: *i64, Y: *i64, s0: i64, s1: i64, V: i64, outW: *i64) -> i64 |
| 38 | func dda_step(D: i64, S: i64, V: i64, Wp: *i64, X: *i64, Y: *i64, tape: *i64, vals: *i64, grads: *i64, st: *i64, lr: i64, outWp: *i64) -> i64 |
| 61 | func dda_single(S: i64, V: i64, Wp: *i64, X: *i64, Y: *i64, tape: *i64, vals: *i64, grads: *i64, st: *i64, lr: i64, outWp: *i64) -> i64 |
| 74 | func ap(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 75 | func an(v: i64) -> i64 called by 1: main |
| 85 | func achk(name: *u8, ok: i64) -> i64 |
| 89 | func aeq(a: *i64, b: *i64, V: i64) -> i64 { var i: i64 = 0; while i < V { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } called by 1: main |
| 91 | func main() -> i64 |