Measure SM utilization per process

HI,

I have multiple processes running on the GPU, and I want to measure the SM utilization for each of the processes per second. Is there a way to do it? I tried using nvidia-smi, but it shows the resource utilization of the entire GPU, not the individual processes. Please let me know if there is a way to monitor the same?

nvidia-smi pmon or nvml api NVML API Reference Guide :: GPU Deployment and Management Documentation