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]
This commit is contained in:
committed by
Karl W. Schulz
orang tua
bdd347997c
melakukan
3dac017a6c
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
@@ -174,12 +175,26 @@ def get_machine_specs(devicenum):
|
|||||||
"version-libs",
|
"version-libs",
|
||||||
"version-utils",
|
"version-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
rocmFound = False
|
||||||
for itr in version_loc:
|
for itr in version_loc:
|
||||||
_path = os.path.join(os.getenv("ROCM_PATH", "/opt/rocm"), ".info", itr)
|
_path = os.path.join(os.getenv("ROCM_PATH", "/opt/rocm"), ".info", itr)
|
||||||
if os.path.exists(_path):
|
if os.path.exists(_path):
|
||||||
|
print(_path)
|
||||||
rocm_ver = path(_path).read_text()
|
rocm_ver = path(_path).read_text()
|
||||||
|
rocmFound = True
|
||||||
break
|
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,
|
gpu_id,
|
||||||
L1,
|
L1,
|
||||||
|
|||||||
Reference in New Issue
Block a user