PC sampling with nvprof

Hi All,

Generally, NSight employs nvprof to do the profiler work. Then could I get PC sampling statistic directly through nvprof instead of letting NSight do PC sampling profile?

I would like to profile a program with nvprof on a server and import result to Nsight to my Mac laptop since the internet is not so stable to do the remote profiling.

Thanks,

Hi, echobrad

You can use nvprof --source-level-analysis pc_sampling -o XX.pdm ./sample to get the profile output and then import to nvvp

Thanks, Veraj! That is what I need.

When importing, do you import XX.pdm as the “timeline data file”, “Event/Metric data files”, or both?

Importing as the former seems to work, but it’s missing a bunch of data. Importing as the second result in an out-of-memory error (which can perhaps be mitigated by -Xmx and -Xms arguments but I’m doubtful). Importing as both encounters similar OOM errors.

Hi, ragerdl

You can use nvprof -o timeline.pdm ./sample to get timeline data.

And then import timeline.pdm as timeline data file and XX.pdm as metrics data file.
Then it should work.

Bingo, thanks Veraj!