code wiki / _hdl_build / nx_gpu_matcher.nx
nx_gpu_matcher.nx source
↩ module page · 46 lines · 3516 B
1// nx_gpu_matcher.nx -- sovereign GPU-provider MATCHER for our exact sovereign-development spec (verified 2026-07-14).
2// The axis that actually filters providers is NOT the 5090 or CUDA (install those yourself as root) -- it is
3// raw /dev/nvidia* + nvidia-smi -lgc, which need VM-passthrough or physical METAL (you OWN the driver), NOT a
4// container (root-in-container shares the host driver -> clock/device denied). "root alone" is the trap. Data below
5// verified against live provider pages + NVIDIA docs. Belongs on the compare-plane as /compare/gpu-sovereign.
6import "nx_syscalls.nx"
7const NP: i64 = 7
8// bits (ALL 8 = 255): b0=1 sm120 | b1=2 single-GPU | b2=4 bare-metal/passthrough | b3=8 root | b4=16 raw-/dev/nvidia | b5=32 clock-lock | b6=64 CUDA>=12.8(installable) | b7=128 hourly/no-commit
9const REQ_ALL: i64 = 255
10
11func puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
12func putn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1}; sys_write(1,b,k); return 0 }
13
14func row(nm: *u8, met: i64, cents: i64, note: *u8) -> i64 {
15 var v: i64 = 0; if (met & REQ_ALL) == REQ_ALL { v = 1 }
16 puts(" " as *u8); puts(nm)
17 if v == 1 { puts(" VIABLE " as *u8) } else {
18 puts(" FAIL:" as *u8)
19 if (met & 4)==0 { puts(" bare-metal" as *u8) }
20 if (met & 16)==0 { puts(" raw-dev" as *u8) }
21 if (met & 32)==0 { puts(" clock-lock" as *u8) }
22 if (met & 128)==0{ puts(" hourly" as *u8) }
23 if (met & 1)==0 { puts(" sm120" as *u8) }
24 if (met & 2)==0 { puts(" 1gpu" as *u8) }
25 }
26 puts(" ~$" as *u8); if cents>0 { putn(cents/100); puts("." as *u8); let c: i64=cents%100; if c<10{puts("0" as *u8)}; putn(c) } else { puts("?" as *u8) }
27 puts("/hr " as *u8); puts(note); puts("\n" as *u8)
28 return v
29}
30
31func main() -> i64 {
32 puts("=== sovereign-GPU matcher (verified 2026-07-14): 1x RTX5090 sm_120, bare-metal, root, raw-dev, clock-lock, hourly ===\n" as *u8)
33 puts(" -- VIABLE (all 8 requirements) --\n" as *u8)
34 var v: i64 = 0
35 v = v + row("OpenRelay " as *u8, 255, 39, "CHEAPEST; VFIO passthrough, per-min, $5 dep (early-access-verify stock)" as *u8)
36 v = v + row("CloudRift " as *u8, 255, 62, "CLEANEST; dedicated VM own-kernel + IOMMU passthrough, self-serve (pick VM not Container mode)" as *u8)
37 v = v + row("TensorDock " as *u8, 255, 67, "KVM passthrough, per-second (5090 in login console only-verify stock)" as *u8)
38 v = v + row("HostKey " as *u8, 255, 68, "PHYSICAL bare metal (IPMI), CUDA 13.x CONFIRMED, hourly (~15min provision)" as *u8)
39 v = v + row("Vast.ai VM " as *u8, 255, 40, "cheap, but MUST filter vms_enabled (default pod=container=FAILS)" as *u8)
40 puts(" -- FAIL (>=1 hard req) --\n" as *u8)
41 row("Spheron " as *u8, 203, 92, "*** what you were about to buy = DOCKER CONTAINER (root-in-container); sovereign submit CANNOT work ***" as *u8)
42 row("ServerMO " as *u8, 127, 0, "real bare-metal+root but MONTHLY-ONLY (~$800+/mo)" as *u8)
43 puts(" => " as *u8); putn(v); puts(" VIABLE. Confirm at first boot (10s): ls /dev/nvidia* ; nvidia-smi(drv>=570) ; sudo nvidia-smi -lgc 2400,2400\n" as *u8)
44 puts(" Hedge: RTX PRO 6000 Blackwell is ALSO sm_120 (same submit target) if 5090 stock thin. B200/GB200=sm_100=WRONG.\n" as *u8)
45 return 0
46}