unsloth/tests/studio/install
LeoBorcherding 0539621fa1 fix(studio): set HIP_VISIBLE_DEVICES in apply_gpu_ids for ROCm training workers
Training workers are spawned via multiprocessing spawn before detect_hardware()
runs, so IS_ROCM is still False. If the user never set HIP_VISIBLE_DEVICES in
their shell, _inherits_rocm_visibility is also False, leaving the worker with
only CUDA_VISIBLE_DEVICES set. On ROCm hosts the HIP runtime honors
HIP_VISIBLE_DEVICES over CUDA_VISIBLE_DEVICES, so the worker saw the full
device list and torch raised "no usable HIP accelerator" on some setups.

Fall back to probing torch.version.hip (a build-time attribute, safe to read
before GPU init) to detect ROCm when neither IS_ROCM nor inherited env vars
are available. Mirrors the existing fix in llama_cpp.py for llama-server
subprocess GPU pinning.

Fixes https://github.com/unslothai/unsloth/issues/5180
2026-05-05 21:33:45 -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
test_install_llama_prebuilt_logic.py Add regression tests for custom llama prebuilt installer (#4772) 2026-04-02 04:45:09 -07:00
test_llama_pr_force_and_source.py fix windows llama.cpp compile from source issue (#4793) 2026-04-02 11:43:46 -07:00
test_pr4562_bugfixes.py Update test_pr4562_bugfixes.py for simplified install policy (#4817) 2026-04-03 04:06:14 -07:00
test_rocm_support.py fix(studio): set HIP_VISIBLE_DEVICES in apply_gpu_ids for ROCm training workers 2026-05-05 21:33:45 -07:00
test_selection_logic.py Fix/windowsprebuilt (#5241) 2026-05-02 09:42:19 +04:00