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.
This commit is contained in:
parent
2cb0b52be7
commit
56098e5d02
1 changed files with 2 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue