Repository navigation
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.
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". |
Reconcile PR #7256 (Windows torch 2.11 + release preservation, installer comment reduction, torch 2.11 default line) with 77 commits of main install rewrites. Base is main's newer install semantics; this branch's still-novel contributions are layered on top. Key decisions: - install.ps1: kept main's rollback lifecycle (try/finally Restore-StudioVenvRollback, #7342) and the installed-version report (#7265); layered this branch's torch-2.11 allowance (torch<2.12.0 on the Windows CUDA fresh-install, CPU fallback and flavor repairs), the release-preservation port (Get-InstalledTorchVersionRaw / kept-release installs / UNSLOTH_KEPT_TORCH handoff / torch-overrides freeze) and the Exit-InstallFailure UNSLOTH_KEPT_TORCH clear. - install.sh: took main's newer AMD/Strix routing (per-arch index reroute #7264/#7300, runtime-less gfx inference #7305, KFD detection fix #7314, Radeon 8065S regex #7290, signal-restore trap #7342) and the #7365 unsloth pin bump; kept this branch's _TORCH_CEILING/_TORCHVISION_CEILING/_TORCHAUDIO_CEILING refactor widening the default ceiling to torch<2.12.0. - studio/install_python_stack.py: deferred all five code conflicts to main's Strix inference logic (result is AST-identical to main; only comment reductions remain). - studio/setup.ps1: took main's comment covering the whisper.cpp dictation markers (#7095); the UNSLOTH_KEPT_TORCH consumption handoff auto-merged intact. Dropped as superseded by main: this branch's stale unsloth>=2026.7.4 pins (main #7365), the older rocm7.1->rocm7.2 Strix reroute (main #7264/#7300), the narrow Radeon 80[0-9]0S regex (main #7290), and the pre-inference has_hip_torch gate (main's rocm_torch_ready gate, Codex P1 #7305). The two review-item fixes (grep -E in test_torch_constraint.sh, UNSLOTH_KEPT_TORCH clear in Exit-InstallFailure) survive.
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).