Break points ignored and does not step into cuda Kernels.

I’m using a K40 system, some of the kernels worked perfectly but when I needed to debug, cuda-gdb does not work even for the most basic things.

I’m compiling using -g -G, I could set the breakpoints but they are ignored.

Then I tried to go step by step, and when I reach the cuda kernel, I did an step into (step command in cuda-gdb), but it jumps to the end of the kernel, never step into.

Then I wonder if could be a problem with my kernel, then I tried it with an working kernel, and again never steps into the kernel.

What I’m doing wrong?

Really frustrated because a very basic thing of debugging is not working…

I also tried with K80’s using the AWS preconfigured machine, and a very simple kernel from them, which just sum two arrays. I changed the compilation flags to include -g -G.

The result is the same, CUDA-GDB does not work.

Hi, Rafael

Actually we also doing test on AWS.
And it is OK for cuda-gdb.

  1. Which toolkit/driver are you using ?
  2. Can you try a simple sdk sample such as matrixMul ?
  3. Any info printed when you find it’s not work?
  4. Is there X attached to the GPU ?

cuda-gdb ./matrixMul

(cuda-gdb)set cuda break_on_launch all
(cuda-gdb)r

Then it should stop at the start of the kernel, and press ‘n’, it will step.