How to print api calls per thread with nvprof

618 views Asked by At

I am profiling a CUDA application and dumping the logs to a file say target.prof

My application uses multiple threads to dispatch kernels and I want to observe the api calls from just one of those threads. I tried using nvprof -i target.prof --print-api-trace but this does not print the thread_id.

When I open this file with the visual profiler, I can see which API calls were launched from which thread. How can I access the same information using the command line profiler?

Edit: View in the visual profiler

Visual Profiler showing multiple threads

1

There are 1 answers

8
Pradeep Kumar On

Are GPU threads launching those kernels or CPU threads? if cpu threads then use the option --cpu-thread-tracing on.