code wiki / (root) / nx_bench_v1_vs_v2_test.nx

nx_bench_v1_vs_v2_test.nx

buildroot/runtime/nx_bench_v1_vs_v2_test.nx

7485 B191 linesdepth 11pulls 44 transitivereach 0 importersview sourcekind gate/prooftopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_v1_vs_v2_test.nx -- first paired substrate measurement. Per CARDINAL [[feedback-no-strawman-perf-comparisons]]: no perf ratio without paired measurement. This smoke is the smallest honest paired comparison: ARM A: nx_actor_role_llm (manual 4-vocab embed+matmul+sample pipeline, single token) ARM B: nx_actor_role_llm_v2 (real Llama-class transformer forward via nx_llm_generate_one_v2, single token) Both arms drive the SAME prompt + SAME PRNG seed through the same session shape (nx_session_new_default), then capture the substrate counters into NxBenchReport. The delta tells the operator: * How many actor steps each arm consumed * How much cumulative runtime each arm reported * How many messages each arm produced through the bus HONEST SCOPE: this is NOT a wall-clock benchmark. qemu-riscv64 is single-threaded; wall-clock comparisons are meaningless without physical-hardware runs (Phase E queued). What this primitive proves: the bench-capture substrate produces DETERMINISTIC paired counters, so when Phase E + a llama.cpp comparison rig land, the substrate already speaks the right language.

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_tensor.nx nx_actor.nx nx_message.nx nx_session.nx nx_bench_companion.nx nx_gguf_fixture_tiny.nx nx_actor_role_llm.nx nx_actor_role_llm_v2.nx nx_bench_v1_vs_v2_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_tensor.nxnx_actor.nxnx_message.nxnx_session.nxnx_bench_companion.nxnx_gguf_fixture_tiny.nxnx_actor_role_llm.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

38func _fill_q10(t: *NxTensor, base: i64, stride: i64) -> i64
called by 1: main
48func main() -> i64