How to get the maximum GPU memory usage with nvprof

Hi, team.
I’m a newbie of nv profiler.
How can I retrieve the average GPU memory usage and maximum instantaneous GPU memory usage within a region of my Python code with nvprof command line tools?
Thanks very much.

Hi,
nvprof doesn’t support this feature. You can the GPU monitoring tool nvidia-smi https://developer.nvidia.com/nvidia-system-management-interface which provides stats about the memory usage. CUDA API cudaMemGetInfo() can also be used if that fits in your workflow.

1 Like