nx_vit_speed_probe.nx
buildroot/runtime/nx_vit_speed_probe.nx
about
nx_vit_speed_probe.nx -- measure the software-f32 matmul rate (MAC/s) to decide if a FAITHFUL f32 ViTPose forward
is viable or if the port must ride the int8 path. Times one GEMM A[32,512]@B[512,512] (8.4M MACs) and extrapolates
to a full ViTPose-base forward (~17.5 GMAC: patch-embed + 12x[QKV+attn+dense+fc1+fc2] + head conv). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_f32_cvt.nxnx_f32_matmul.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
| 7 | const K_MAGIC_1000000: i64 = 1000000 |
| 8 | const K_MAGIC_17500000000: i64 = 17500000000 |
functions
| 10 | 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 } |
| 11 | 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 } |
| 13 | func main() -> i64 |