code wiki / (root) / nx_q5_0_to_f32_test.nx

nx_q5_0_to_f32_test.nx

buildroot/runtime/nx_q5_0_to_f32_test.nx

2223 B57 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic q5
docsdependenciesstructsconstsfunctions

about

nx_q5_0_to_f32_test.nx -- smoke for nx_q5_0_to_f32.nx. Synthetic Q5_0 block per ggml convention: d = 1.0 (f16=0x3C00) qh = 0xFF (bits 0..7 set, so qh_bit_lo for j=0..7 is 1; qh_bit_hi for j=0..7 (= positions 16..23) is bit(j+16)=0) qs bytes: byte j has low nibble = j, high nibble = j+16 (chosen so that bit-exact verification is straightforward) Expected per-position values (after this commit's bug fix): j in 0..7: value[j] = (qs_low | 16) - 16 = j -> f32(j) j in 8..15: value[j] = qs_low - 16 = j - 16 -> negative j in 0..15: value[j+16] = qs_high - 16 (qh_bit_hi=0) with qs_high = (j+16): value = j + 16 - 16 = j -> f32(j)

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_le.nx nx_f32.nx nx_q5_0_to_f32.nx nx_q5_0_to_f32_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_le.nxnx_f32.nxnx_q5_0_to_f32.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_u16 nx_le_write_u32 nx_q5_0_to_f32 _nx_q5_0_block_to_f32 nx_le_read_u16 nx_f16_to_f32 nx_le_read_u32 nx_le_read_u8

structs

none

consts

none

functions

22func main() -> i64