diff --git a/README.md b/README.md index a017f40f30..0b6b3f5be5 100755 --- a/README.md +++ b/README.md @@ -93,37 +93,37 @@ A simple "Hello World" type program that displays the temperature of detected de 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); - + // Get the socket count available in the system. ret = amdsmi_get_socket_handles(&socket_count, nullptr); - + // Allocate the memory for the sockets std::vector sockets(socket_count); // Get the socket handles in the system ret = amdsmi_get_socket_handles(&socket_count, &sockets[0]); - + std::cout << "Total Socket: " << socket_count << std::endl; - + // For each socket, get identifier and devices for (uint32_t i=0; i < socket_count; i++) { // Get Socket info char socket_info[128]; ret = amdsmi_get_socket_info(sockets[i], socket_info, 128); std::cout << "Socket " << socket_info<< std::endl; - + // Get the device count for the socket. uint32_t device_count = 0; ret = amdsmi_get_processor_handles(sockets[i], &device_count, nullptr); - + // Allocate the memory for the device handlers on the socket std::vector processor_handles(device_count); // Get all devices of the socket ret = amdsmi_get_processor_handles(sockets[i], &device_count, &processor_handles[0]); - + // For each device of the socket, get name and temperature. for (uint32_t j=0; j < device_count; j++) { // Get device type. Since the amdsmi is initialized with @@ -134,13 +134,13 @@ int main() { std::cout << "Expect AMD_GPU device type!\n"; return 1; } - + // Get device name amdsmi_board_info_t board_info; ret = amdsmi_get_gpu_board_info(processor_handles[j], &board_info); std::cout << "\tdevice " << j <<"\n\t\tName:" << board_info.product_name << std::endl; - + // Get temperature int64_t val_i64 = 0; ret = amdsmi_get_temp_metric(processor_handles[j], TEMPERATURE_TYPE_EDGE, @@ -148,11 +148,11 @@ int main() { std::cout << "\t\tTemperature: " << val_i64 << "C" << std::endl; } } - + // Clean up resources allocated at amdsmi_init. It will invalidate sockets // and devices pointers ret = amdsmi_shut_down(); - + return 0; } ``` @@ -169,18 +169,15 @@ int main() { - Install amdgpu driver - Install amd-smi-lib package through package manager - cd /opt//share/amd_smi -- pip install . - -or - -- pip3 install . +- python3 -m pip install --upgrade pip +- python3 -m pip install --user . - /opt//bin/amd-smi --help -Add /opt//bin to your shell's path to call amd-smi from the cmdline +Add /opt/rocm/bin to your shell's path to access amd-smi via the cmdline ## Documentation -Documentation for AMDSMI-CLI is available post install in /opt//libexec/amdsmi_cli/README.md +Documentation for AMDSMI-CLI is available in /opt//libexec/amdsmi_cli/README.md ## Rebuilding Python wrapper The python wrapper (binding) is an auto-generated file `py-interface/amdsmi_wrapper.py` diff --git a/amdsmi_cli/README.md b/amdsmi_cli/README.md index bcaa1d9659..3b2a3dc05f 100644 --- a/amdsmi_cli/README.md +++ b/amdsmi_cli/README.md @@ -16,13 +16,12 @@ Recommended: At least one AMD GPU with AMD driver installed - Install amdgpu driver - Install amd-smi-lib package through package manager - cd /opt//share/amd_smi -- pip install . - -or - -- pip3 install . +- python3 -m pip install --upgrade pip +- python3 -m pip install --user . - /opt//bin/amd-smi --help +Add /opt/rocm/bin to your shell's path to access amd-smi via the cmdline + ### RHEL 8 The default python version in RHEL 8 is python 3.6.8 @@ -31,14 +30,15 @@ To install the python library you need to upgrade to python 3.7+ The package's dependency manager will attempt to install python 3.8+ -Verify that your pip version is 3.7+ and if not you can use pip3.8 instead +Verify that your python version is 3.7+ and if not you can use python3.8 instead of python3 ### Example of Ubuntu 22.04 post amdgpu driver install ``` shell apt install amd-smi-lib cd /opt/rocm/share/amd_smi -pip install . +python3 -m pip install --upgrade pip +python3 -m pip install --user . /opt/rocm/bin/amd-smi ``` @@ -52,7 +52,7 @@ amd-smi will report the version and current platform detected when running the c amd-smi usage: amd-smi [-h] ... -AMD System Management Interface | Version: 0.0.4 | Platform: Linux Baremetal +AMD System Management Interface | Version: 23.0.1.0 | Platform: Linux Baremetal optional arguments: -h, --help show this help message and exit diff --git a/amdsmi_cli/Release Notes.md b/amdsmi_cli/Release Notes.md index 8f4ff9ceb9..6b056f935b 100644 --- a/amdsmi_cli/Release Notes.md +++ b/amdsmi_cli/Release Notes.md @@ -4,7 +4,14 @@ Documentation for AMDSMI-CLI is available post install in /opt//libexec/amdsmi_cli/README.md -## AMDSMI-CLI 0.0.4 +## AMDSMI-CLI 23.0.1.0 + +### Known Issues + +- not all ecc fields are currently supported +- RHEL 8 has extra install steps + +## AMDSMI-CLI 23.0.0.4 ### Added diff --git a/amdsmi_cli/_version.py b/amdsmi_cli/_version.py index 3dc1f76bc6..1283aa8b07 100644 --- a/amdsmi_cli/_version.py +++ b/amdsmi_cli/_version.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "23.0.1.0" diff --git a/amdsmi_cli/amdsmi_commands.py b/amdsmi_cli/amdsmi_commands.py index 4aacf829eb..6385c58f21 100644 --- a/amdsmi_cli/amdsmi_commands.py +++ b/amdsmi_cli/amdsmi_commands.py @@ -899,7 +899,7 @@ class AMDSMICommands(): if args.ecc_block: ecc_dict = {} try: - ras_states = amdsmi_interface.amdsmi_get_ras_block_features_enabled(args.gpu) + ras_states = amdsmi_interface.amdsmi_get_gpu_ras_block_features_enabled(args.gpu) for state in ras_states: if state['status'] == amdsmi_interface.AmdSmiRasErrState.ENABLED.name: gpu_block = amdsmi_interface.AmdSmiGpuBlock[state['block']] diff --git a/py-interface/pyproject.toml b/py-interface/pyproject.toml index d7f95a869a..1f82adab49 100644 --- a/py-interface/pyproject.toml +++ b/py-interface/pyproject.toml @@ -10,7 +10,7 @@ name = "amdsmi" authors = [ {name = "AMD", email = "amd-smi.support@amd.com"}, ] -version = '1.0' +version = '23.0.1.0' license = {file = "amdsmi/LICENSE"} readme = {file = "amdsmi/README.md", content-type = "text/markdown"} description = "SMI LIB - AMD GPU Monitoring Library"