From ebe0cecd9e610c3910779431e65853d8a318731d Mon Sep 17 00:00:00 2001 From: "Sirb, Corina" Date: Tue, 18 Jul 2023 14:57:00 -0400 Subject: [PATCH 1/2] Update Copyright Date Signed-off-by: Sirb, Corina Change-Id: I4b5dc49a5d756012e533ba7196b246836cf980f6 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f15962120..1c1b6db18c 100755 --- a/README.md +++ b/README.md @@ -214,4 +214,4 @@ Note: python_wrapper is NOT automatically re-generated. You must run `cmake` wit The information contained herein is for informational purposes only, and is subject to change without notice. In addition, any stated support is planned and is also subject to change. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. -© 2022 Advanced Micro Devices, Inc. All Rights Reserved. +© 2023 Advanced Micro Devices, Inc. All Rights Reserved. From 8f7e795b026e7ce1eb4d461c545446916e7bd06d Mon Sep 17 00:00:00 2001 From: Marko Oblak Date: Tue, 18 Jul 2023 16:49:18 +0200 Subject: [PATCH 2/2] [AMDSMI] [Linux] [BM] [Guest] Improve Python readme Signed-off-by: Marko Oblak Change-Id: Ic8c1ea2789407621d2155763a33cc7059cfe6729 --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9f15962120..62fbc78bd7 100755 --- a/README.md +++ b/README.md @@ -33,7 +33,11 @@ In order to build the latest documentation, the following are required: The source code for AMD SMI is available on Github. -After the AMD SMI library git repository has been cloned to a local Linux machine, the Default location for the library and headers is /opt/rocm. Building the library is achieved by following the typical CMake build sequence, specifically: +After the AMD SMI library git repository has been cloned to a local Linux machine, the Default location for the library and headers is /opt/rocm. Before installation, the old rocm directories should be deleted: +/opt/rocm +/opt/rocm-{number} + +Building the library is achieved by following the typical CMake build sequence (run as root user or use 'sudo' before 'make install' command), specifically: ```bash mkdir -p build @@ -58,13 +62,14 @@ In order to verify the build and capability of AMD SMI on your system and to see ```bash mkdir -p build cd build -cmake -DBUILD_TESTS=ON +cmake -DBUILD_TESTS=ON .. make -j $(nproc) ``` ### Run the Tests To run the test, execute the program `amdsmitst` that is built from the steps above. +Path to the program `amdsmitst`: build/tests/amd_smi_test/ ## Usage Basics @@ -93,7 +98,10 @@ int main() { amdsmi_status_t ret; // Init amdsmi for sockets and devices. Here we are only interested in AMD_GPUS. - ret = amdsmi_init(AMD_SMI_INIT_AMD_GPUS); + ret = amdsmi_init(AMDSMI_INIT_AMD_GPUS); + + // Get all sockets + uint32_t socket_count = 0; // Get the socket count available in the system. ret = amdsmi_get_socket_handles(&socket_count, nullptr); @@ -184,6 +192,12 @@ For additional details, see the [ROCm Contributing Guide](https://rocm.docs.amd. ### Installation +Before instalation, check if the old python amdsmi package is accidentally installed using pip: +```bash +sudo pip3 list +sudo pip3 uninstall amdsmi +``` + * Install amdgpu driver * Install amd-smi-lib package through package manager * cd /opt/rocm/share/amd_smi