2
0

fix: [SWDEV-466302] [rocm/amd_smi_lib]

Fixes `amdsmi_get_gpu_process_list` now requires sudo to access pid and memory information

Code changes related to the following:
  * amdsmi_get_gpu_process_list()
  * CLI

Change-Id: I72b154c220276b354c350fcc067c9a7c32e6c173
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
Este cometimento está contido em:
Oliveira, Daniel
2024-06-18 13:51:29 -05:00
cometido por Maisam Arif
ascendente 057d688b55
cometimento a20db864b8
3 ficheiros modificados com 7 adições e 22 eliminações
+6 -11
Ver ficheiro
@@ -4830,10 +4830,6 @@ amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_
* Holding a copy of max_process before it is passed in will be helpful for monitoring
* the allocations done upon each call since the max_process will permanently be changed
* to reflect the actual number of processes running.
* Note: For the specific cases where the return status is AMDSMI_STATUS_NO_PERM only.
* The list of process and size are AMDSMI_STATUS_SUCCESS, however there are
* processes details not fully retrieved due to permissions.
*
*
* @param[out] list Reference to a user-provided buffer where the process
* list will be returned. This buffer must contain at least
@@ -4841,17 +4837,16 @@ amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_
* by user.
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,
* | ::AMDSMI_STATUS_NO_PERM on success, but not all details from process retrieved,
* | ::AMDSMI_STATUS_OUT_OF_RESOURCES, filled list buffer with data, but number of
* actual running processes is larger than the size provided.
*
*/
// Note: If the reserved size for processes is smaller than the number of
// actual processes running. The AMDSMI_STATUS_OUT_OF_RESOURCES is
// an indication the caller should handle the situation (resize).
// The max_processes is always changed to reflect the actual size of
// list of processes running, so the caller knows where it is at.
//
// Note: If the reserved size for processes is smaller than the number of
// actual processes running. The AMDSMI_STATUS_OUT_OF_RESOURCES is
// an indication the caller should handle the situation (resize).
// The max_processes is always changed to reflect the actual size of
// list of processes running, so the caller knows where it is at.
//
amdsmi_status_t
amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_proc_info_t *list);