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

Commit

Permalink
Use default rapids-cmake CUDA_ARCHITECTURES (#140)
Browse files Browse the repository at this point in the history
CMake [initializes `CMAKE_CUDA_ARCHITECTURES` from the `CUDAARCHS` environment variable](https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_ARCHITECTURES.html).

Defaulting `CMAKE_CUDA_ARCHITECTURES` to a fixed list of archs prevents CMake from initializing the value from the envvar.

This PR skips setting `CMAKE_CUDA_ARCHITECTURES`, and instead uses `rapids-cmake` default behavior of [initializing from the `CUDAARCHS` envvar](https://github.com/rapidsai/rapids-cmake/blob/branch-24.04/rapids-cmake/cuda/init_architectures.cmake#L73-L93) and falling back to the same default [archs list](https://github.com/rapidsai/rapids-cmake/blob/branch-24.04/rapids-cmake/cuda/set_architectures.cmake#L54) as is currently used in `build.sh`.

Authors:
  - Paul Taylor (https://github.com/trxcllnt)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #140
  • Loading branch information
trxcllnt authored Mar 4, 2024
1 parent 0668299 commit 0f54f73
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ include(rapids-cuda)
include(rapids-export)
include(rapids-find)

if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 70-real 80-real 86)
endif ()
rapids_cuda_init_architectures(WHOLEGRAPH)

project(WHOLEGRAPH VERSION ${WHOLEGRAPH_VERSION} LANGUAGES CXX CUDA)
Expand Down
3 changes: 0 additions & 3 deletions python/pylibwholegraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ include(rapids-cmake)
include(rapids-cuda)
include(rapids-cpm)

if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 70-real 80-real 86)
endif ()
rapids_cuda_init_architectures(PYLIBWHOLEGRAPH)

project(PYLIBWHOLEGRAPH VERSION ${WHOLEGRAPH_VERSION} LANGUAGES C CXX CUDA)
Expand Down

0 comments on commit 0f54f73

Please sign in to comment.