I have read that to use atomicAdd for floating point operations in gpu with compute capability 2.x, we have to specify sm_20 arch.
Someone please aid me to do this. I am using VS 2008, win 7 64 bit.
I was using “simpleAtomicIntrinsics” example from sdk . It works if I use atomics for integers.
When I give floating point numbers the compiler gives the following error
c:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK 3.2/C/src/simpleAtomicIntrinsics/simpleAtomicIntrinsics.cu(86): error: no instance of overloaded function “atomicAdd” matches the argument list
Each time a description of the change, there is always plenty to talk about around the world. They are not exempt. A statement usually is: "i have to change almost immediately versions, so do not expect me to date continue to attack …
Sorry to bump an old topic, but i’ve got the same problem here.
I added “-arch=sm_20” to Project > Properties > CUDA C/C++ > Command line > Additional Options, but it won’t work.
Is there anything else ?
Well sadly, it doesn’t work. I don’t have “CUDA Runtime API/GPU” but only “CUDA C/C++” in property pages, and if i go to Device > Code generation “compute_20,sm_20” doesn’t work.
The weird thing is, if I try “-arch=sm_11” it does tell me
error : no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (float *, float)
which is fine,
but with “-arch=sm_20” I only have “error : identifier “atomicAdd” is undefined” …
What’s wrong : ( ?
EDIT : Okay, on VS2010 :
And don’t put “compute_20,sm_20;%CodeGeneration;” as I did !
Well sadly, it doesn’t work. I don’t have “CUDA Runtime API/GPU” but only “CUDA C/C++” in property pages, and if i go to Device > Code generation “compute_20,sm_20” doesn’t work.
The weird thing is, if I try “-arch=sm_11” it does tell me
error : no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (float *, float)
which is fine,
but with “-arch=sm_20” I only have “error : identifier “atomicAdd” is undefined” …
What’s wrong : ( ?
EDIT : Okay, on VS2010 :
And don’t put “compute_20,sm_20;%CodeGeneration;” as I did !