diff --git a/README.md b/README.md index 6f5a769a99..7e8f878d4d 100755 --- a/README.md +++ b/README.md @@ -11,66 +11,6 @@ AMD SMI library can run on AMD ROCm supported platforms, please refer to [List o To run the AMD SMI library, the amdgpu driver needs to be installed. Optionally, the libdrm can be installed to query firmware information and hardware IPs. -## Building AMD SMI - -### Additional Required software for building - -In order to build the AMD SMI library, the following components are required. Note that the software versions listed are what was used in development. Earlier versions are not guaranteed to work: - -* CMake (v3.11.0) - `pip3 install cmake` -* g++ (5.4.0) - -In order to build the AMD SMI python package, the following components are required: - -* clang (14.0 or above) -* python (3.6 or above) -* virtualenv - `pip3 install virtualenv` - -In order to build the latest documentation, the following are required: - -* DOxygen (1.8.11) -* latex (pdfTeX 3.14159265-2.6-1.40.16) - -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. 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 -cd build -cmake .. -make -j $(nproc) -make install -``` - -The built library will appear in the `build` folder. - -To build the rpm and deb packages follow the above steps with: - -```bash -make package -``` - -### Building the Tests - -In order to verify the build and capability of AMD SMI on your system and to see an example of how AMD SMI can be used, you may build and run the tests that are available in the repo. To build the tests, follow these steps: - -```bash -mkdir -p build -cd build -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 ### Device/Socket handles @@ -192,20 +132,26 @@ 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 -``` +Follow user permissions best practices if installing AMDSMI as any user than root. * Install amdgpu driver * Install amd-smi-lib package through package manager -* cd /opt/rocm/share/amd_smi -* python3 -m pip install --upgrade pip -* python3 -m pip install --user . -* /opt/rocm/bin/amd-smi --help -Add /opt/rocm/bin to your shell's path to access amd-smi via the cmdline +Before amd-smi install, uninstall current versions of amdsmi using pip: + +```bash +pip3 list | grep amd +pip3 uninstall amdsmi +``` + +```bash +cd /opt/rocm/share/amd_smi +python3 -m pip install --upgrade pip +python3 -m pip install --user . +/opt/rocm/bin/amd-smi --help +``` + +after installing amd-smi-lib, amd-smi is also available as a binary in /opt/rocm/bin ### Rebuilding Python wrapper @@ -224,6 +170,66 @@ Note: To be able to re-generate python wrapper you need several tools installed Note: python_wrapper is NOT automatically re-generated. You must run `cmake` with `-DBUILD_WRAPPER=on` argument. +## Building AMD SMI + +### Additional Required software for building + +In order to build the AMD SMI library, the following components are required. Note that the software versions listed are what was used in development. Earlier versions are not guaranteed to work: + +* CMake (v3.11.0) - `pip3 install cmake` +* g++ (5.4.0) + +In order to build the AMD SMI python package, the following components are required: + +* clang (14.0 or above) +* python (3.6 or above) +* virtualenv - `pip3 install virtualenv` + +In order to build the latest documentation, the following are required: + +* DOxygen (1.8.11) +* latex (pdfTeX 3.14159265-2.6-1.40.16) + +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. 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 +cd build +cmake .. +make -j $(nproc) +make install +``` + +The built library will appear in the `build` folder. + +To build the rpm and deb packages follow the above steps with: + +```bash +make package +``` + +### Building the Tests + +In order to verify the build and capability of AMD SMI on your system and to see an example of how AMD SMI can be used, you may build and run the tests that are available in the repo. To build the tests, follow these steps: + +```bash +mkdir -p build +cd build +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/ + ## DISCLAIMER 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. diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index adeb41a5b0..8e7f69c1f7 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = AMD SMI # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "23.1.1.0" +PROJECT_NUMBER = "23.2.1.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/include/amd_smi/amdsmi.h b/include/amd_smi/amdsmi.h index bbed4ab49c..8c0b633807 100644 --- a/include/amd_smi/amdsmi.h +++ b/include/amd_smi/amdsmi.h @@ -99,7 +99,7 @@ typedef enum { #define AMDSMI_LIB_VERSION_YEAR 23 //! Major version should be changed for every header change (adding/deleting APIs, changing names, fields of structures, etc.) -#define AMDSMI_LIB_VERSION_MAJOR 1 +#define AMDSMI_LIB_VERSION_MAJOR 2 //! Minor version should be updated for each API change, but without changing headers #define AMDSMI_LIB_VERSION_MINOR 1 diff --git a/rocm_smi/python_smi_tools/README.md b/rocm_smi/python_smi_tools/README.md index e33e093548..4d5af959e4 100644 --- a/rocm_smi/python_smi_tools/README.md +++ b/rocm_smi/python_smi_tools/README.md @@ -15,13 +15,17 @@ LD_LIBRARY_PATH should be set to the folder containing librocm_smi64. ### Version + The SMI will report a "version" which is the version of the kernel installed: + ```shell AMD ROCm System Management Interface v$(uname) ``` + For ROCk installations, this will be the AMDGPU module version (e.g. 5.0.71) For non-ROCk or monolithic ROCk installations, this will be the kernel version, which will be equivalent to the following bash command: + ```shell $(uname -a) | cut -d ' ' -f 3) ``` @@ -34,6 +38,7 @@ For detailed and up to date usage information, we recommend consulting the help: ``` For convenience purposes, following is the output from the -h flag: + ```shell usage: rocmSmiLib_cli.py [-h] [-d DEVICE [DEVICE ...]] [--alldevices] [--showhw] [-a] [-i] [-v] [--showdriverversion]