We could use “nvmlReturn_t nvmlDeviceGetAccountingStats ( nvmlDevice_t device, unsigned int pid, nvmlAccountingStats_t* stats )” to capture GPU utilization and other statistics across the lifetime of a process.
From my testing, if there are more than one process run on one gpu, the pid’s gpuUtilization will be affected by other processes a lot. How does API calculate gpu utilization if many processes run on one gpu? Should I trust the accounting stats returned by this API?