unsloth/studio
Daniel Han 10bc8aa538 Keep probing for nvidia-smi after an unusable one on PATH
_has_usable_nvidia_gpu gated its Windows fixed-location fallback on the
PATH lookup missing, not on the GPU check failing. A stale or driverless
nvidia-smi exits non-zero listing nothing, so the search stopped there
and the function reported no NVIDIA GPU even with a working driver
binary under NVSMI or System32.

That answer routes a mixed AMD iGPU plus NVIDIA dGPU Windows host into
_ensure_rocm_torch() and replaces its CUDA stack with ROCm wheels.

install.ps1 and studio/setup.ps1 already do the right thing: both call
Test-NvidiaSmiHasGpu on the PATH result and fall through to the two fixed
paths when it fails, with the same reasoning recorded at install.ps1:1708
("a stale/driverless nvidia-smi can exit 0 while listing no GPU"). This
brings the Python helper to the same rule: collect the candidates, then
take the first that lists a GPU.

Reproduced with real stub executables through the real subprocess call,
before and after:

    PATH exe   fixed-location exe   before   after
    absent     working              True     True
    stale      working              False    True
    working    -                    True     True
    none       none                 False    False

Only the stale row changes. An AMD-only host with a leftover nvidia-smi
still gets False, so it is not denied the ROCm wheels.

tests/studio/install/test_nvidia_smi_candidate_probing.py pins all four
rows plus the CUDA_VISIBLE_DEVICES cases: 1 failed / 8 passed before,
9 passed after.
2026-07-27 23:18:39 +00:00
..
backend Studio: tighten the comments added by the OpenAI model-admission work (#7501) 2026-07-27 05:59:03 -07:00
frontend Studio: tighten the comments added by the OpenAI model-admission work (#7501) 2026-07-27 05:59:03 -07:00
src-tauri Rotate desktop updater signing key (#7500) 2026-07-27 14:34:55 +02:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
install_node_prebuilt.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
install_python_stack.py Keep probing for nvidia-smi after an unusable one on PATH 2026-07-27 23:18:39 +00:00
install_whisper_prebuilt.py Studio whisper: pair slim bundles on the ggml commit, not the full llama tag (#7381) 2026-07-23 20:18:36 -07:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
MCP.md Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
node_prebuilt_pins.json Pin isolated Node.js installer to committed sha256 digests (#6625) 2026-06-24 05:47:58 -07:00
package-lock.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
package.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
prebuilt_core.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 Studio: fail fast on out-of-disk instead of a doomed llama.cpp source build (#7420) 2026-07-26 00:11:38 -07:00
setup.sh install.sh, setup.sh: apply the no-tty consent fix to the remaining sites (#7470) 2026-07-26 05:22:28 -07:00
Unsloth_Studio_Colab.ipynb fix(studio/colab): restore blank Colab iframe embed (#7344) (#7349) 2026-07-24 02:23:24 -07:00