1

I'm trying to figure out how to discover memory usage of a CUDA process (GPU ocupancy of my process). I already tried cudaMemGetInfo and nvidia-smi, but I think both report the whole GPU memory infos. So I'm wondering how to get memory info of my CUDA process, just like in linux /proc/[pid]/status. Thanks.

BradleyDotNET
  • 60,462
  • 10
  • 96
  • 117
  • 4
    memory usage and GPU occupancy are two different things. On recent drivers, if you run nvidia-smi before launching your process, it will show the available memory plus the small amount that is used. If you then launch your process and run nvidia-smi again, it will label the process ID that is using the GPU, and the memory info will (presumably) be different. Can you not subtract the two numbers to get the memory used by that process? – Robert Crovella Oct 29 '12 at 19:32
  • Yeah, subtract the two numbers seems to work, but I'm not sure if this way is a reliable way to calculate. – user1783813 Oct 31 '12 at 17:43

0 Answers0