unsloth/tests/studio/install
Daniel Han 172d9d1c8e
Studio: source-build arm64 Linux GPU hosts, with a CPU prebuilt fallback (#5924)
* Studio: fall back to source build for arm64 Linux GPU hosts

setup.sh routes a Linux host with any GPU tool to the unslothai/llama.cpp fork,
which publishes only linux-x64 bundles. On an arm64 host with a GPU (GH200,
GB200, DGX Spark) the resolver then selected an x64 CUDA bundle, which cannot run
on aarch64. Routing those hosts to ggml-org instead would install a CPU-only
arm64 build, silently losing the GPU.

Guard resolve_simple_install_release_plans so an arm64 Linux host on the fork
raises PrebuiltFallback before any release is fetched, letting setup.sh do a
source build that actually targets the GPU. x86_64 hosts and arm64 CPU hosts
(which route to ggml-org) are unaffected.

Add tests covering the arm64 fork raise, the x86_64 pass-through, and the arm64
CPU ggml-org path.

* Studio: install ggml-org arm64 CPU prebuilt when the arm64 GPU source build fails

Per review of #5924: arm64 Linux GPU hosts have no CUDA prebuilt anywhere (the
unslothai fork is x64 only, ggml-org ships no Linux CUDA build), so they source
build for the GPU. If that build produces no binary, the host was left without
llama.cpp.

Add a --cpu-fallback flag to install_llama_prebuilt.py that drops the host GPU
attributes so the CPU prebuilt for the host arch is selected (a GPU host cannot
otherwise pick the CPU bundle). setup.sh calls it against ggml-org as a last
resort for arm64 Linux when the source build degraded, installing the
ubuntu-arm64 CPU build instead of leaving the host with no llama.cpp.

Add tests: force_cpu drops GPU attrs before planning, a CPU-forced arm64 host
selects the ggml-org ubuntu-arm64 bundle, and setup.sh wires the fallback.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-01 06:35:43 -07:00
..
conftest.py fix/strix halo and windows AMD ROCm support (#5301) 2026-05-29 22:29:56 -07:00
smoke_test_llama_prebuilt.py Add installer test coverage for prebuilt llama.cpp changes (#4756) 2026-04-01 06:06:29 -07:00
smoke_test_parallel_studio_home.py tests/studio/install: parallel UNSLOTH_STUDIO_HOME smoke test (#5306) 2026-05-07 02:26:58 -07:00
test_install_llama_prebuilt_logic.py Studio: match the Linux llama.cpp prebuilt to the runtime cudart major (#5914) 2026-06-01 02:55:57 -07:00
test_llama_pr_force_and_source.py tests: raise pwsh/bash subprocess timeout from 10s to 60s (#5463) 2026-05-15 14:18:04 -07:00
test_macos_version_compat.py Studio: pin the last pre-macOS-26 llama.cpp prebuilt instead of walking back (#5896) 2026-05-31 06:18:30 -07:00
test_pr4562_bugfixes.py studio/setup.sh: cope with fresh CUDA toolkits like 13.3 (#5826) 2026-05-29 05:09:20 -07:00
test_rocm_support.py studio: ROCm cleanups follow-up to #5301 (#5874) 2026-05-30 03:06:47 -07:00
test_selection_logic.py Studio: source-build arm64 Linux GPU hosts, with a CPU prebuilt fallback (#5924) 2026-06-01 06:35:43 -07:00