cuda.bindings.nvml.device_get_accounting_stats#
- cuda.bindings.nvml.device_get_accounting_stats(intptr_t device, unsigned int pid)#
Queries process’s accounting stats.
For Kepler ™️ or newer fully supported devices. Accounting stats capture GPU utilization and other statistics across the lifetime of a process. Accounting stats can be queried during life time of the process and after its termination. The time field in
nvmlAccountingStats_tis reported as 0 during the lifetime of the process and updated to actual running time after its termination. Accounting stats are kept in a circular buffer, newly created processes overwrite information about old processes. SeenvmlAccountingStats_tfor description of each returned metric. List of processes that can be queried can be retrieved fromnvmlDeviceGetAccountingPids.- Parameters:
device (intptr_t) – The identifier of the target device.
pid (unsigned int) – Process Id of the target process to query stats for.
- Returns:
- Reference in which to return the process’s
accounting stats.
- Return type:
nvmlAccountingStats_t
Note
Accounting Mode needs to be on. See
nvmlDeviceGetAccountingMode.Note
Only compute and graphics applications stats can be queried. Monitoring applications stats can’t be queried since they don’t contribute to GPU utilization.
Note
In case of pid collision stats of only the latest process (that terminated last) will be reported.
Note
On Kepler devices per process statistics are accurate only if there’s one process running on a GPU.
See also
nvmlDeviceGetAccountingStats