I have a problem to debug a cuda kernal. However, the breakpoints in kernal function are never hitted. I tried to delete this project and re-generate using CMake, but it still not work. The kernal code is as follows:
__global__ void testKernel(int val)
{
printf("[%d, %d]:\t\tValue is:%d\n", \
blockIdx.y*gridDim.x + blockIdx.x, \
threadIdx.z*blockDim.x*blockDim.y + threadIdx.y*blockDim.x + threadIdx.x, \
val);
}
I think the problem is not related with kernal code but with configurations of this project. Because this kernal can be debugged in CUDA Samples projects.
I use Debug
->Windows
->Modules
and find that my target .lib
is not loaded. When I select CUDA Thread
, the Break Mode
shows:
You app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. onley native runtime code is executing).