code wiki / (root) / nx_kv_cache_test.nx

nx_kv_cache_test.nx

buildroot/runtime/nx_kv_cache_test.nx

8287 B217 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic kv
docsdependenciesstructsconstsfunctions

about

nx_kv_cache_test.nx -- incremental autoregressive verification. Build a 2-head cache, append 4 tokens one at a time, run scoring each step, verify the cached scores match a "from scratch" full recompute (oracle bit-exact). This is the algo-led-correctness gate: O(n) per step must produce the same answer as O(n^2).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_kv_cache.nx nx_kv_cache_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_kv_cache.nx

imported by: nobody (leaf or entry point)

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

main nx_kv_alloc sys_mmap nx_kv_bytes_per_token nx_kv_fill_ratio_q10 sys_mmap ↻ nx_kv_append nx_kv_get_k nx_kv_get_v nx_kv_score nx_kv_apply nx_kv_clear nx_kv_verdict_is_valid

structs

none

consts

none

functions

12func main() -> nx_int