nx_q5_0_to_f32_test.nx
buildroot/runtime/nx_q5_0_to_f32_test.nx
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
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
structs
| none |
consts
| none |
functions
| 22 | func main() -> i64 |