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?