diff --git a/projects/amdsmi/CHANGELOG.md b/projects/amdsmi/CHANGELOG.md index 6a5fcc9906..bea6fc8981 100644 --- a/projects/amdsmi/CHANGELOG.md +++ b/projects/amdsmi/CHANGELOG.md @@ -219,7 +219,6 @@ $ amd-smi topology --json "link_type": "SELF", "num_hops": 0, "bandwidth": "N/A", - "fb_sharing": "ENABLED" }, { "gpu": 1, @@ -229,7 +228,6 @@ $ amd-smi topology --json "link_type": "XGMI", "num_hops": 1, "bandwidth": "50000-100000", - "fb_sharing": "ENABLED" }, ... ] diff --git a/projects/amdsmi/CMakeLists.txt b/projects/amdsmi/CMakeLists.txt index 97dbc61057..6cf0d289ef 100755 --- a/projects/amdsmi/CMakeLists.txt +++ b/projects/amdsmi/CMakeLists.txt @@ -28,7 +28,7 @@ find_program(GIT NAMES git) ## Setup the package version based on git tags. set(PKG_VERSION_GIT_TAG_PREFIX "amdsmi_pkg_ver") -get_package_version_number("24.5.0" ${PKG_VERSION_GIT_TAG_PREFIX} GIT) +get_package_version_number("24.5.1" ${PKG_VERSION_GIT_TAG_PREFIX} GIT) message("Package version: ${PKG_VERSION_STR}") set(${AMD_SMI_LIBS_TARGET}_VERSION_MAJOR "${CPACK_PACKAGE_VERSION_MAJOR}") set(${AMD_SMI_LIBS_TARGET}_VERSION_MINOR "${CPACK_PACKAGE_VERSION_MINOR}") diff --git a/projects/amdsmi/amdsmi_cli/README.md b/projects/amdsmi/amdsmi_cli/README.md index 72028e5bb3..06e891475c 100644 --- a/projects/amdsmi/amdsmi_cli/README.md +++ b/projects/amdsmi/amdsmi_cli/README.md @@ -79,7 +79,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: 24.5.0.0 | ROCm version: 6.1.1 | Platform: Linux Baremetal +AMD System Management Interface | Version: 24.5.1.0 | ROCm version: 6.1.1 | Platform: Linux Baremetal options: -h, --help show this help message and exit diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 431b23faf9..ee6159e5ed 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -2782,13 +2782,11 @@ class AMDSMICommands(): # "gpu": GPU # # "bdf": BDF identification # "weight": 0 - self (current node); weight >= 0 correlated with hops (GPU-CPU, GPU-GPU, GPU-CPU-CPU-GPU, etc..) - # "link_status": "ENABLED" - devices linked; "DISABLED" - devices not linked + # "link_status": "ENABLED" - devices linked; "DISABLED" - devices not linked; Correlated to access # "link_type": "SELF" - current node, "PCIE", "XGMI", "N/A" - no link,"UNKNOWN" - unidentified link type # "num_hops": num_hops - # of hops between devices # "bandwidth": numa_bw - The NUMA "minimum bandwidth-maximum bandwidth" beween src and dest nodes # "N/A" - self node or not connected devices - # "fb_sharing": "ENABLED/DISABLED" - same output as defined in link_status. Devices in a hive setup should - # all have sharing enabled. # } for dest_gpu_index, dest_gpu in enumerate(args.gpu): @@ -2818,7 +2816,7 @@ class AMDSMICommands(): weight = 0 num_hops = 0 - if src_gpu != dest_gpu: + if src_gpu != dest_gpu: weight = amdsmi_interface.amdsmi_topo_get_link_weight(src_gpu, dest_gpu) num_hops = amdsmi_interface.amdsmi_topo_get_link_type(src_gpu, dest_gpu)['hops'] link_status = amdsmi_interface.amdsmi_is_P2P_accessible(src_gpu, dest_gpu) @@ -2827,7 +2825,6 @@ class AMDSMICommands(): else: link_status = "DISABLED" - # fb_sharing in BM - in a hive configuration, this is # link_status = amdsmi_is_P2P_accessible(src,dest) dest_gpu_links = { "gpu": self.helpers.get_gpu_id_from_device_handle(dest_gpu), @@ -2837,11 +2834,9 @@ class AMDSMICommands(): "link_type": link_type, "num_hops": num_hops, "bandwidth": numa_bw, - "fb_sharing": link_status } - if not args.access: # currently includes fb_sharing + if not args.access: del dest_gpu_links['link_status'] - del dest_gpu_links['fb_sharing'] if not args.weight: del dest_gpu_links['weight'] if not args.link_type: @@ -2851,9 +2846,9 @@ class AMDSMICommands(): if not args.numa_bw: del dest_gpu_links['bandwidth'] links.append(dest_gpu_links) - isEndOfDest = dest_gpu_index+1 == len(args.gpu) + dest_end = dest_gpu_index+1 == len(args.gpu) isEndOfSrc = src_gpu_index+1 == len(args.gpu) - if isEndOfDest: + if dest_end: topo_values[src_gpu_index]['links'] = links continue if isEndOfSrc: diff --git a/projects/amdsmi/docs/doxygen/Doxyfile b/projects/amdsmi/docs/doxygen/Doxyfile index de8ab73b66..ef62d4d1c2 100644 --- a/projects/amdsmi/docs/doxygen/Doxyfile +++ b/projects/amdsmi/docs/doxygen/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = AMD SMI # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "24.5.0.0" +PROJECT_NUMBER = "24.5.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/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 3f7bd3989e..ba73c093b9 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -154,7 +154,7 @@ typedef enum { #define AMDSMI_LIB_VERSION_MAJOR 5 //! Minor version should be updated for each API change, but without changing headers -#define AMDSMI_LIB_VERSION_MINOR 0 +#define AMDSMI_LIB_VERSION_MINOR 1 //! Release version should be set to 0 as default and can be updated by the PMs for each CSP point release #define AMDSMI_LIB_VERSION_RELEASE 0 diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index 4199f1a906..19454121ae 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -882,24 +882,13 @@ except AmdSmiException as e: ### amdsmi_get_gpu_process_list -Description: Returns the list of processes for the given GPU. -The list is of type `amdsmi_proc_info_t` and holds information about the running process. +Description: Returns the list of processes running on the target GPU. Input parameters: * `processor_handle` device which to query -Output: List of process processes with fields - -Output: Dictionary with fields - -Field | Description ----|--- -`name` | Name of process -`pid` | Process ID -`mem` | Process memory usage -`engine_usage` |
Subfield Description
`gfx`GFX engine usage in ns
`enc`Encode engine usage in ns
-`memory_usage` |
Subfield Description
`gtt_mem`GTT memory usage
`cpu_mem`CPU memory usage
`vram_mem`VRAM memory usage
+Output: List of `amdsmi_proc_info_t` process objects running on the target GPU; can be empty Exceptions that can be thrown by `amdsmi_get_gpu_process_list` function: @@ -921,7 +910,50 @@ try: print("No processes running on this GPU") else: for process in processes: - print(process) + print(amdsmi_get_gpu_process_info(device, process)) +except AmdSmiException as e: + print(e) +``` + +### amdsmi_get_gpu_process_info + +Description: Returns info about process given the target GPU and the corresponding `amdsmi_proc_info_t` object + +Input parameters: + +* `processor_handle` device which to query + +Output: Dictionary with fields + +Field | Description +---|--- +`name` | Name of process +`pid` | Process ID +`mem` | Process memory usage +`engine_usage` |
Subfield Description
`gfx`GFX engine usage in ns
`enc`Encode engine usage in ns
+`memory_usage` |
Subfield Description
`gtt_mem`GTT memory usage
`cpu_mem`CPU memory usage
`vram_mem`VRAM memory usage