Skip to content

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.

Studio: forward --has-rocm from setup.sh when gfx resolution fails (#5927)

Leo Borcherdingf1a0581078a0
diff --git a/studio/setup.sh b/studio/setup.sh
index b5c60030c35..9b29def8592 100755
--- a/studio/setup.sh
+++ b/studio/setup.sh
@@ -862,6 +862,10 @@ else
# name-inferred arch). Implies --has-rocm on the installer side.
if [ -n "${_setup_gfx:-}" ]; then
_PREBUILT_CMD+=(--rocm-gfx "$_setup_gfx")
+ elif [ "$_setup_amd_detected" = true ]; then
+ # AMD was detected but gfx resolution failed; tell the installer ROCm is
+ # present so it can still attempt a prebuilt. Mirrors setup.ps1 behaviour.
+ _PREBUILT_CMD+=(--has-rocm)
fi
_PREBUILT_LOG="$(mktemp)"
set +e
diff --git a/tests/studio/install/test_rocm_support.py b/tests/studio/install/test_rocm_support.py
index 5b6586f9c99..1d6e4f4c51a 100644
--- a/tests/studio/install/test_rocm_support.py
+++ b/tests/studio/install/test_rocm_support.py
@@ -2682,6 +2682,13 @@ class TestRocmGfxForwarding:
assert "--rocm-gfx" in source
assert '"$_setup_gfx"' in source
+ def test_setup_sh_forwards_has_rocm(self):
+ # When AMD is detected but gfx resolution fails, setup.sh must still
+ # forward --has-rocm so the installer knows ROCm is present.
+ source = _SETUP_SH_PATH.read_text(encoding = "utf-8")
+ assert "--has-rocm" in source
+ assert "_setup_amd_detected" in source
+
def test_setup_ps1_forwards_rocm_gfx(self):
source = _SETUP_PS1_PATH.read_text(encoding = "utf-8")
assert "--rocm-gfx" in source