I am trying to use cuda-gdb with a CUDA kernel that is defined using a template
e.g.
template
global void my_first_kernel(FP *x)
but when I try to set a breakpoint of my_first_kernel cuda-gdb just says its necer heard of it. I i trying the filename and linenumber then it accpets this but when it runs and gets to the breakpoint i just get things like
Breakpoint 1, 0x0000000000402208 in dim3 (this=0x0, vx=32767, vy=2873198384, vz=2)
at /scratch/gpubuild/buildtools/ubuntu10.04/NVIDIA/3.2//bin/…/include/vector_types.h:473
473 host device dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {}
(cuda-gdb) step
0x0000000000402214 17 global void my_first_kernel(FP *x)
(cuda-gdb) s
0x000000000040213f in _device_stub__Z15my_first_kernelIfEvPT (__par0=0x200000010) at /tmp/tmpxft_0000679b_00000000-1_prac1d.cudafe1.stub.c:7
7 /tmp/tmpxft_0000679b_00000000-1_prac1d.cudafe1.stub.c: No such file or directory.
in /tmp/tmpxft_0000679b_00000000-1_prac1d.cudafe1.stub.c
If i remove the template and put a datatype in place of FP then all is fine.
Is it possible to debug templated code with cuda-gdb? Is there some trick I missed ?
–
jason