Process information

Process information#

AMD SMI: Process information
Process information

Functions

amdsmi_status_t amdsmi_get_gpu_process_list (amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_process_handle_t *list)
 Returns the list of processes running on a given GPU including itself. More...
 
amdsmi_status_t amdsmi_get_gpu_process_info (amdsmi_processor_handle processor_handle, amdsmi_process_handle_t process, amdsmi_proc_info_t *info)
 Returns the process information of a given process. Engine usage show how much time the process spend using these engines in ns. More...
 

Detailed Description

Function Documentation

◆ amdsmi_get_gpu_process_list()

amdsmi_status_t amdsmi_get_gpu_process_list ( amdsmi_processor_handle  processor_handle,
uint32_t *  max_processes,
amdsmi_process_handle_t *  list 
)

Returns the list of processes running on a given GPU including itself.

Note
The user provides a buffer to store the list and the maximum number of processes that can be returned. If the user sets max_processes to 0, the current total number of processes will replace max_processes param. After that, the function needs to be called again, with updated max_processes, to successfully fill the process list, which was previously allocated with max_processes
Parameters
[in]processor_handleDevice which to query
[in,out]max_processesReference to the size of the list buffer in number of elements. Returns the return number of elements in list or the number of running processes if equal to 0, and if given value in param max_processes is less than number of processes currently running, AMDSMI_STATUS_OUT_OF_RESOURCES will be returned.
[out]listReference to a user-provided buffer where the process list will be returned. This buffer must contain at least max_processes entries of type smi_process_handle. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_gpu_process_info()

amdsmi_status_t amdsmi_get_gpu_process_info ( amdsmi_processor_handle  processor_handle,
amdsmi_process_handle_t  process,
amdsmi_proc_info_t info 
)

Returns the process information of a given process. Engine usage show how much time the process spend using these engines in ns.

Parameters
[in]processor_handleDevice which to query
[in]processHandle of process to query.
[out]infoReference to a process information structure where to return information. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail