NVTX Domain Events in CUPTI, CUDA 5.0

Hi,

My CUDA programs are annotated using nvtx markers and range. They are perfectly visible when using Nvidia Visual Profiler.

I try to automate my performance graphing and statistics, and therefore I’d like to collect the marker and range data automatically using scripts. As far as I know, this is not possible using the standard tools (nvprof does not output this data). If anyone knows how to do this using the standard tools I’d be very grateful!

Because it is not possible using the standard tools, I tried to capture the nvtx markers and ranges using a custom program that makes use of the CUPTI library. I started with the activity_trace example, activated the CUPTI_CB_DOMAIN_NVTX and changed the callback handler to output something when a event of this domain is received. BUT: There never seems to be such a callback (but there are markers inside the code!)

Any hints/pointers? I’m using CUDA 5.0 on a Ubuntu machine running Kernel 3.0.0.27 with 2 GTX 560 Ti.

Thank you very much!

You don’t need the CUPTI library if you just need to get the NVTX call trace in your program. You can simply replace the NVTX calls with a wrapper function, which makes the NVTX call and then prints the parameters of the call. Then you can parse the output.

Hi,

Thanks for your answer.
This is actually what I ended up doing - now I measure execution time (using lib papi) and print it out manually.

Would have been nice to achieve the same thing with only the nvprof, because I need to run nvprof anyway (to generate the profiler output for in-depth analysis).