cuda-crack
I broke CUDA: GB10 sm_121 machine code without the CUDA toolkit - method, encoder tables, receipts
Brought by drakestapleton
cuda-crack / REPRODUCE.md
| 1 | # Reproduce |
| 2 | |
| 3 | ## Without a GPU: the tables and the chip kernels |
| 4 | |
| 5 | See the five-minute path in `README.md`. It needs only a Linux machine that runs the pinned Omega seed compiler (omega-mv `seed/` says which platform it targets) and the pinned omc, sha256 `3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194`. |
| 6 | |
| 7 | ```sh |
| 8 | rad clone rad:z6do9WDBhuSnvopDkgFdFr1yWA62 omega-mv # or: git clone https://www.aienos.com/rad/z6do9WDBhuSnvopDkgFdFr1yWA62.git omega-mv |
| 9 | # build or fetch seed/out/omc as omega-mv's seed/README describes, then check its sha256 |
| 10 | OMC=$PWD/omega-mv/seed/out/omc |
| 11 | rad clone rad:z631r2JJiVT8it4tST7RK24hpowi cuda-crack # or: git clone https://www.aienos.com/rad/z631r2JJiVT8it4tST7RK24hpowi.git cuda-crack |
| 12 | cd cuda-crack |
| 13 | (cd receipts && sha256sum -c SHA256SUMS) |
| 14 | OMC=$OMC gen/run.sh && git diff --exit-code isa/ |
| 15 | OMC=$OMC check/check.sh # expect: ALL CHECKS PASS |
| 16 | ``` |
| 17 | |
| 18 | ## On a GB10 (DGX Spark): run my machine code yourself |
| 19 | |
| 20 | You need: Linux on the Spark's ARM CPU, NVIDIA's open kernel module **580.173.02** (the doctor refuses other versions), NVIDIA's signed GSP firmware that the module loads, `git`, `make` and a C compiler. No CUDA toolkit. |
| 21 | |
| 22 | ```sh |
| 23 | rad clone rad:z4RxD8vXigmWg61nM8miQ8DVPAXEP CUDApp # or: git clone https://www.aienos.com/rad/z4RxD8vXigmWg61nM8miQ8DVPAXEP.git CUDApp |
| 24 | cd CUDApp |
| 25 | git checkout b774723f537cec16a359fe082b8100317a5b5490 |
| 26 | make doctor # reads /proc, /sys and /dev only; names any problem and its fix |
| 27 | make hello-gpu # vector add of 1,048,576 elements, every answer checked on the CPU; PASS, exit 0 |
| 28 | make hello-gpu-control # the planted-bug control: must FAIL, exit 1 |
| 29 | ``` |
| 30 | |
| 31 | `CUDAPP_ENCODER=om` is the default, so the machine code comes from the Omega encoder `om/encoder/bw_enc_sm121.om`, the same file as `gen/bw_enc_sm121.om` here. Compare your logs with mine in `receipts/cudapp/evidence/CUDAPP-OM-ENCODER/chip-20261027T080240Z/` (`om-doctor.log`, `om-hello.log`, `om-hello-control.log`). `build/hello_gpu --sim` runs the same kernel on the host simulator with no GPU. |
| 32 | |
| 33 | The kernel byte check behind E3 (70 chip kernels, Omega encoder vs C encoder) and the host corpus (243 kernels) are `make test-om-encoder-corpus` and `make test-om-encoder-mutants` in CUDApp; their outputs are in `receipts/cudapp/evidence/CUDAPP-OM-ENCODER/host/`. |
| 34 | |
| 35 | These are research results on one chip family. Running them on your machine is at your own risk; nothing here changes clocks, power, thermal or fan limits, or flashes firmware. |