[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
6f792137bb
commit
b9c6882df4
1 changed files with 11 additions and 3 deletions
|
|
@ -1178,10 +1178,18 @@ def install_python_stack() -> int:
|
|||
# Only warn if torch doesn't already have ROCm (HIP) support
|
||||
try:
|
||||
_hip_ver = subprocess.run(
|
||||
[sys.executable, "-c", "import torch; print(getattr(torch.version,'hip','') or '')"],
|
||||
stdout = subprocess.PIPE, stderr = subprocess.DEVNULL, timeout = 20,
|
||||
[
|
||||
sys.executable,
|
||||
"-c",
|
||||
"import torch; print(getattr(torch.version,'hip','') or '')",
|
||||
],
|
||||
stdout = subprocess.PIPE,
|
||||
stderr = subprocess.DEVNULL,
|
||||
timeout = 20,
|
||||
)
|
||||
_has_rocm_torch = (
|
||||
_hip_ver.returncode == 0 and _hip_ver.stdout.decode().strip() != ""
|
||||
)
|
||||
_has_rocm_torch = _hip_ver.returncode == 0 and _hip_ver.stdout.decode().strip() != ""
|
||||
except Exception:
|
||||
_has_rocm_torch = False
|
||||
if not _has_rocm_torch:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue