code wiki / _hdl_build / nx_nofloat_muon_ns_gate.nx

nx_nofloat_muon_ns_gate.nx

buildroot/runtime/_hdl_build/nx_nofloat_muon_ns_gate.nx

3411 B83 linesdepth 3pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic nofloat
docsdependenciesstructsconstsfunctions

about

nx_nofloat_muon_ns_gate.nx -- gate for integer Newton-Schulz orthogonalization (Muon core). HONEST claim (Muon NS = APPROXIMATE orthogonalization, SVs -> ~1, not exactly 1): T1 a non-orthogonal matrix is orthogonalized -- X X^T -> I error drops hard (>5x) after NS T2 MONOTONE: more iterations reduce the error (err@5 < err@1) -- the iteration converges, not diverges T3 the result's X X^T diagonal lands near 1.0 (each in [0.6,1.4]*Q16) -- Muon-style approx-orthogonal T4 DETERMINISTIC: two runs bit-identical -- the NOVEL EXCEED (float NS is order-dependent, ours is not) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_nofloat_muon_ns.nx nx_gate_verdict.nx nx_syscalls.nx nx_nofloat_muon_ns_gate.nx

imports: nx_nofloat_muon_ns.nxnx_gate_verdict.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ mg_set_test mn_ortho_err sys_mmap ↻ mn_transpose mn_mm mn_orthogonalize_it mn_isqrt vm_isqrt sys_mmap ↻ mn_transpose ↻ mn_mm ↻ mn_comb gv_check gv_puts ↻ mn_transpose ↻ mn_mm ↻ gv_verdict gv_note_bare_rate gv_bare_rate

structs

none

consts

12const MG_N: i64 = 4
13const MG_Q: i64 = 65536

functions

15func mg_set_test(g: *i64, n: i64) -> i64
called by 1: main
23func main() -> i64