unsloth/studio/backend/utils
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
..
datasets Add Qwen3.6 support (#5257) 2026-05-02 23:30:57 +04:00
hardware fix(studio): set HIP_VISIBLE_DEVICES in apply_gpu_ids for ROCm training workers 2026-05-05 21:33:45 -07:00
inference Fix Windows local GGUF model loading crash (#4730) 2026-04-01 01:38:09 -07:00
models Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00
paths Studio: add folder browser modal for Custom Folders (#5035) 2026-04-15 08:04:33 -07:00
.gitkeep root studio folder 2026-02-02 09:13:49 +00:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
cache_cleanup.py fix(studio): prevent ModuleNotFoundError in dataset.map() on Windows (#4473) 2026-03-22 06:11:24 -07:00
downsample.py feat(studio): training history persistence and past runs viewer (#4501) 2026-03-25 00:58:55 -07:00
native_path_leases.py Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00
subprocess_compat.py Add tauri (#5144) 2026-04-23 04:50:10 -07:00
transformers_version.py Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00
utils.py Final cleanup 2026-03-12 18:28:04 +00:00
wheel_utils.py Add native GGUF intake to Studio (#5246) 2026-05-04 11:46:18 +02:00