From c556e0dd4c94d3736cf36db55ae15a5320e63b7b Mon Sep 17 00:00:00 2001 From: Ivan Basov Date: Mon, 16 Nov 2026 10:34:58 -0800 Subject: [PATCH] Take CUDA 12 PyTorch from the cu128 index in the cu12 training requirements pip install -r code/requirements_public_train-cu12.txt against PyPI alone now resolves torch 2.10.0 with cuda-bindings 12.9.4: newer PyPI torch requires cuda-bindings 13.x, which cuquantum-python-cu12 (<13) rejects, so pip backtracks to the last torch that pins a 12.x cuda-bindings. cuda-core 1.3.0 refuses to import with cuda-bindings older than 12.9.8, so the cuStabilizer backend fails with ImportError. This breaks the README install and the mid-gpu-tests, multi-gpu-tests and gpu-coverage CI jobs. Declare the cu128 PyTorch index in the requirements file. The same file then resolves torch 2.11.0+cu128 with cuda-bindings 12.9.10, the set the gpu-tests matrix already runs. Co-Authored-By: Claude Fable 5.2 Signed-off-by: Ivan Basov --- README.md | 3 ++- code/requirements_public_train-cu12.txt | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c750e21..94c6c9b 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,8 @@ export TORCH_CUDA=cu130 # Inference-only (training install is a superset) pip install -r code/requirements_public_inference.txt -# Training (includes inference deps, adjust to cu13 as appropriate) +# Training (includes inference deps, adjust to cu13 as appropriate). +# The cu12 file takes PyTorch from the cu128 wheel index. pip install -r code/requirements_public_train-cu12.txt bash code/scripts/check_python_compat.sh diff --git a/code/requirements_public_train-cu12.txt b/code/requirements_public_train-cu12.txt index 9b9fad0..ebcb88f 100644 --- a/code/requirements_public_train-cu12.txt +++ b/code/requirements_public_train-cu12.txt @@ -16,6 +16,12 @@ # Public training requirements (Torch-only pipeline). # Install a PyTorch build compatible with your Python/CUDA stack. # Target Python versions: 3.11, 3.12, 3.13 +# +# Take PyTorch from the cu128 wheel index. Current PyPI torch releases require +# cuda-bindings 13.x, which cuquantum-python-cu12 does not accept; with PyPI +# alone pip falls back to torch 2.10.0, whose cuda-bindings==12.9.4 pin is too +# old for cuda-core>=1.3 (import fails in the cuStabilizer backend). +--extra-index-url https://download.pytorch.org/whl/cu128 -r requirements_public_inference.txt cuquantum-python-cu12>=26.03.0 tensorboard