ci: make CUDA conditional lane GPU-capable

This commit is contained in:
Joseph Magly
2026-08-16 09:23:22 -04:00
parent baf5331730
commit fa233fd8c9
4 changed files with 42 additions and 5 deletions
+10 -1
View File
@@ -55,12 +55,21 @@ Set the repository variable `ENABLE_CUDA_GATE=true` for scheduled/release eviden
or select CUDA during manual dispatch. The gate verifies CUDA discovery, automatic
selection, dtype selection, tensor placement, matrix multiplication, bitsandbytes
availability, NF4 quantization, dequantization, shape, placement, and finite output.
The expected cost is below 20 self-hosted runner-minutes.
The expected cost is below 20 self-hosted runner-minutes. Mandatory Linux CI
deliberately locks CPU-only Torch. The selected CUDA job reads that exact locked
base version, replaces only Torch with the same-version official `cu130` build,
asserts a CUDA build was installed, and runs `uv pip check` before executing the
probes.
For an operator run on the labeled machine:
```bash
uv sync --locked --extra dev
CUDA_TORCH_VERSION="$(.venv/bin/python -c \
'import torch; print(torch.__version__.split("+", 1)[0])')"
UV_TORCH_BACKEND=cu130 uv pip install --python .venv/bin/python \
--reinstall-package torch "torch==$CUDA_TORCH_VERSION"
uv pip check --python .venv/bin/python
uv run --extra dev python scripts/run_conditional_gate.py cuda-runtime
uv run --extra dev python scripts/run_conditional_gate.py bitsandbytes-runtime
```