Most likely this is because you are not passing the -arch sm_11 option to nvcc. I’m not familiar with Visual Studio, so I don’t know how you add it. (By default, nvcc compiles code that runs on every CUDA device, and the first generation did not support atomic operations.)
x.cu can have an optimized code path that uses atomic operations, for example, which are only supported in devices of compute capability 1.1 and higher. The CUDA_ARCH macro can be used to differentiate various code paths based on compute capability. It is only defined for device code. When compiling with â€œarch=compute_11â€ for example, CUDA_ARCH is equal to 110
hello, now i have the same error with compiling :) how did you fix it? i mean i am using visual studio and i couldnt understand the solutions that helped you, so can you explain what did you do to fix it in visual studio?