nx_vitpose_loadtest.nx
buildroot/runtime/nx_vitpose_loadtest.nx
about
nx_vitpose_loadtest.nx -- prove nx_safetensors_load reads REAL tensor values from the downloaded 343MB ViTPose
file, via TARGETED reads (header + seek to one tensor's bytes) so it never loads the whole body. Loads
head.conv.bias [17] and patch_embeddings.projection.bias [768], prints the count + first values as a sanity that
the assembly's weight-load path works on the real model. expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_f32.nxnx_f32_cvt.nxnx_safetensors_load.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
| 9 | const K_MAGIC_10000: i64 = 10000 |
| 10 | const K_MAGIC_4096: i64 = 4096 |
| 11 | const K_MAGIC_1024: i64 = 1024 |
functions
| 13 | func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 14 | func wn(v: i64) -> i64 { var m: i64=v; if m<0{w("-" as *u8);m=0-m} let t:*u8=sys_mmap(24); var k:i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i:i64=0; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 } |
| 16 | func wf(x: i64) -> i64 |
| 36 | func f32_to_i64_trunc(x: i64) -> i64 |
| 45 | func readfile(path: *u8, buf: *u8, cap: i64) -> i64 |
| 52 | func u64le(buf: *u8, off: i64) -> i64 { var v: i64=0; var i: i64=0; while i<8 { v = v | ((buf[off+i]&0xff) << (i*8)); i=i+1 } return v } called by 1: main |
| 55 | func load_one(fd: i64, hbuf: *u8, hlen: i64, data_start: i64, name: *u8, out: *i64) -> i64 |
| 68 | func main() -> i64 |