Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Add guards against unsupported arch options.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Jun 5, 2023
1 parent 6f80a16 commit 7af4b33
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmake/CubCudaConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ enable_language(CUDA)
# Architecture options:
#

# Since we have to filter the arch list based on target features, we don't
# currently support the convenience arch flags:
if ("all" IN_LIST CMAKE_CUDA_ARCHITECTURES OR
"all-major" IN_LIST CMAKE_CUDA_ARCHITECTURES OR
"native" IN_LIST CMAKE_CUDA_ARCHITECTURES)
message(FATAL_ERROR
"The CUB dev build requires an explicit list of architectures in CMAKE_CUDA_ARCHITECTURES. "
"The convenience flags of 'all', 'all-major', and 'native' are not supported.\n"
"CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}")
endif()

# Create a new arch list that only contains arches that support CDP:
set(CUB_CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES})
set(CUB_CUDA_ARCHITECTURES_RDC ${CUB_CUDA_ARCHITECTURES})
Expand Down

0 comments on commit 7af4b33

Please sign in to comment.