From 56098e5d02471f7e803f5647b9ef72107607daff Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 31 Mar 2026 09:09:02 +0000 Subject: [PATCH] Clean up rocm_paths list construction in detect_host() Filter None from the ROCM_PATH env var lookup at list construction time instead of relying on the inline `if p` guard in the any() call. --- studio/install_llama_prebuilt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index 4fbd87850d..43f3362b81 100755 --- a/studio/install_llama_prebuilt.py +++ b/studio/install_llama_prebuilt.py @@ -1439,8 +1439,8 @@ def detect_host() -> HostInfo: shutil.which("amd-smi"), shutil.which("rocm-smi"), ] - rocm_paths = ["/opt/rocm", os.environ.get("ROCM_PATH", "")] - if any(rocm_hints) or any(os.path.isdir(p) for p in rocm_paths if p): + rocm_paths = [p for p in ("/opt/rocm", os.environ.get("ROCM_PATH")) if p] + if any(rocm_hints) or any(os.path.isdir(p) for p in rocm_paths): has_rocm = True return HostInfo(