code wiki / (root) / nx_gguf_load_block_test.nx

nx_gguf_load_block_test.nx

buildroot/runtime/nx_gguf_load_block_test.nx

7019 B172 linesdepth 8pulls 22 transitivereach 0 importersview sourcekind gate/prooftopic gguf
docsdependenciesstructsconstsfunctions

about

nx_gguf_load_block_test.nx -- smoke for nx_gguf_load_block.nx. Two test classes: A) Name-formatting unit checks: format "blk.{N}.{suffix}" with different layer indices + suffix strings; verify byte-equal to expected literal. B) End-to-end integration: build a synthetic GGUF with a single layer-0 attn_norm tensor (F32 shape [2]); call the loader's _gbl_load_blk_tensor; verify it finds + loads correctly. Full 9-tensor end-to-end smoke is deferred to the `nx_llm_run` v2 brick where it composes with the transformer block forward pass. THIS smoke validates the new code paths (name fmt + per-tensor helper) under the bits-up canonical-brick discipline.

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_tensor.nx nx_rope.nx nx_gguf.nx nx_gguf_load.nx nx_gguf_load_block.nx nx_gguf_load_block_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_tensor.nxnx_rope.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_load_block.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap _gbl_fmt_blk_name nx_strconv_format_i64 _byte_equal nx_gbl_verdict_is_valid nx_le_write_u64 nx_le_write_u32 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 ↻ _gbl_load_blk_tensor sys_mmap ↻ _gbl_fmt_blk_name ↻ nx_gguf_load_tensor nx_gguf_find_tensor nx_gguf_tensor_at nx_gguf_name_equals nx_gguf_tensor_at ↻ nx_gguf_tensor_n_values sys_mmap ↻ nx_t_alloc nx_dt_is_valid nx_dt_element_bytes sys_mmap ↻ nx_t_compute_strides_rowma nx_gguf_dequant_f32 nx_le_read_u32 ↻ _gguf_f32_to_q10 nx_gguf_dequant_f16 nx_le_read_u16 _gguf_f16_to_q10 nx_gguf_dequant_q8_0

structs

none

consts

none

functions

26func _byte_equal(a: *u8, b: *u8, n: nx_int) -> nx_int
called by 1: main
35func main() -> i64