| 1 | # GPU tensor unlock |
| 2 | |
| 3 | [The host module](../nixos/gpu-unlock.nix) builds the pinned upstream kernel |
| 4 | module and extracts its NVIDIA firmware without executing the driver installer. |
| 5 | It runs in the initrd before the normal NVIDIA driver. The installed driver |
| 6 | and kernel stay on the repository's existing versions. The target is the |
| 7 | current GPU's PCI address; a different address is skipped by upstream. |
| 8 | |
| 9 | `python3 tools/deploy.py stage host` builds and installs a candidate boot |
| 10 | generation from an immutable uploaded release. It preserves the previous |
| 11 | default boot entry and leaves the running host, services, and published release |
| 12 | unchanged. It prints the candidate entry and fallback. Only after reboot |
| 13 | approval, select the printed entry with `bootctl set-oneshot <entry>` and |
| 14 | reboot. A subsequent boot uses the previous default again. Promote the reviewed |
| 15 | source through the normal main deployment workflow when retaining the change. |
| 16 | After promotion, clear the trial's EFI default with `bootctl set-default ''` |
| 17 | so NixOS's `loader.conf` selects the production generation on subsequent boots. |
| 18 | |
| 19 | Before rebooting, inspect the candidate and fallback initrds for the MAC-bound |
| 20 | Ethernet link rule, and verify both static addresses and the gateway in the |
| 21 | built system. The [isolated boot test](../nixos/tests/snowglobe-network.nix) |
| 22 | exercises the same network module and GPU module in a disposable VM. |
| 23 | |
| 24 | Run [the benchmark](benchmark-gpu-unlock.py) with the existing inference image's |
| 25 | Python and environment, using `inference --phase before-<run>` and |
| 26 | `tensor --phase before-<run>`. Repeat with `after-<run>` after the approved boot. |
| 27 | Keep the script, image, model, serving settings, lengths, and seeds identical. |
| 28 | Each context length has three uncached requests with a fixed output budget; |
| 29 | measurements include server prefill/decode time, streamed first-token latency, |
| 30 | speculation counters, and output hashes. Tensor tests use CUDA events and |
| 31 | FP32 accumulation, plus FP32 and integer controls, while retaining GPU memory |
| 32 | for the resident model. The script rejects busy inference and records skipped |
| 33 | tensor sizes if memory is insufficient. Save stdout with host/GPU metadata |
| 34 | and clock, power, and temperature telemetry. These are synthetic performance |
| 35 | probes, not model-quality evaluations. |