_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.
|
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_node_prebuilt.py | ||
| install_python_stack.py | ||
| install_whisper_prebuilt.py | ||
| LICENSE.AGPL-3.0 | ||
| MCP.md | ||
| node_prebuilt_pins.json | ||
| package-lock.json | ||
| package.json | ||
| prebuilt_core.py | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||