Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug into CUDA kernel code using visual studio 2008?

Hey, I am using Visual Studio 2008, with CUDA 3.2. I am trying to debug into a function with this signature:

 MatrixMultiplication_Kernel<<<dimGrid, dimBlock>>>(Md, Nd, Pd, Width);

I can step into the function, however when I get into the function it doesn't let me step over any of the code and tells me that no source is available. Anybody knows how to debug into this properly?

Thank you!

like image 632
ntsue Avatar asked Oct 28 '10 06:10

ntsue


2 Answers

You can now debug on a single machine with only one GPU using NSight.

Thought I'd update this, since the previous answers are no longer correct (you no longer need 2 GPUs) and it sent me off in the wrong direction for a while.

like image 133
JSoet Avatar answered Nov 08 '22 19:11

JSoet


Update: Parallel Nsight is now free and supports debugging with only one GPU in your system.

To debug device code within Visual Studio you will need Parallel Nsight. The standard version is free and offers the debugging you require as well as device code profiling.

If you want to debug on a single machine then you will need two GPUs (since the GPU running the code will be stopped when it hits a breakpoint, and hence your display would block as well). They don't need to be high-end GPUs though, anything from G92 onwards will do (including most Fermi GPUs as listed here).

like image 6
Tom Avatar answered Nov 08 '22 20:11

Tom