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.

test: isolate the no-version gfx-override test from a real /opt/rocm (#7397)

Daniel Han2d231f8845f0
diff --git a/tests/studio/install/test_rocm_support.py b/tests/studio/install/test_rocm_support.py
index 3bddd4188cb..9c23af01d56 100644
--- a/tests/studio/install/test_rocm_support.py
+++ b/tests/studio/install/test_rocm_support.py
@@ -2473,6 +2473,11 @@ class TestInstallShStructure:
family_fn = _extract_sh_function_body(source, "_amd_arch_index_family_for_gfx")
assert fn and probe_fn and family_fn
with tempfile.TemporaryDirectory() as d:
+ # Neutralise the host's real ROCm: the version chain reads
+ # /opt/rocm/.info/version directly (no tool to shim), which resolves
+ # a tag on a real ROCm box and skips the no-version endpoint under
+ # test. Same path-substitution technique as the KFD topology tests.
+ fn = fn.replace("/opt/rocm/.info/version", Path(d, "no-rocm-version").as_posix())
with open(os.path.join(d, "uname"), "w", encoding = "utf-8", newline = "\n") as f:
f.write('#!/bin/sh\ncase "${1:-}" in -m) echo x86_64 ;; *) echo Linux ;; esac\n')
# Silence every ROCm version source, not just amd-smi: a dev box with