Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profiling OpenCL kernels

I am trying to optimize my OpenCL kernels and all I have right now is NVidia Visual Profiler, which seems rather constrained. I would like to see line-by-line profile of kernels to better understand issues with coalescing, etc. Is there a way to get more thorough profiling data than the one, provided by Visual Profiler?

like image 327
Maxim Avatar asked Feb 27 '11 10:02

Maxim


2 Answers

I think that AMD CodeXL is what you are looking for. It's a free set of tools that contains an OpenCL debugger and a GPU profiler. The OpenCL debugger allows you to do line-by-line debugging of your OpenCL kernels and host code, view all variables across different workgroups, view special events and errors that occur, etc.. The GPU profiler has a nice feature that generates a timeline displaying how long your program spends on tasks like data transfer and kernel execution.

For more info and download links, check out http://developer.amd.com/tools-and-sdks/heterogeneous-computing/codexl/

like image 181
AmitB Avatar answered Nov 18 '22 19:11

AmitB


No, there is no such tool but you can profile your code changes. Try measuring the speed of your code, change something and then measure it once again. clEnqueueNDRangeKernel has an Event argument which can be used with clGetEventProfilingInfo afterwards, the timer is very sharp, the accuracy is measured in order of microseconds. This is the only way to measure performance of a separate code part...

like image 1
Lu4 Avatar answered Nov 18 '22 19:11

Lu4