View Full Version : Debug OpenCL Kernel ?
02-02-2010, 01:01 AM
I would like to debug my OpenCL Kernel code... so, I have create a 'char array' that I send to my kernel.
But how can I :
- Add a string ?
- Convert int to string ?
There are no built-in string methods in OpenCL. You'll have to write them yourself to do so. I would suggest a more primitive approach of using error codes to indicate status and using that instead. Remember that either way you are going to need to make sure that the work-items don't overwrite each other when returning information. Another good approach is to just use the CPU device which (at least on Mac OS X) supports printf().
02-16-2010, 07:29 PM
There is a tool called gDebugger which supports debugging OpenCL kernels. It is in its beta phase and for this time for free
I don't know if gDebugger will let you debug kernels or just API calls. Debugging the kernel requires getting access to breakpoints on the device. (These don't exist for GPU hardware, so you would have to use a CPU.)
12-07-2011, 01:25 PM
You can use this article to debug OpenCL kernel and Java openCL API call:
http://suhorukov.blogspot.com/2011/12/o ... -host.html (http://suhorukov.blogspot.com/2011/12/opencl-kernel-debugging-for-java-host.html)
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.