nx_dual_companion_compose_test.nx
buildroot/runtime/nx_dual_companion_compose_test.nx
about
nx_dual_companion_compose_test.nx -- two-actor concurrent inference proof.
The parallel-companion north star concretized: NARRATOR + NPC actors
running interleaved cooperative steps, each generating 3 tokens
autoregressively, output ordered through one multiplexer.
What this proves end-to-end:
1. Two independent LLM-actor contexts can share the same scheduler +
message bus + multiplexer without state corruption.
2. Cooperative pick_next interleaves them by priority + fairness.
3. nx_lr_actor_reset_for_next_token lets each actor roll into the
next token using its own previous output (autoregressive loop).
4. Multiplexer correctly orders concurrent tokens by stream class
priority (NARRATOR LLM_TEXT > NPC LLM_TEXT same class, FIFO
tie-break + arrival-time tracking).
5. The other-agent's embedding + matmul + sample primitives are
invoked 12 times (6 tokens x 2 actors x 3 primitive calls each)
without leak / overflow / state cross-contamination.
This is the smallest substrate-honest demonstration of the
[[feedback-parallel-companion-multimodal-dnd-real-time]] cardinal.
dependencies 7 imports · 0 importers
imports: nx_syscalls.nxnx_tier.nxnx_tensor.nxnx_actor.nxnx_message.nxnx_stream_multiplexer.nxnx_actor_role_llm.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
| none |
functions
| 33 | func _fill_q10(t: *NxTensor, base: i64, stride: i64) -> i64 called by 1: main |
| 43 | func main() -> i64 |