Hi, I’m little confuse with NVIDIA Parallel Nsight and OpenCL, can anyone confirm me that it is possible to debug OpenCL code using NVIDIA Parallel Nsight 1.5 or 2.0RC?
Nope, doesn’t debug OpenCL. It can profile, but not debug. AFAIK the only debugger that works with OpenCL is using gdb under linux with the amd OpenCL compiler for the CPU and then checking the documentation regarding the name mangling as to where to set the breakpoint after you compile the OpenCL code. Other option is printf under the CPU with either the intel or amd compiler (doesn’t work on the GPU with AMD either, only CPU).
Huh? No printf inside kernels on AMD GPUs??? Then some sort of daemon must have gotten into my machine. :) It works well enough for me. (For more than a year now)
You are probably running on the CPU in that case, as as far as I know AMD supports printf only on the CPU and not the GPU.
I can confirm that printf works on Radeon HD 4xxx AMD GPUs. Of course, the effect is that the wavefront is serialized, but you can test algorithm correctness and it’s pretty cool to see how the wavefronts are constructed.
It is true that it is not documented anywhere and the GPU does not advertize the cl_amd_printf capability, but it works anyway.