cuda vs 断点_Nsight跳过(忽略)在VS10中的断点Cuda工作正常,nsight一直跳过几个断点...

I'm using nsight 2.2 , Toolkit 4.2 , latest nvidia driver , I'm using couple gpu's in my computer. Build customize 4.2.

I have set "generate GPU ouput" on CUDA's project properties, nsight monitor is on (everything looks great).

I set several break points on my global - kernel function . nsight stops at the declaration of the function , but skips over several break points. it's just like nsight decide whether to hit a break point or skip over a break point.

The funny thing is that nsight stops at for loops , but doesn't stop on simple assignment operations.

One more problem is that I can't set focus or add variables to the watch list , In this case (see attached screenshot)I can't resolve the value of variable : "posss" or "testDetctoinRate1"

which are registers in this case. on the other hand , shared memory or block memory would insert automatically to the local's list.

I evoke my kernel function with following call:

checkCUDA<<<1, 32>>>(sumMat->rows,sumMat->cols , (UINT *)pGPUsumMat);

cudaError = cudaGetLastError();

if(cudaError != cudaSuccess)

{

printf("CUDA error: %s\n", cudaGetErrorString(cudaError));

exit(-1);

}

kernel call works without an error.

Is there any option to forcing nsight stops at all breakpoints ?

How can I add thread's registers to my watch list ?

Any help would be appreciated

I can post my code on demand

Cheers

Initially , My debug command line is as followed:

Runtime API (NVCC Compilation Type is hybrid object or .c file)

set CUDAFE_FLAGS=--sdk_dir "c:\Program Files\Microsoft SDKs\Windows\v7.0A\"

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\nvcc.exe" --use-local-env --cl-version 2010 -ccbin "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin" -I"......\opencv\modules\gpu\src\opencv2\gpu\device" -I"......\opencv\modules\gpu\include\opencv2\gpu" -I"......\build\include\" -G --keep-dir "Debug" -maxrregcount=0 --machine 32 --compile -g -Xcompiler "/EHsc /nologo /Od /Zi /MDd " -o "Debug\%(Filename)%(Extension).obj" "%(FullPath)"

I changed on property page --> cuda --> host --> generate hosting debug information --> No

Now my command line doesn't contain the -g and -O letters , my command line is as followed:

Runtime API (NVCC Compilation Type is hybrid object or .c file)

set CUDAFE_FLAGS=--sdk_dir "c:\Program Files\Microsoft SDKs\Windows\v7.0A\"

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\nvcc.exe" --use-local-env --cl-version 2010 -ccbin "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin" -I"......\opencv\modules\gpu\src\opencv2\gpu\device" -I"......\opencv\modules\gpu\include\opencv2\gpu" -I"......\build\include\" -G --keep-dir "Debug" -maxrregcount=0 --machine 32 --compile -Xcompiler "/EHsc /nologo /Od /Zi /MDd " -o "Debug\%(Filename)%(Extension).obj" "%(FullPath)"

although, I do debug with -o , does it matter ?

It doesn't make any change

解决方案

Right click the .cu file in the Solution Explorer, then go to CUDA C/C++ | Device and set Generate GPU Debug Information to Yes (-G0).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值