SWDEV-429037 - Automatically install amdsmi python lib with package
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I9c8c1335982ebd61a29da6f66c635f0a97d95f6e
[ROCm/amdsmi commit: c2e12feb6a]
This commit is contained in:
@@ -46,7 +46,7 @@ if(NOT GOOD_CLANG_FOUND)
|
||||
COMMAND mkdir -p ${PY_PACKAGE_DIR}
|
||||
COMMAND ln -Pf ${CMAKE_CURRENT_BINARY_DIR}/amdsmi_wrapper.py ${PY_PACKAGE_DIR}/)
|
||||
else()
|
||||
find_package(Python3 3.7 COMPONENTS Interpreter Development REQUIRED)
|
||||
find_package(Python3 3.6 COMPONENTS Interpreter Development REQUIRED)
|
||||
# --break-system-packages is needed for python 3.11
|
||||
# see: https://peps.python.org/pep-0668/
|
||||
if (NOT Python3_VERSION VERSION_LESS "3.11")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Requirements
|
||||
|
||||
* python 3.7+ 64-bit
|
||||
* python 3.6+ 64-bit
|
||||
* driver must be loaded for amdsmi_init() to pass
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -168,6 +168,7 @@ def char_pointer_cast(string, encoding='utf-8'):
|
||||
|
||||
_libraries = {}
|
||||
from pathlib import Path
|
||||
### TODO: Add lib build folder cmake variable or dynamic
|
||||
libamd_smi_cpack = Path("@CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/libamd_smi.so")
|
||||
libamd_smi_optrocm = Path("/opt/rocm/lib/libamd_smi.so")
|
||||
libamd_smi_parent_dir = Path(__file__).resolve().parent / "libamd_smi.so"
|
||||
|
||||
Reference in New Issue
Block a user