code wiki / _hdl_build / nx_builder_authors_tensor_grad.nx
nx_builder_authors_tensor_grad.nx source
↩ module page · 18 lines · 1129 B
1// nx_builder_authors_tensor_grad.nx -- the BUILDER authors T6 TENSOR AUTOGRAD (training-substrate
2// rung 2): array-valued tape over a deterministic bump arena + the four tutored backward identities
3// (matvec outer-product/transpose, addvec, relu-per-cell, MSE). Claude tutored the identities
4// (knowledge/specs/2026-06-09-tutoring-training-substrate-rung2-tensor.md); the Builder authors;
5// the Engineer gates via nx_sov_build_run. Gates: 9-param MLP gradcheck / affine-map recovery from
6// zero init (convex by design; nonconvex init = flagged next rung) / bit-exact two-run training.
7// license_tier: ORIGINAL
8import "nx_module_author.nx"
9import "nx_syscalls.nx"
10func _b(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
11func main() -> i64 {
12 _b("BUILDER authors T6 tensor autograd (matvec/relu/mse backward identities)\n" as *u8)
13 let fd: i64 = sys_openat_wr("runtime/_hdl_build/_tensor_grad_authored.nx" as *u8, 0x1a4)
14 ma_emit_tensor_grad(fd)
15 sys_close(fd)
16 _b(" -> _tensor_grad_authored.nx authored; Engineer verifies next\n" as *u8)
17 sys_exit(0); return 0
18}