Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMAKE_CUDA_ARCHITECTURES doesn't change when build-system invokes cmake #7579

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if hasArg clean; then
fi

if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then
CUDF_CMAKE_CUDA_ARCHITECTURES="-DCMAKE_CUDA_ARCHITECTURES="
CUDF_CMAKE_CUDA_ARCHITECTURES="-DCMAKE_CUDA_ARCHITECTURES=ALL"
echo "Building for the architecture of the GPU in the system..."
else
CUDF_CMAKE_CUDA_ARCHITECTURES=""
Expand Down
3 changes: 1 addition & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ cmake_minimum_required(VERSION 3.18 FATAL_ERROR)

# This needs to be run before enabling the CUDA language due to the default initialization behavior
# of `CMAKE_CUDA_ARCHITECTURES`, https://gitlab.kitware.com/cmake/cmake/-/issues/21302
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES OR CMAKE_CUDA_ARCHITECTURES STREQUAL "ALL")
set(CUDF_BUILD_FOR_ALL_ARCHS TRUE)
elseif(CMAKE_CUDA_ARCHITECTURES STREQUAL "")
unset(CMAKE_CUDA_ARCHITECTURES CACHE)
set(CUDF_BUILD_FOR_DETECTED_ARCHS TRUE)
endif()

Expand Down
1 change: 0 additions & 1 deletion cpp/cmake/thirdparty/CUDF_GetRMM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ function(find_and_configure_rmm VERSION)
OPTIONS "BUILD_TESTS OFF"
"BUILD_BENCHMARKS OFF"
"CUDA_STATIC_RUNTIME ${CUDA_STATIC_RUNTIME}"
"CMAKE_CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES}"
"DISABLE_DEPRECATION_WARNING ${DISABLE_DEPRECATION_WARNING}"
)
cudf_restore_if_enabled(BUILD_TESTS)
Expand Down