code wiki / (root) / nx_bench_stress_autoreg_test.nx

nx_bench_stress_autoreg_test.nx

buildroot/runtime/nx_bench_stress_autoreg_test.nx

6004 B145 linesdepth 11pulls 44 transitivereach 0 importersview sourcekind gate/prooftopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_stress_autoreg_test.nx -- 10-iteration REAL transformer stress test with wall-clock measurement. Where nx_actor_role_llm_v2_real_autoreg_test does 3 iterations for correctness, this smoke does 10 to exercise the substrate under load + capture honest wall-clock numbers. Each iteration drives the v2 LLM actor through INIT -> RUN (full Llama-class transformer forward via nx_llm_generate_one_v2) -> EMIT. Real embedding lookup + RMSNorm + multi-head attention + SwiGLU FFN + output projection + sample. Listener mailbox receives 10 LLM_TOKEN messages. Substrate invariants verified under load: * All 10 iterations succeed (every runner_result >= 0) * All 10 tokens are in [0, vocab) * Listener mailbox correctly handles 10 messages * Scheduler counters scale linearly (30 actor steps, 30000us cumulative runtime) * Wall-clock elapsed > 0 (substrate actually ran wall-time work) HONEST SCOPE: wall-clock under qemu-riscv64 isn't physical-hardware time. When Phase E + a physical-board arc land, this same smoke will produce defensible numbers without code changes.

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_clock.nx nx_actor.nx nx_message.nx nx_session.nx nx_bench_companion.nx nx_bench_companion_timed.nx nx_gguf_fixture_tiny.nx nx_actor_role_llm_v2.nx nx_bench_stress_autoreg_test.n

imports: nx_syscalls.nxnx_tier.nxnx_clock.nxnx_actor.nxnx_message.nxnx_session.nxnx_bench_companion.nxnx_bench_companion_timed.nxnx_gguf_fixture_tiny.nxnx_actor_role_llm_v2.nx

imported by: nobody (leaf or entry point)

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

main nx_gft_build_tiny_llama sys_mmap nx_le_write_u64 nx_le_write_u32 _gft_mk_blk_name _gft_write_ti nx_le_write_u64 ↻ nx_le_write_u32 ↻ nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gguf_skip_value ↻ sys_mmap ↻ nx_model_spec_new sys_mmap ↻ nx_model_spec_validate nx_norm_is_valid nx_act_is_valid nx_pos_is_valid nx_ffn_is_valid nx_bpe_vocab_new sys_mmap ↻ nx_intern_new nx_intern_next_pow2 nx_hash_new nx_bpe_add_token nx_intern_get nx_hash_fnv1a_bytes nx_hash_get nx_hash_probe nx_hash_fnv1a_i64 nx_intern_bytes_eq nx_hash_put nx_hash_probe ↻ nx_prng_init

structs

none

consts

none

functions

37func main() -> i64