Skip to content

Studio installer (AMD, Linux): CPU torch for a lone gfx90c instead of kernel-less ROCm wheels - #15002

Merged
danielhanchen merged 9 commits into
unslothai:mainfrom
LeoBorcherding:fix/gfx90c-cpu-torch
Oct 25, 2026
Merged

danielhanchen merged 9 commits into
unslothai:mainfrom
LeoBorcherding:fix/gfx90c-cpu-torch

Conversation

@LeoBorcherding

@LeoBorcherding LeoBorcherding commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

On Linux, a host whose only AMD GPU is gfx90c (the integrated Vega in Ryzen 4000/5000 APUs: Renoir, Cezanne, Lucienne, Barcelo, e.g. the 5700G) got the generic ROCm PyTorch wheel. With ROCm 7.2 installed, rocminfo reads gfx90c, and get_torch_index_url picked https://download.pytorch.org/whl/rocm7.2. Those wheels carry no gfx90c kernels and ROCm does not support the arch, so the user gets a multi-GB torch that cannot use the GPU.

gfx90c was only in the mixed-host iGPU table (#7776). The readable-arch "no ROCm PyTorch wheels" filter added for RDNA 1 and Polaris (#8529, #13419) did not list it, so a lone gfx90c fell through to the generic tag.

Fix

  • gfx90c joins the Linux uncovered set everywhere it is mirrored: install.sh (index pick and install summary), studio/setup.sh, install_python_stack._LINUX_UNCOVERED_AMD_GFX, and the backend's copy in hardware.py. A lone gfx90c now gets CPU torch and the existing hint to re-run with UNSLOTH_LLAMA_CPP_BACKEND=vulkan.
  • llama.cpp: no linux-rocm bundle covers gfx90c either, so LINUX_NO_ROCM_GFX_TARGETS gains it. A lone gfx90c with an AMD Vulkan driver now gets the Vulkan prebuilt instead of a HIP source build (Studio installer (AMD, Linux): Vulkan llama.cpp for RDNA 1 and Polaris when ROCm is installed #13694).
  • Unchanged: gfx90c beside a supported discrete card ([Bug] AMD GPU not loading into VRAM or detected #7776) still installs ROCm torch for the discrete card. HSA_OVERRIDE_GFX_VERSION=9.0.0 is judged as gfx900 and keeps ROCm. Windows already sends gfx90c to CPU, because its routing is an allowlist.
  • No TheRock opt-in line for gfx90c: TheRock rates it build-passing only, and current torch on its multi-arch index declares no device-gfx90c extra.

Testing

MacBook Pro M5 (macOS), with stubbed probes and no AMD hardware.

  • New tests/studio/install/test_linux_gfx90c_cpu_torch.py runs the real _probe_amd_gfx_arch against a fake rocminfo on PATH. On base it returns rocm7.2 for a lone gfx90c; with the fix it returns /cpu with the Vulkan hint. The mixed gfx90c + gfx1100 host and the gfx900 spoof keep rocm7.2 on both.
  • New and updated install tests: 9 fail on base, all pass with the fix. At 092e6df (main merged): 503 passed, 1 skipped across the new tests, the [Bug] RX 5700XT doesn't recognize in Unsloth Desktop #8529 suite and studio/backend/tests/test_install_resolve_prebuilt.py.

Not tested

A real gfx90c Linux box: real rocminfo output on ROCm 7.2, the CPU-torch install end to end, llama.cpp picking the Vulkan prebuilt with RADV, and a real gfx90c + discrete host.

Reported in a Discord help thread.

Follow-up commits

  • The torch 2.11 ROCm wheels this installer picks ship gfx900 kernels (pytorch release/2.11 .ci/docker/manywheel/build.sh), which a gfx90c runs under HSA_OVERRIDE_GFX_VERSION=9.0.0. The CPU warnings in install.sh (index pick and summary), studio/setup.sh and install_python_stack.py now say so for a lone gfx90c, so that route stays discoverable.
  • Re-running install.sh recreates the venv and carries only the torch release across (torch==2.11.0, not +rocm7.2), so a gfx90c user who already ran ROCm torch with the override would have been moved to CPU torch on update. A lone gfx90c whose previous environment ran a +rocm torch now keeps ROCm, with a note to start Studio with the override. Fresh installs still get CPU torch. unsloth studio update, setup.sh and install_python_stack.py already keep an existing ROCm build.
  • Main merged in.

Tests: tests/studio/install/test_linux_gfx90c_cpu_torch.py gains the hint cases (gfx90c only, not gfx1010 / gfx803) and the rerun cases (an existing ROCm build keeps ROCm; a CPU or unknown previous torch still takes CPU; other uncovered arches are not kept). Base vs head: 16 tests fail on main and pass here, none fail here. The 21 test files touching the changed lists show the same 3 failures on main and on this branch (test_rocm_torch_explicit_request.py). Staging: ubuntu and macOS green; the Windows leg fails only in test_the_icd_search_dirs_follow_the_xdg_variables, which fails on main too and is not touched here.

Related: #9430 (gfx90c on Fedora, ROCm torch, inference worker SIGSEGV).

… kernel-less ROCm wheels

A host whose only AMD GPU is gfx90c (Renoir / Cezanne / Lucienne / Barcelo iGPU) with a
readable arch was in no uncovered list, so get_torch_index_url took the generic pytorch.org
ROCm tag: a multi-GB torch with no gfx90c kernels. Add gfx90c to the uncovered set in
install.sh (index pick and summary), studio/setup.sh, install_python_stack.py and the
backend health set, so it gets CPU torch and the Vulkan hint like RDNA 1 and Polaris.

llama.cpp: no linux-rocm bundle covers gfx90c either, so LINUX_NO_ROCM_GFX_TARGETS gains it
and a lone gfx90c with an AMD Vulkan ICD gets the Vulkan prebuilt. A discrete peer (unslothai#7776)
and an HSA_OVERRIDE_GFX_VERSION spoof keep today's ROCm route. No TheRock opt-in line: current
torch on that index declares no device-gfx90c extra.
danielhanchen added a commit that referenced this pull request Oct 23, 2026
…5013)

`connection (openclaw, stable)` in Local agent guides CI fails on every
PR that runs it (for example #15002 and #15005):

```
[install] npm install -g openclaw@latest attempt 3 failed
[install] curl|bash https://openclaw.ai/install.sh attempt 3 failed
[agent install failed] agent=openclaw: openclaw install failed (npm + curl)
```

## Cause

`[email protected]`, published 2026-10-22, raised its engines floor:
- before: `node >=24.16.0 <25 || >=26.1.0` (2026.10.5)
- now: `node >=24.22.1 <25 || >=26.12.1`

The openclaw legs run `actions/setup-node` with `node-version: '24'`,
which takes the runner's cached Node. That is `v24.21.0` on the current
ubuntu-latest image, so npm refuses the install and the curl installer
fails the same way. Node 24.22.1 was released on 2026-10-20 and is in
setup-node's manifest; the runner image has not picked it up yet.

Nothing in the repo changed. The upstream package moved, so the workflow
is what needs fixing.

## Fix

- Both setup-node steps that run openclaw now pass `check-latest: ${{
matrix.agent == 'openclaw' }}`, so `'24'` resolves to the newest 24.x
release instead of the cached one. The other agents keep the cached Node
22 as before.
- `tests/studio/test_agent_guides_openclaw_node.py` pins this for every
job whose matrix runs openclaw. Removing `check-latest` fails it.

The workflow-wide tests
(`test_studio_smokes_do_not_trigger_on_the_training_library.py` and the
other workflow-parsing suites, 426 tests) still pass. The proof of the
fix itself is this PR's own `connection (openclaw, stable)` leg.
@danielhanchen danielhanchen self-assigned this Oct 24, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@danielhanchen

Copy link
Copy Markdown
Member

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-24T13:19:24.590265Z
We couldn’t complete this review. Comment @codex review to try again.
39c935e Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

@danielhanchen
danielhanchen merged commit e3f2044 into unslothai:main Oct 25, 2026
76 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants