blob: 89cf27ac679e5028d3891e2c93d2e432b0a80683 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Use standard library search path to find librocm_smi64.
--- a/python_smi_tools/rsmiBindingsInit.py.in
+++ b/python_smi_tools/rsmiBindingsInit.py.in
@@ -26,17 +26,7 @@ def initRsmiBindings(silent=False):
if (rocm_smi_lib_path != None):
path_librocm = rocm_smi_lib_path
else:
- path_librocm = os.path.dirname(os.path.realpath(__file__)) + '/../../@CMAKE_INSTALL_LIBDIR@/librocm_smi64.so.@VERSION_MAJOR@'
-
- if not os.path.isfile(path_librocm):
- print_silent('Unable to find %s . Trying /opt/rocm*' % path_librocm)
- for root, dirs, files in os.walk('/opt', followlinks=True):
- if 'librocm_smi64.so.@VERSION_MAJOR@' in files:
- path_librocm = os.path.join(os.path.realpath(root), 'librocm_smi64.so.@VERSION_MAJOR@')
- if os.path.isfile(path_librocm):
- print_silent('Using lib from %s' % path_librocm)
- else:
- print('Unable to find librocm_smi64.so.@VERSION_MAJOR@')
+ path_librocm = 'librocm_smi64.so.@VERSION_MAJOR@'
# ----------> TODO: Support static libs as well as SO
try:
|