"Could not resolve name" while debugging ALEA Kernel with Atomic Operation (atomic_add)

181 views Asked by At

I am using ALEA GPU for GPU Programming (C#). If I use an Atomic Operation like atomic_add in the Kernel, I get "Could not resolve name" error in CUDA WarpWatch window for my variables during Kernel debugging. I see the values of blockIdx.x, blockDim.x, threadIdx.x and arrays but variable names cannot be resolved. The kernel works as expected but variables cannot be monitored during debugging, thus making it difficult to fix any bug. CUDA 8 Toolkit is installed and I am using Visual Studio 2015.

Any ideas?

1

There are 1 answers

0
Daniel On

This is happening because of some optimizations that are done by the NVIDIA NVVM backend, regardless if it is compiled in Debug or Release mode. It assigns some values to registers and there is currently no way to turn that of. The behavior of CUDA C is very similar. The only way to get the results is to write them to global memory to trick the register allocation or to write them to the console in the kernel as you have done. As of now, I do not know of any other approach.