I am somewhat familiar with NVidia CUDA development. In CUDA world it's quite easy to debug the code inside kernels: both NSight Visual Studio and Nsight Visual Studio Code allow to do that.
I would like to be able to run a visual debugger for individual OpenCL kernels at runtime, similar to CUDA kernels in Nsight Visual Studio (with Locals, Watches, Memory and Breakpoints set in kernels).
printf
debugging. This is a very limited approach that allows to debug only simple programs. It is not reliable and it does not allow to easily find problems when, for example, two parallel kernels try to write to the same memory address.How can I run a visual debugger for individual OpenCL kernels at runtime, similar to CUDA kernels in Nsight Visual Studio (with Locals, Watches, Memory and Breakpoints set in kernels)?
Intel provides Intel Distribution for GDB to debug OpenCL kernels on GPU. The debugger is available for both Linux and Windows systems. It is a part of oneAPI Base Toolkit. Additional information about how to use it on a particular system can be found in the official documentation: