How to determine how many processes are being used by GPU in PyTorch?

Is there a PyTorch function that I can use to determine how many processes on my GPU is being used in my PyTorch code?

Hi,

Could you be more precise about what you mean here? GPU usage and processes are different things and are not linked.

Yes, I think I actually mean cores.

I’ve had little experience with GPU parallel computing. Most of the stuff I’ve done is in distributed systems, dealing with clusters/processors/cores. I’m trying to find the analogy with GPUs.

My NVIDIA GPU has 684 cores, so I’m basically wondering how many cores are being used in parallel by PyTorch when it is using the GPU?

The cuda architecture is quite tricky.
I’m sure online sources will be better than me explaining, this one looks good and with nice illustrations.

To check the SM/thread usage for particular kernels on the gpu, I think the simplest is to run nvidia visual profiler (nvcc) and check each kernel there. You will get the allocated ressources by the kernel and they use.

1 Like