code wiki / (root) / nx_f32_llama_stack.nx

nx_f32_llama_stack.nx

buildroot/runtime/nx_f32_llama_stack.nx

4322 B121 linesdepth 9pulls 18 transitivereach 57 importersview sourcekind librarytopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_llama_stack.nx -- multi-block transformer stack forward. Calls nx_f32_llama_block_forward_v3 N times across the layers array, then advances the KV cache ONCE per forward pass. Double-buffered execution: alternates between buf_a and buf_b to avoid allocating per-layer scratch. The final result lands in x_out (which may NOT alias x_in). Layers array: layers[i] is the i64 value of a *NxF32LlamaLayer. Caller is responsible for allocating + populating each layer. genealogy_id: standard_transformer_stack lineage_id: substrate_f32_llama_stack_v1

dependencies 5 imports · 7 importers

nx_syscalls.nx nx_tier.nx nx_f32.nx nx_f32_kv_cache.nx nx_f32_llama_block.nx nx_f32_llama_stack.nx nx_f32_llama_stack_test.nx nx_f32_llm.nx nx_f32_llm_e2e_test.nx nx_f32_llm_load_test.nx nx_f32_llm_run_test.nx nx_f32_llm_run_v2_test.nx nx_f32_llm_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_f32.nxnx_f32_kv_cache.nxnx_f32_llama_block.nx

imported by: nx_f32_llama_stack_test.nxnx_f32_llm.nxnx_f32_llm_e2e_test.nxnx_f32_llm_load_test.nxnx_f32_llm_run_test.nxnx_f32_llm_run_v2_test.nxnx_f32_llm_test.nx

structs

none

consts

22const NX_F32_STK_OK: nx_int = 0
23const NX_F32_STK_ERR_BAD_DIM: nx_int = 1
24const NX_F32_STK_ERR_NULL: nx_int = 2
25const NX_F32_STK_ERR_LAYER: nx_int = 3
26const NX_F32_STK_N_VERDICTS: nx_int = 4

functions

28func nx_f32_stk_verdict_is_valid(v: nx_int) -> nx_int
called by 1: main
36func nx_f32_llama_stack_forward(