code wiki / (root) / nx_dual_real_llm_compose_test.nx

nx_dual_real_llm_compose_test.nx

buildroot/runtime/nx_dual_real_llm_compose_test.nx

8030 B186 linesdepth 11pulls 44 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_dual_real_llm_compose_test.nx -- TWO v2 LLM actors concurrent on REAL transformer forward, with wall-clock measurement. Substrate-honest version of [[nx_dual_companion_compose_test]] which used synthetic 4-vocab manual matmul. THIS smoke runs two independent v2 LLM actors that each drive the FULL Llama-class runner (embedding + RoPE + RMSNorm + multi-head attention + SwiGLU FFN + output projection + sample) cooperatively interleaved through one nx_session. Each generates 5 tokens autoregressively. Output from both actors flows through one multiplexer to one listener. Substrate invariants verified under DOUBLED real-transformer load: * Both actors complete cleanly across 5 iterations each * 10 LLM_TOKEN messages delivered (5 from each) * All 10 tokens in [0, vocab) * Counters scale: 30 actor steps total (5 iters * 3 phases * 2 actors = 30) * Wall-clock measured around the whole concurrent workload * Multiplexer correctly orders chunks from both actors by priority HONEST SCOPE: cooperative interleaving under qemu-riscv64, not physical-parallel kernel execution. Phase E required for that. But the substrate-honest claim PROVABLE today: one session hosts two independent REAL transformer-forward actors without state cross-contamination, message-bus collision, or arbiter starvation.

dependencies 11 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_clock.nx nx_actor.nx nx_message.nx nx_stream_multiplexer.nx nx_session.nx nx_bench_companion.nx nx_bench_companion_timed.nx nx_gguf_fixture_tiny.nx nx_dual_real_llm_compose_test.

diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_tier.nxnx_clock.nxnx_actor.nxnx_message.nxnx_stream_multiplexer.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

39func main() -> i64