Repository navigation
Unsloth Studio installer (AMD/Linux): explain why a newer ROCm gets ROCm 7.2 PyTorch - #11651
Conversation
A host on ROCm 7.3 or newer is capped to the newest wheel index we have validated, and said nothing about it. The installer printed the host's real version a few lines earlier, so the next line reads as a failed detection: unslothai#7264, unslothai#9932 and unslothai#10657 all open by quoting it back at us. Two messages, no behaviour change: - get_torch_index_url names the cap when the table moves the host off its own version, and says the wheels carry their own ROCm runtime. Phrased on what is validated, not on what is newer, because the 6.x arm clips rocm6.5 to rocm6.4 and rocm6.5 is not newer than rocm7.2. Silent when the host already matches a published leaf. - The Radeon repo fallback separates "AMD never published this release" from "the repo is down". _radeon_fetch_listing keeps curl's exit code (22, or wget's 8) so a host that answered is not reported as unavailable; AMD publishes nothing past rocm-rel-7.2.4 today, so on a newer host the miss is the normal case. The index table's arms are untouched on purpose: test_rocm_bad_arch_gate.sh and test_rocm_support.py both pin those lines verbatim.
curl is probed first, so the wget arm is only reachable on a host without curl: PATH holds the stub and bash is called by absolute path.
LeoBorcherding
left a comment
There was a problem hiding this comment.
Codex findings, via a mirror
Codex does not answer on this repository, so it ran against a copy of this pull request's commits at LeoBorcherding/unsloth-staging-review#21. It looked at 4f83dc9c6f there, which is this PR's c483d2de3 replayed onto main 1ecc01a30. Nothing was reviewed or resolved on the copy: the findings are here, in Codex's words, to be worked through on this pull request.
1 finding, inline below where the line is on this diff.
| # curl 22 (-f, HTTP >= 400) and wget 8 (server error response) both mean the host answered | ||
| # and refused. Nothing else does: a DNS, TLS or timeout failure exits elsewhere. | ||
| case "$_radeon_fetch_rc" in | ||
| 22|8) _RADEON_HOST_ANSWERED=true ;; |
There was a problem hiding this comment.
P2 Separate downloader failures before declaring wheels absent
On a curl-equipped host, this treats failures unrelated to a missing release as proof that AMD never published it: curl --manual defines exit 8 as “Weird server reply” and exit 22 as any HTTP error code 400 or above, so responses such as 403, 429, or 503 also set _RADEON_HOST_ANSWERED=true. The later branch then reports repo.radeon.com publishes no ... wheels instead of warning about a malformed response, access failure, rate limit, or outage. Track which downloader ran and inspect the actual HTTP status (in particular, distinguish 404 from other errors) before selecting the not-published message.
Codex's original comment: https://github.com/LeoBorcherding/unsloth-staging-review/pull/21#discussion_r4100017861
…$(...) macOS /bin/sh is bash 3.2, which ends a command substitution at the first bare pattern) and aborts the script with a syntax error near ';;'. The leading ( is POSIX and balances the parens.
curl -f exits 22 and wget 8 for any HTTP error, so a 429/5xx outage was
reported as a missing release. Read curl's %{http_code} instead; wget keeps
the unreachable warning.
A 404 on the X.Y.Z path followed by a 503 or transport failure on X.Y left X.Y unchecked but still reported the release as unpublished. Any inconclusive attempt now pins the state, so the unreachable warning is kept.
Strix and gfx906 hosts are rerouted after the cap, so 'using rocm7.2 wheels' was not always true.
|
Review record for #11651, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#163. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
…de suffix
Appending \n%{http_code} stopped command substitution from trimming the
body's trailing newlines, so a newline-only 200 counted as a listing and
skipped the X.Y retry. Restore the base trimming and pin it in a test.
-w still prints the HTTP code after a timeout or reset, so the nonempty check accepted a truncated listing and could pick an older wheel set. Keep the transfer exit code and drop the listing when it is nonzero.
…OCm 7.2 PyTorch (unslothai#11651) * Say why a newer ROCm host gets rocm7.2 wheels A host on ROCm 7.3 or newer is capped to the newest wheel index we have validated, and said nothing about it. The installer printed the host's real version a few lines earlier, so the next line reads as a failed detection: unslothai#7264, unslothai#9932 and unslothai#10657 all open by quoting it back at us. Two messages, no behaviour change: - get_torch_index_url names the cap when the table moves the host off its own version, and says the wheels carry their own ROCm runtime. Phrased on what is validated, not on what is newer, because the 6.x arm clips rocm6.5 to rocm6.4 and rocm6.5 is not newer than rocm7.2. Silent when the host already matches a published leaf. - The Radeon repo fallback separates "AMD never published this release" from "the repo is down". _radeon_fetch_listing keeps curl's exit code (22, or wget's 8) so a host that answered is not reported as unavailable; AMD publishes nothing past rocm-rel-7.2.4 today, so on a newer host the miss is the normal case. The index table's arms are untouched on purpose: test_rocm_bad_arch_gate.sh and test_rocm_support.py both pin those lines verbatim. * Cover the wget half of the Radeon listing fetch curl is probed first, so the wget arm is only reachable on a host without curl: PATH holds the stub and bash is called by absolute path. * Trim comments on the ROCm cap note and Radeon fallback * Keep install.sh parseable by bash 3.2: parenthesise case arms inside $(...) macOS /bin/sh is bash 3.2, which ends a command substitution at the first bare pattern) and aborts the script with a syntax error near ';;'. The leading ( is POSIX and balances the parens. * Shorten the ROCm cap note to one line and the Radeon fallback message * Radeon fallback: only HTTP 404/410 mean the release is unpublished curl -f exits 22 and wget 8 for any HTTP error, so a 429/5xx outage was reported as a missing release. Read curl's %{http_code} instead; wget keeps the unreachable warning. * Radeon fallback: unpublished only when every attempt returned 404/410 A 404 on the X.Y.Z path followed by a 503 or transport failure on X.Y left X.Y unchecked but still reported the release as unpublished. Any inconclusive attempt now pins the state, so the unreachable warning is kept. * Cap note: name the capped index, not the wheels finally installed Strix and gfx906 hosts are rerouted after the cap, so 'using rocm7.2 wheels' was not always true. * Trim comments after review * Drop two comments that restate the code * Radeon listing: re-strip trailing newlines after removing the http_code suffix Appending \n%{http_code} stopped command substitution from trimming the body's trailing newlines, so a newline-only 200 counted as a listing and skipped the X.Y retry. Restore the base trimming and pin it in a test. * Radeon listing: reject a body cut off by a curl or wget failure -w still prints the HTTP code after a timeout or reset, so the nonempty check accepted a truncated listing and could pick an older wheel set. Keep the transfer exit code and drop the listing when it is nonzero. * Drop two test comments that repeat their assertion labels --------- Co-authored-by: Daniel Han <[email protected]>
a host on ROCm 7.3 or newer gets the newest wheel index we have validated, rocm7.2, and the
installer never said so. it prints the host's real ROCm version a few lines earlier, so the
next line reads as a failed detection: #7264, #10657 and cminnoy's comment on #9932 all open
by quoting that number back at us.
messaging only. no version, ceiling, index or install behaviour change.
get_torch_index_urlnames the cap when the table moves a host off its own version.phrased on what is validated rather than what is newer, because the 6.x arm clips
rocm6.5 to rocm6.4 and rocm6.5 is not newer than rocm7.2. silent when the host already
matches a published leaf. it deliberately does not offer
UNSLOTH_TORCH_INDEX_FAMILYasa way out: a newer leaf holds nothing inside
_TORCH_CEILING, so pinning one fails toresolve rather than upgrading.
_radeon_fetch_listingkeeps curl's exit code (22, or wget's 8), so "AMD never publishedthis release" stops printing as "Radeon repo unavailable", and the message names the
release that is missing. AMD has nothing past
rocm-rel-7.2.4, so on a newer host thatmiss is the normal case, not an outage.
table arms untouched on purpose:
test_rocm_bad_arch_gate.sh:480andtest_rocm_support.py:3087pin them verbatim, so thecaseis wrapped rather than rewritten.not a fix for #10657. that report is half wheel selection (working as designed, now
explained) and half "fine tuning always fails" on 2x R9700, which has no log yet. moving off
torch 2.11 is #9932's scope.
tests
at
354a86a, basef394701, one Windows box through WSL2 Debian.tests/sh/test_get_torch_index_url.shtests/sh/test_radeon_repo_fallback.shtests/studio/install/test_rocm_support.pytests/sh(50 suites)mutation-checked, so the new tests bite: dropping the INFO lines fails 5 of the new
assertions, and clearing
_RADEON_HOST_ANSWEREDon every call fails the stickiness one.pre-existing on main here and unchanged by this PR:
test_rocm_support.py's 17 failures,test_install_rollback_lifecycle.sh's 6, andtest_linux_deps_gate.shhanging (it wantsapt), which was skipped rather than run.
not run: no AMD Linux host, so the installer never ran end to end and neither message has
been seen in a real install log. the fetch helper was exercised at function level with stubs
only: curl returning 22, 7 and 28, and wget 8 and 4 on a PATH with no curl. index contents
checked live 2026-09-22: repo.radeon.com tops out at
rocm-rel-7.2.4(both 7.14 paths 404),pytorch.org
rocm7.2serves 2.12.1 / 2.13.0 / 2.14.0,rocm7.14serves 2.14.0 only. nohardware matrix: this is version-string and HTTP-status logic with no device dependency.