I can debug my program for CPU using printf or gdb support, and the result correct, but when i set the device to GPU, the result is incorrect. does anyone know how i can debug the kernel code for GPU? printf and gdb not working for GPU. usually how do you debug the kernel code for GPU, such as checking the intermediate values?
Its not possible to debug kernel code for GPU using printf or gdb. However 3rd party applications like gDebugger are available, which will enable you to debug GPU kernel code.