code wiki / (root) / _attn_exp_hoist_gate.nx

_attn_exp_hoist_gate.nx

buildroot/runtime/_attn_exp_hoist_gate.nx

2382 B44 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

_attn_exp_hoist_gate.nx -- byte-identity gate for SPD-ALG-TENSOR-001 (attention-exp-lut-hoist). Proves the hoisted hot-path _attn_exp_q10_lut(x, lut) returns values BYTE-IDENTICAL to the per-call _attn_exp_q10(x) across the full input range, so moving the LUT build above the softmax / flash-attention loops changes ZERO outputs (only the per-element sys_mmap count: R*C -> 1). NEG control proves teeth. Emits the SPDGATE probe the speed census re_has-matches. Sovereign native lane: exit 0 = GREEN, N = first failed assertion. One build+run (LM-009/010).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_attention.nx _attn_exp_hoist_gate.nx

imports: nx_syscalls.nxnx_attention.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap _attn_exp_lut_fill _attn_exp_q10 sys_mmap ↻ _attn_exp_lut_fill ↻ _attn_exp_q10_lut _attn_exp_q10_lut ↻ gw sys_write sys_openat_append sys_close

structs

none

consts

10const AEH_LOG: *u8 = "knowledge/status/speed_gate.log"

functions

12func gw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
14func main() -> i64