Repository navigation
Studio: install torch 2.11 on all modern CUDA (cu126/cu128/cu130) - #6997
danielhanchen wants to merge 1 commit into
Conversation
Extend the rocm7.2 TORCH_CONSTRAINT override in install.sh to the CUDA 12.6+/13 indexes, which all publish torch 2.11.0 wheels. torchao 0.17's cpp kernels load on 2.11 and flash-attn/causal-conv1d/mamba reuse their torch2.10 wheels there (prebuilt_wheel_torch_mm). Older CUDA (cu124/cu118), other ROCm tags, CPU and macOS keep the <2.11.0 default since torch 2.11 ships no wheels for them. Adds structural tests asserting each cu126/cu128/cu130 override. Generalizes #6982 (cu130 only).
There was a problem hiding this comment.
Code Review
This pull request updates install.sh to allow PyTorch 2.11.0 for CUDA 12.6+ and 13 indexes (cu126, cu128, cu130) by adjusting the TORCH_CONSTRAINT variable. It also adds corresponding unit tests in tests/sh/test_torch_constraint.sh to verify these overrides. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54b934a6b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| */cu130) TORCH_CONSTRAINT="torch>=2.11.0,<2.12.0" ;; | ||
| */cu128) TORCH_CONSTRAINT="torch>=2.11.0,<2.12.0" ;; | ||
| */cu126) TORCH_CONSTRAINT="torch>=2.11.0,<2.12.0" ;; |
There was a problem hiding this comment.
Gate torch 2.11 on supported Python versions
When a user installs with --python 3.9 (still accepted by this installer and by the package's >=3.9 metadata), any cu126/cu128/cu130 host now forces torch>=2.11.0,<2.12.0 into the Step 1 uv pip install. PyTorch 2.11 wheels start at cp310, so that combination has no torch candidate and fails, whereas the previous <2.11.0 ceiling could resolve an older cp39 CUDA wheel. Please keep the old ceiling for Python 3.9 or reject that Python before applying the modern-CUDA override.
Useful? React with 👍 / 👎.
|
Folded into #6982, which now covers all modern CUDA (cu126/cu128/cu130). Closing in favor of that. |
Summary
Install torch 2.11 on all modern CUDA indexes, not just Blackwell/cu130. This extends the existing
rocm7.2TORCH_CONSTRAINToverride ininstall.shto the CUDA 12.6+/13 indexes (cu126,cu128,cu130), all of which publish torch 2.11.0 wheels. It generalizes #6982 (which did cu130 only) into one coherent change for the whole modern-CUDA stack.The default
torch>=2.4,<2.11.0is intentionally left untouched, so older CUDA (cu124/cu118), other ROCm tags, CPU, and macOS stay on the 2.10 family. torch 2.11 publishes no wheels for those indexes, so bumping the default would make old-driver fresh installs resolve a nonexistent wheel and fail. Keeping the default also means the "hardcoded torch>=2.4 appears exactly once" test guard stays valid.torch 2.11 is already supported end to end from #6970: torchao 0.17's cpp kernels load on 2.11, and flash-attn / causal-conv1d / mamba reuse their torch2.10 wheels via
wheel_utils.prebuilt_wheel_torch_mm. GPU-arch support is unchanged:cu1262.11 keeps Maxwell/Pascal/Volta/Turing+, andcu128/cu130are Turing (SM 7.5)+ exactly as their 2.10 counterparts were.Verification
Structural tests:
tests/sh/test_torch_constraint.shasserts each cu126/cu128/cu130 override is present (26 -> now covers all three) and passes 28/28;tests/python/test_tokenizers_and_torch_constraint.pyandstudio/backend/tests/test_torchao_select.pypass.Stack smoke on a B200 (sm_100, compute cap 10.0) with a fresh torch 2.11.0+cu130 venv, the exact wheels the installer selects:
max|err| = 8.1e-03(bf16)Linearruns (cpp path loads, output finite)Linear4bitruns, output finiteThis complements the RTX 5090 (sm_120) run in #6982, so both Blackwell tiers are covered on torch 2.11.
Scope / follow-ups
Related: #6961, #6970, #6982.