Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Windows hipinfo: an all-hiding ROCR mask still means no ROCm target (#14019)
Daniel Han6a33aadc3d37
diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.pyindex 399822f90ce..91b3ecda5e6 100644--- a/studio/install_llama_prebuilt.py+++ b/studio/install_llama_prebuilt.py@@ -2862,6 +2862,10 @@ def _pick_rocm_gfx_target(if hip_filtered:_hip_vis = os.environ.get("HIP_VISIBLE_DEVICES")if _hip_vis is None:+ # An all-hiding ROCR mask still means no GPU, as before survivor indexing.+ _rocr_vis = os.environ.get("ROCR_VISIBLE_DEVICES")+ if _rocr_vis is not None and _rocr_vis.strip() in ("", "-1"):+ return None_hip_vis = os.environ.get("CUDA_VISIBLE_DEVICES")if _hip_vis is not None:return None if _hip_vis.strip() in ("", "-1") else _tokens[0]diff --git a/tests/studio/install/test_windows_hipinfo_mask_survivor.py b/tests/studio/install/test_windows_hipinfo_mask_survivor.pyindex 2fc853642cb..0bcfc363c5b 100644--- a/tests/studio/install/test_windows_hipinfo_mask_survivor.py+++ b/tests/studio/install/test_windows_hipinfo_mask_survivor.py@@ -101,3 +101,25 @@ def test_hipinfo_under_cuda_and_rocr_masks_takes_the_cuda_survivor(monkeypatch):env = {"CUDA_VISIBLE_DEVICES": "2,0", "ROCR_VISIBLE_DEVICES": "1"}host = detect(monkeypatch, "hipinfo", hipinfo_listing([PHYSICAL[2], PHYSICAL[0]]), env)assert host.rocm_gfx_target == "gfx1100"+++ "env,expected",+ [+ # An all-hiding ROCR mask still means no GPU, as before survivor indexing.+ ({"CUDA_VISIBLE_DEVICES": "0", "ROCR_VISIBLE_DEVICES": "-1"}, None),+ ({"CUDA_VISIBLE_DEVICES": "0", "ROCR_VISIBLE_DEVICES": ""}, None),+ ({"ROCR_VISIBLE_DEVICES": "-1"}, None),+ # Otherwise the CUDA mask's survivor 0, as in the mixed-mask test above.+ ({"CUDA_VISIBLE_DEVICES": "0", "ROCR_VISIBLE_DEVICES": "1"}, "gfx1151"),+ # HIP_VISIBLE_DEVICES still wins over both.+ ({"HIP_VISIBLE_DEVICES": "0", "ROCR_VISIBLE_DEVICES": "-1"}, "gfx1151"),+ ],+)+def test_hipinfo_honours_an_all_hiding_rocr_mask(env, expected, monkeypatch):+ for var in ("CUDA_VISIBLE_DEVICES", "HIP_VISIBLE_DEVICES", "ROCR_VISIBLE_DEVICES"):+ monkeypatch.delenv(var, raising = False)+ for var, value in env.items():+ monkeypatch.setenv(var, value)+ out = hipinfo_listing(["gfx1151"])+ assert m._pick_rocm_gfx_target(out, hip_filtered = True) == expected