error : identifier “atomicAdd” is undefined under visual studio 2010 & cuda 4.2 with Fermi GPU

前端 未结 3 1657
孤独总比滥情好
孤独总比滥情好 2020-12-21 02:21

I was trying to compile some CUDA codes under visual studio 2010 with CUDA 4.2 (I created this CUDA project using Parallel Nsight 2.2), but I encountered an atomic problem \

相关标签:
3条回答
  • 2020-12-21 02:39

    Try to compile with the flag -arch sm_20

    0 讨论(0)
  • 2020-12-21 02:44

    "Atomics are unavailable under compute architecture 1.0, but you're still trying to compile for it according to your build log. Try removing references to compute_10 and sm_10 from your CUDA project properties and compiling for just compute architecture 2.0 (GeForce 400 series and newer)." It's absolutely right,BTW,if you guys are compiling rodrigob_doppia's source code(boosted_learning),you can just add the line in your machine configuration: set(CUDA_NVCC_FLAGS "-arch=sm_20" CACHE STRING "nvcc flags" FORCE) Actually,it is set to switch the arch flag to sm_20,just the same as the saying above.

    0 讨论(0)
  • 2020-12-21 02:51

    Atomics are unavailable under compute architecture 1.0, but you're still trying to compile for it according to your build log. Try removing references to compute_10 and sm_10 from your CUDA project properties and compiling for just compute architecture 2.0 (GeForce 400 series and newer).

    0 讨论(0)
提交回复
热议问题