Repository navigation
Installers: do not install generic aarch64 CUDA torch on Jetson before CUDA 13 - #14363
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex security review |
[skip ci]
|
Codex Review: Didn't find any major issues. Breezy! 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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
[skip ci]
…fit the venv; a Jetson's cpu record is not offered a GPU repair
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d54f3a4e74
ℹ️ 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".
| # repair would land on cpu again. | ||
| from utils.tegra import is_tegra | ||
|
|
||
| return is_tegra() |
There was a problem hiding this comment.
Gate automatic CPU suppression on the CUDA version
On a Tegra host this returns True without checking whether the driver supports CUDA 13, so it also covers Jetson Thor, which the installers intentionally route to cu130. If a Thor installation recorded an unpinned CPU flavor while its GPU was temporarily undetected, classify_torch_build() now exits before recognizing the stale CPU build, and Studio will not offer the GPU repair after the device becomes available. Only treat the automatic CPU record as deliberate when the Tegra host is actually on the pre-CUDA-13 route.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3033c1d: the automatic cpu record now counts as chosen only on a pre-CUDA-13 Jetson, read from the L4T release (JetPack 7 is R38, below that is JetPack 5/6) with the device tree as a fallback (Thor is tegra264). A Thor that recorded cpu while its GPU was undetected still gets the GPU repair. Tests: test_tegra_before_cuda13_reads_the_l4t_release and test_an_automatic_cpu_record_counts_as_chosen_only_on_a_jetson.
|
@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". |
…PU record, JetPack 7 off the CPU note (unslothai#14494) ## Summary Follow-up to unslothai#14363 and unslothai#14374 from a post-merge regression review. ## What changes - **An explicit GPU index beats the Jetson CPU record.** On a Jetson before CUDA 13 with an automatic `cpu` record, an explicit `UNSLOTH_TORCH_INDEX_FAMILY=cu126` (or a cu126 index URL) was overridden and Studio hid the CPU-only PyTorch report. The stated index is now checked before the Jetson exception. - **Thor without a GPU attached** got the generic-wheels note instead of "No GPU detected". With no driver CUDA version, `install.sh` now decides JetPack 7 the way `utils/tegra.py` does (L4T R38+, or `tegra264` with no release file). - Host-dependent tests now force "not a Jetson" / "not Rosetta", so they pass on a real Jetson or Apple Silicon Mac. ## Tests - Changed tests: 342 passed; 5 fail against main's source (the new ones). Installer shell checks 109/109 on both. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Summary
On Jetson (Tegra) with JetPack 5 or 6, the aarch64 CUDA wheels on download.pytorch.org and PyPI are SBSA server builds that do not see the GPU, so installs ended with
torch.cuda.is_available() == False(#4856). The installers now detect Tegra and, below CUDA 13, take the same CPU index a GPU-less host gets, with a warning that explains the CPU-only limit and NVIDIA's JetPack PyTorch route.What changes
install.shget_torch_index_url: Tegra is detected via/etc/nv_tegra_releaseornvidia,tegrain/proc/device-tree/compatible(the convention instudio/backend/utils/tegra.py). On Tegra with CUDA below 13, or an unreadable version, the CPU index is selected and NVIDIA's Jetson PyTorch route is printed (https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/). The cu126 default for an unreadable version is unchanged everywhere else.studio/install_python_stack.py_detect_cuda_torch_index_family: the same gate, sostudio updateno longer replaces a Jetson's torch with the SBSA cu126 wheel. A JetPack torch already in the venv is kept.install.shkeeps the Jetson diagnosis (not "No GPU detected" plus AMD guidance) on the same CUDA-below-13 rule, so a Thor on CUDA 13 is not told it is a Jetson CPU case._expected_cpu_flavor_was_chosen()treats an automatic cpu record on a Jetson as chosen, so the UI does not offer a GPU repair that would only reinstall cpu.UNSLOTH_TORCH_INDEX_URL/UNSLOTH_TORCH_INDEX_FAMILYstill win over everything.Hosts affected
Tests
tests/studio/install/test_jetson_tegra_torch_route_4856.py: extractedinstall.shfunctions against a fake host root (release file, device tree, fake nvidia-smi), plus mockedinstall_python_stackfamily and repair cells. Covers JetPack 5/6, Thor, pins, no GPU, GH200, SBSA aarch64 and x86. 15 cells fail on main, all 43 pass here.install.shindex 15 (10 identical, 5 Tegra below CUDA 13 changed to cpu); Python family 12 (8 identical, 4 changed); repair 4 (3 identical, 1 changed: no SBSA repair on a Jetson).tests/sh/test_get_torch_index_url.sh(109 checks): identical results before and after.