如何在Nvidia GPU上调试OpenCL?

问题描述:

是否可以在Nvidia GPU上调试OpenCL内核,即设置断点并检查变量?我的理解是 Nvidia的工具不允许OpenCL调试,并且 AMD的

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.

gDEBugger可能会对您有所帮助(虽然从未使用过),但除此之外,我所知道的任何工具都无法设置断点或检查变量在内核中.如果是长内核,也许尝试保存内核的中间输出.抱歉,我无法给您一个神奇的解决方案,调试OpenCL很难.

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.