I am using nsight 2.2, Toolkit 4.2, the latest nvidia driver, I am using a couple of gpu on my computer. Build the setting 4.2. I set "generate GPU output" in the properties of the CUDA project, the nsight monitor is on (everything looks great).
I set some breakpoints for my global kernel function. nsight stops when declaring a function, but skips multiple breakpoints. it just like nsight decides to hit the breakpoint or skip the breakpoint. The funny thing is that nsight stops on loops, but does not stop at simple assignment operations.
Another problem is that I cannot set focus or add variables to the watchlist. In this case (see the attached screenshot) I cannot resolve the value of the variable: "posss" or "testDetctoinRate1" which are registers in this case. on the other hand, the memory of the shared memory or block is automatically inserted into the local list.
Here is a screenshot of the kernel before debugging
Here is a screenshot during debugging
I call my kernel function with the 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 errors.
Is there any option to force nsight to stop at all breakpoints? How to add thread registers to watchlist?
Any help would be appreciated. I can send my code upon request.
Greetings
Initially, my debug command line:
Runtime API (NVCC compilation type is a hybrid object or .c file)
install CUDAFE_FLAGS = - sdk_dir "c: \ Program Files \ Microsoft SDK \ 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 \% (file name)% (extension) .obj" "% (FullPath)"
I changed on the properties page -> cuda -> host -> generates debug hosting information -> No
Now my command line does not contain the letters -g and -O, my command line is as follows:
Runtime API (NVCC compilation type is a hybrid object or .c file)
install CUDAFE_FLAGS = - sdk_dir "c: \ Program Files \ Microsoft SDK \ 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 am debugging with -o, does it matter? He does not make any changes