BGHT icon indicating copy to clipboard operation
BGHT copied to clipboard

CUDA Arch Error

Open HakubunLuo opened this issue 10 months ago • 12 comments

when i using it in my project, i meet:

/usr/local/cuda/include/cuda/std/detail/__atomic:11:4: error: #error "CUDA atomics are only supported for sm_60 and up on *nix and sm_70 and up on Windows."
   11 | #  error "CUDA atomics are only supported for sm_60 and up on *nix and sm_70 and up on Windows."
      |    ^~~~~

My GPU is RTX3060 on CUDA 11.4, Ubuntu 18.04 Here is my CMakeLists.txt configuration:

include(cmake/CPM.cmake)
CPMAddPackage(
        NAME bght
        URL "https://github.com/owensgroup/BGHT/archive/refs/heads/main.zip"
        OPTIONS
        "build_tests OFF"
        "build_benchmarks OFF"
)

set(CUDA_ARCHS 70)
cuda_add_library(mylib SHARED mylib.cu mylib.cuh)
target_link_libraries(mylib bght)
set_target_properties(mylib PROPERTIES CUDA_ARCHITECTURES ${CUDA_ARCHS})`

HakubunLuo avatar Aug 31 '23 03:08 HakubunLuo