Script to parse the profiler output

If you want to find out the total time recorded by the profiler, this is a simple script that may be useful.

The first step is to enable the profiler and use the comma separated format

The script ( total_time) is a simple one line of awk:

Once the log file has been generated (if the CUDA_PROFILE_LOG variable is not set, it will be named cuda_profile.log), you can simply invoke the script


Note: You should also put your own timers in your code to measure total wall-clock time. The timers in CUDA are inside of the API calls, so they don’t include any app overhead.