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_handle Device which to query [in,out] max_processes Reference 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] list Reference 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_handle Device which to query [in] process Handle of process to query. [out] info Reference 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