Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profiling arbitrary CUDA applications

I know of the existence of nvvp and nvprof, of course, but for various reasons nvprof does not want to work with my app that involves lots of shared libraries. nvidia-smi can hook into the driver to find out what's running, but I cannot find a nice way to get nvprof to attach to a running process.

There is a flag --profile-all-processes which does actually give me a message "NVPROF is profiling process 12345", but nothing further prints out. I am using CUDA 8.

How can I get a detailed performance breakdown of my CUDA kernels in this situation?

like image 899
Ken Y-N Avatar asked Nov 07 '25 20:11

Ken Y-N


1 Answers

As comments suggest, you simply have to make sure to start the CUDA profiler (now it's NSight Systems or NSight Compute, no longer nvprof) before the processes you want to profile. You could, for example, configure it to run on system startup.

Your inability to profile your application has nothing to do with it being an "app that involves lots of shared libraries" - the profiling tools profile such applications just fine.

like image 91
einpoklum Avatar answered Nov 09 '25 08:11

einpoklum



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!