From 5a6a88adfed2d2f99898e50fb57cb30b57069b7a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 23 Jul 2026 23:48:15 -0700 Subject: [PATCH 1/2] test: isolate the no-version gfx-override test from a real /opt/rocm --- tests/studio/install/test_rocm_support.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/studio/install/test_rocm_support.py b/tests/studio/install/test_rocm_support.py index b919206120..c0a3dc2ce8 100644 --- a/tests/studio/install/test_rocm_support.py +++ b/tests/studio/install/test_rocm_support.py @@ -1914,6 +1914,13 @@ 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 From 3efe9415538e6f2d0a32f603c2c482995c2156e7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 06:48:54 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/studio/install/test_rocm_support.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/studio/install/test_rocm_support.py b/tests/studio/install/test_rocm_support.py index c0a3dc2ce8..860f340b00 100644 --- a/tests/studio/install/test_rocm_support.py +++ b/tests/studio/install/test_rocm_support.py @@ -1918,9 +1918,7 @@ class TestInstallShStructure: # /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() - ) + 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