fix(install): route Strix to AMD gfx index on ROCm 7.14#7300
Conversation
When ROCm 7.3+ caps to the generic pytorch.org rocm7.2 index (or the Radeon repo is unavailable), gfx1150/gfx1151 hosts were left on torch 2.11+rocm7.2 instead of AMD's arch-specific wheels. Broaden the Strix reroute in install.sh and studio/install_python_stack.py so `studio update` repairs the same path as fresh installs (unslothai#7280).
There was a problem hiding this comment.
Code Review
This pull request updates the installation scripts (install.sh and install_python_stack.py) to improve support for AMD Strix Halo and Strix Point GPUs (gfx1151/gfx1150). Specifically, it extends the routing logic to AMD's arch-specific PyTorch index to cover both ROCm 7.1 and ROCm 7.2 environments, rather than just ROCm 7.1. It also introduces a PCI bus check (_amd_gpu_present_via_pci) to detect when an AMD GPU is physically present but ROCm is unable to see it, providing helpful troubleshooting guidance. Corresponding unit tests have been added and updated to verify these changes. There are no review comments to address, so no additional feedback is provided.
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.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 839ba04034
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| _strix_override_pkgs: "tuple[str, str, str] | None" = None | ||
| # An explicit ROCm pin is authoritative: never auto-reroute it. | ||
| if ver < (7, 2) and _explicit_rocm_torch_index_url() is None: | ||
| if _strix_needs_amd_arch_index(ver) and _explicit_rocm_torch_index_url() is None: |
There was a problem hiding this comment.
Skip Strix override when already on the gfx wheel
On ROCm 7.2+ Strix hosts after this repair has already succeeded, _installed_torch_ver will be a per-arch build such as 2.11.0+rocm7.13.0, but this broadened condition ignores the installed tag and always enters the force-reinstall branch. Since _ensure_rocm_torch() is called in both the check and final phases, every unsloth studio update redownloads/reinstalls the large torch trio and can now fail on a transient repo.amd.com issue instead of no-oping once the AMD gfx wheel is present.
Useful? React with 👍 / 👎.
install.sh and test_previous_torch_pin.sh Strix changes already landed via unslothai#7293/unslothai#7264, so drop them (main is a superset). The remaining fix is studio/install_python_stack.py: replace the ver < (7, 2) gate with _strix_needs_amd_arch_index, which reroutes gfx1150/gfx1151 off any generic pytorch.org rocm index below the 7.13 AMD arch floor. This fixes ROCm 7.14 (unslothai#7280) and stays correct if pytorch.org later adds rocm7.3+. Keep the two Python-side tests; main's install.sh-scoped tests replace the old text-match one.
|
Rebased on main and trimmed to the part that is still needed. The install.sh reroute, What remains is the Studio updater: Kept both Python-side tests; the old install.sh text-match test is superseded by main's |
|
Thanks a lot for cleaning this up and rebasing — really appreciate you taking the time. Glad the studio update path was still useful after the install.sh bits landed elsewhere. Happy for you to merge whenever. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Fixes #7280
Problem
On gfx1150/gfx1151 (Strix Point/Halo) with ROCm 7.14,
unsloth studio updatestill used the oldver < (7, 2)gate instudio/install_python_stack.py. That only rerouted Strix on ROCm 7.1, so ROCm 7.14 hosts stayed on the genericdownload.pytorch.org/whl/rocm7.2index instead of AMD's arch-specific wheels (repo.amd.com/rocm/whl/gfx1150/, torch2.11.0+rocm7.13.0) that carry the real gfx fixes.The matching
install.shreroute already landed onmainvia #7293 / #7264.Fix
studio/install_python_stack.py: Replace thever < (7, 2)gate with_strix_needs_amd_arch_index()/_generic_pytorch_rocm_tag(), which reroute gfx1150/gfx1151 off any generic pytorch.org rocm index below the 7.13 AMD arch floor (mirrors install.sh_rocm_leaf_below). Fixes ROCm 7.14 and stays correct if pytorch.org later ships a generic rocm7.3+ index.tests/studio/install/test_rocm_support.py: Keep the Python-side coverage (test_rocm_714_strix_routes_to_amd_arch_index, helper floor checks).Verification
Compatibility
rocm7.2are unchanged (inner gfx detection still gates the reroute).UNSLOTH_TORCH_INDEX_URLpins remain authoritative and skip auto-reroute.install.shpath is unchanged in this PR (already onmain).