Is there any way to debug OpenCL kernels on an Nvidia GPU, i.e. set breakpoints and inspect variables? My understanding is that Nvidia's tool does not allow OpenCL debugging, and AMD's and Intel's only allow it on their own devices.
9
votes
I have not found a solution for this issue however we often Debug using CodeXL on AMD platforms to make sure our code is working and then do final modifications and optimizations which are specific to the Nvidia platforms without debugging support. This has worked fairly well but obviously requires buying an AMD card that is similar to your Nvidia card.Its not an ideal solution but tends to work well for us.
- Jim V
Upvote for CodeXL tool, excellent tool from AMD, besides that you are out of luck on NVIDIA, you can probably use printf command(khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/…) as dirty way of looking at locals, I would suggest you move to AMD GPU's where tools & support is much better
- kiranputtur
1 Answers
1
votes
gDEBugger might help you somewhat (never used it though), but other than that there isn't any tool that I know of that can set breakpoints or inspect variables inside a kernel. Perhaps try to save intermediate outputs from your kernel if it is a long kernel. Sorry I can't give you a magic solution, debugging OpenCL is just hard.