code wiki / _hdl_build / nx_nofloat_linattn_gate.nx
nx_nofloat_linattn_gate.nx
buildroot/runtime/_hdl_build/nx_nofloat_linattn_gate.nx
about
nx_nofloat_linattn_gate.nx -- gate for the no-float linear-attention recurrent kernel (KDA foundation).
T1 recurrent output MATCHES the direct linear-attention formula o_t = sum_{s<=t}(q_t.k_s) v_s
T2 CAUSAL: o_t depends only on s<=t (truncating the sequence at t leaves o_t unchanged)
T3 O(1)-memory state accumulates correctly (S after T = sum k_s (x) v_s)
T4 DETERMINISTIC bit-identical (the exceed: float linear-attn drifts by accumulation order)
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_nofloat_linattn.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
structs
| none |
consts
| 11 | const LG_T: i64 = 4 |
| 12 | const LG_D: i64 = 4 |
| 13 | const LG_Q: i64 = 65536 |
| 14 | const LG_QBITS: i64 = 16 |
functions
| 17 | func lg_direct(qm: *i64, km: *i64, vm: *i64, om: *i64, t: i64, d: i64) -> i64 called by 1: main |
| 41 | func main() -> i64 |