Add better error detection when local ROCM installation is incomplete.

Closes #56.

Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>


[ROCm/rocprofiler-compute commit: 7a6331bfd6]
Этот коммит содержится в:
Karl W. Schulz
2022-12-16 17:51:03 -05:00
коммит произвёл Karl W. Schulz
родитель bdd347997c
Коммит 3dac017a6c
+15
Просмотреть файл
@@ -24,6 +24,7 @@
import os
import re
import sys
import socket
import subprocess
@@ -174,12 +175,26 @@ def get_machine_specs(devicenum):
"version-libs",
"version-utils",
]
rocmFound = False
for itr in version_loc:
_path = os.path.join(os.getenv("ROCM_PATH", "/opt/rocm"), ".info", itr)
if os.path.exists(_path):
print(_path)
rocm_ver = path(_path).read_text()
rocmFound = True
break
if not rocmFound:
_rocm_path = os.getenv("ROCM_PATH", "/opt/rocm")
print("Error: Unable to detect a complete local ROCm installation.")
print(
"\nThe expected %s/.info/ versioning directory is missing. Please"
% _rocm_path
)
print("ensure you have valid ROCm installation.")
sys.exit(1)
(
gpu_id,
L1,