Find Peak Gpu Memory Usage in cuDNN algorithm

In the production environment, I want to find the peak gpu memory usage of my cuDNN based algorithm by running it every day as part of the test automation setup. Is there any light weight profiling library that I can use to start/stop profiling and retrieve profile information from within the C++/CLI test application.

I wish to retrieve the peak gpu memory usage information in my test application rather than visualizing the profiler logs.

The library I know of for that is CUPTI. I don’t have a ready formula to retrieve peak memory usage.

Thanks Robert.

I just went through the CUPT I api documentation, is there a way to measure the peak memory usage from the metrics available. I could see only global memory writes / reads etc, nothing specific to global memory allocations!