debug single kernel function
I have a problem in my code and need to debug it. Tried everything I can think of, but cannot find the problem without a debug similar to serial debug and my problem comes down to this: This is a part of a sample code, which is the one that presents itself if you create new cuda project in VS , but my question is: https://snag.gy/cg2j1Q.jpg I've added just the lines 13-18 and several breakpoints, which is describing my problem. How can I debug this kernel (let's say thread 1) and get n to actually iterate from 0-4, because like this, the loop seems to iterate (if i click continue, it jumps through breakpoints 5 times), but n is always 'n' has no value at the target location
I have a problem in my code and need to debug it. Tried everything I can think of, but cannot find the problem without a debug similar to serial debug and my problem comes down to this:

This is a part of a sample code, which is the one that presents itself if you create new cuda project in VS , but my question is:

https://snag.gy/cg2j1Q.jpg

I've added just the lines 13-18 and several breakpoints, which is describing my problem. How can I debug this kernel (let's say thread 1) and get n to actually iterate from 0-4, because like this, the loop seems to iterate (if i click continue, it jumps through breakpoints 5 times), but n is always 'n' has no value at the target location

#1
Posted 05/03/2017 04:05 PM   
Hello stanoo, I've seen you question at stack overflow, looks like you compile your project use release mode, just switch to the debug mode and rebuild it, then you can see the value in nsight. Best Regards Harry
Hello stanoo,

I've seen you question at stack overflow, looks like you compile your project use release mode, just switch to the debug mode and rebuild it, then you can see the value in nsight.

Best Regards
Harry

#2
Posted 05/04/2017 06:11 AM   
Hello Harry, thank you for your answer, but it still doesn't work, doesn't matter if I compile, build, debug under release or debug mode.
Hello Harry,

thank you for your answer, but it still doesn't work, doesn't matter if I compile, build, debug under release or debug mode.

#3
Posted 05/04/2017 06:47 PM   
I cannot repo on my local computer, could you tell me which version of gpu, driver, cuda and nsight you use, also it will be much helpful if you can give me your project.
I cannot repo on my local computer, could you tell me which version of gpu, driver, cuda and nsight you use, also it will be much helpful if you can give me your project.

#4
Posted 05/05/2017 05:53 AM   
Scroll To Top

Add Reply