code wiki / (root) / nx_gguf_load_test.nx

nx_gguf_load_test.nx

buildroot/runtime/nx_gguf_load_test.nx

6372 B164 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic gguf
docsdependenciesstructsconstsfunctions

about

nx_gguf_load_test.nx -- smoke for nx_gguf_load.nx. Builds a synthetic GGUF blob in memory with two tensors: tensor[0] "score" : F32 shape [2,2] = {1.0, 2.0, 0.5, -1.0} tensor[1] "weight" : Q8_0 shape [32] scale=0.5, qs={0,1,2,...,31} => values {0, 0.5, 1.0, ..., 15.5} Verifies: - parse + name lookup + not-found verdict - format-helper bytes/values per block + total bytes - f32 → Q10 unit conversions on canonical bit patterns - f16 → Q10 unit conversions on canonical bit patterns - end-to-end load + dequant for F32 and Q8_0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_tensor.nx nx_gguf.nx nx_gguf_load.nx nx_gguf_load_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_tensor.nxnx_gguf.nxnx_gguf_load.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 nx_le_write_u64 nx_le_write_u32 nx_le_write_u32 ↻ nx_le_write_u16 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_gl_verdict_is_valid nx_gguf_find_tensor nx_gguf_tensor_at nx_gguf_name_equals nx_gguf_tensor_at ↻ nx_gguf_ggml_values_per_bl nx_gguf_ggml_bytes_per_blo nx_gguf_tensor_n_values nx_gguf_tensor_data_bytes nx_gguf_tensor_n_values ↻ nx_gguf_ggml_values_per_bl ↻ nx_gguf_ggml_bytes_per_blo ↻ _gguf_f32_to_q10 _gguf_f16_to_q10 nx_gguf_load_tensor nx_gguf_find_tensor ↻ 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

structs

none

consts

none

functions

22func main() -> i64