cuda.bindings.nvml.device_get_accounting_stats_v2#

cuda.bindings.nvml.device_get_accounting_stats_v2(intptr_t device)#

Queries process’s accounting stats (v2).

For Kepler ™️ or newer fully supported devices. Accounting stats (v2) capture GPU utilization and other statistics across the lifetime of a process. Accounting stats (v2) can be queried during life time of the process and after its termination. The time field in nvmlAccountingStats_v2_t is reported as 0 during the lifetime of the process and updated to actual running time after its termination. Accounting stats (v2) are kept in a circular buffer, newly created processes overwrite information about old processes. See nvmlAccountingStats_v2_t for description of each returned metric. List of processes that can be queried can be retrieved from nvmlDeviceGetAccountingPids.

Parameters:

device (intptr_t) – The identifier of the target device.

Returns:

Reference in which to return the

process’s accounting stats (v2).

Return type:

nvmlAccountingStats_v2_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_v2