From 88d21929b27b2d59580883f7929d779a7f31d0d4 Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Thu, 4 Nov 2021 16:44:28 -0500 Subject: [PATCH 1/7] FIX Port libcudacxx patch from cudf --- cpp/cmake/libcudacxx.patch | 21 ++++++++++++++++ cpp/cmake/thirdparty/get_libcudacxx.cmake | 30 +++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 cpp/cmake/libcudacxx.patch create mode 100644 cpp/cmake/thirdparty/get_libcudacxx.cmake diff --git a/cpp/cmake/libcudacxx.patch b/cpp/cmake/libcudacxx.patch new file mode 100644 index 0000000000..3cdc40ef08 --- /dev/null +++ b/cpp/cmake/libcudacxx.patch @@ -0,0 +1,21 @@ +diff --git a/include/cuda/std/detail/__config b/include/cuda/std/detail/__config +index d55a43688..654142d7e 100644 +--- a/include/cuda/std/detail/__config ++++ b/include/cuda/std/detail/__config +@@ -23,7 +23,7 @@ + #define _LIBCUDACXX_CUDACC_VER_MINOR __CUDACC_VER_MINOR__ + #define _LIBCUDACXX_CUDACC_VER_BUILD __CUDACC_VER_BUILD__ + #define _LIBCUDACXX_CUDACC_VER \ +- _LIBCUDACXX_CUDACC_VER_MAJOR * 10000 + _LIBCUDACXX_CUDACC_VER_MINOR * 100 + \ ++ _LIBCUDACXX_CUDACC_VER_MAJOR * 100000 + _LIBCUDACXX_CUDACC_VER_MINOR * 1000 + \ + _LIBCUDACXX_CUDACC_VER_BUILD + + #define _LIBCUDACXX_HAS_NO_LONG_DOUBLE +@@ -64,7 +64,7 @@ + # endif + #endif + +-#if defined(_LIBCUDACXX_COMPILER_MSVC) || (defined(_LIBCUDACXX_CUDACC_VER) && (_LIBCUDACXX_CUDACC_VER < 110500)) ++#if defined(_LIBCUDACXX_COMPILER_MSVC) || (defined(_LIBCUDACXX_CUDACC_VER) && (_LIBCUDACXX_CUDACC_VER < 1105000)) + # define _LIBCUDACXX_HAS_NO_INT128 + #endif diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake new file mode 100644 index 0000000000..290c4f61e4 --- /dev/null +++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake @@ -0,0 +1,30 @@ +# ============================================================================= +# Copyright (c) 2020-2021, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# ============================================================================= + +# This function finds libcudacxx and sets any additional necessary environment variables. +function(find_and_configure_libcudacxx) + include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) + + rapids_cpm_libcudacxx( + BUILD_EXPORT_SET cudf-exports INSTALL_EXPORT_SET cudf-exports PATCH_COMMAND patch + --reject-file=- -p1 -N < ${CUDF_SOURCE_DIR}/cmake/libcudacxx.patch || true + ) + + set(LIBCUDACXX_INCLUDE_DIR + "${libcudacxx_SOURCE_DIR}/include" + PARENT_SCOPE + ) +endfunction() + +find_and_configure_libcudacxx() From fe2edff039ed6f49b5935333de8c6a4056de0d9b Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Thu, 4 Nov 2021 16:46:49 -0500 Subject: [PATCH 2/7] FIX CMakeLists change --- cpp/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 071b5dbed6..21b4f8e878 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -100,8 +100,10 @@ endif() # add third party dependencies using CPM rapids_cpm_init() +# thrust and libcudacxx need to be before cuco! include(cmake/thirdparty/get_thrust.cmake) include(cmake/thirdparty/get_rmm.cmake) +include(cmake/thirdparty/get_libcudacxx.cmake) include(cmake/thirdparty/get_cuco.cmake) if(BUILD_TESTS) From 37e07c945172b255e4639b3a95a030e89bb7908d Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Thu, 4 Nov 2021 16:49:30 -0500 Subject: [PATCH 3/7] FIX rapids-cmake version update --- cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 21b4f8e878..07042217e5 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -15,7 +15,7 @@ #============================================================================= cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR) -file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-21.10/RAPIDS.cmake +file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-21.12/RAPIDS.cmake ${CMAKE_BINARY_DIR}/RAPIDS.cmake) include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) include(rapids-cmake) From 79e8e4b8051e8beb455c64660f619f9a45af5a79 Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Fri, 5 Nov 2021 07:58:01 -0500 Subject: [PATCH 4/7] FIX cudf to raft rename: : --- cpp/cmake/thirdparty/get_libcudacxx.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake index 290c4f61e4..9cdf08adfe 100644 --- a/cpp/cmake/thirdparty/get_libcudacxx.cmake +++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake @@ -17,8 +17,8 @@ function(find_and_configure_libcudacxx) include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) rapids_cpm_libcudacxx( - BUILD_EXPORT_SET cudf-exports INSTALL_EXPORT_SET cudf-exports PATCH_COMMAND patch - --reject-file=- -p1 -N < ${CUDF_SOURCE_DIR}/cmake/libcudacxx.patch || true + BUILD_EXPORT_SET raft-exports INSTALL_EXPORT_SET raft-exports PATCH_COMMAND patch + --reject-file=- -p1 -N < ${RAFT_SOURCE_DIR}/cmake/libcudacxx.patch || true ) set(LIBCUDACXX_INCLUDE_DIR From 1d0bd9389e615614f11d33d403c4bbde34d04bbf Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Tue, 9 Nov 2021 12:41:13 -0600 Subject: [PATCH 5/7] UPD Update cuco hash --- cpp/cmake/thirdparty/get_cuco.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake/thirdparty/get_cuco.cmake b/cpp/cmake/thirdparty/get_cuco.cmake index 33e28ff622..a0c0faf0a9 100644 --- a/cpp/cmake/thirdparty/get_cuco.cmake +++ b/cpp/cmake/thirdparty/get_cuco.cmake @@ -22,7 +22,7 @@ function(find_and_configure_cuco VERSION) INSTALL_EXPORT_SET raft-exports CPM_ARGS GIT_REPOSITORY https://github.com/NVIDIA/cuCollections.git - GIT_TAG 729857a5698a0e8d8f812e0464f65f37854ae17b + GIT_TAG f0eecb203590f1f4ac4a9f1700229f4434ac64dc OPTIONS "BUILD_TESTS OFF" "BUILD_BENCHMARKS OFF" "BUILD_EXAMPLES OFF" From e6cdd03bce27b8c778369041324fd40c0d337385 Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Tue, 9 Nov 2021 12:46:35 -0600 Subject: [PATCH 6/7] FIX Remove unneeded get_libcudacxx include dir --- cpp/cmake/thirdparty/get_libcudacxx.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake index 9cdf08adfe..e18b912ba7 100644 --- a/cpp/cmake/thirdparty/get_libcudacxx.cmake +++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake @@ -21,10 +21,6 @@ function(find_and_configure_libcudacxx) --reject-file=- -p1 -N < ${RAFT_SOURCE_DIR}/cmake/libcudacxx.patch || true ) - set(LIBCUDACXX_INCLUDE_DIR - "${libcudacxx_SOURCE_DIR}/include" - PARENT_SCOPE - ) endfunction() find_and_configure_libcudacxx() From 7d5c8d4e676ce0d336956eea1f1ceef0279db1d5 Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Tue, 9 Nov 2021 12:53:15 -0600 Subject: [PATCH 7/7] UPD Update parallel level to 8 --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 96d70577f5..ede657bccd 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -15,7 +15,7 @@ function hasArg { # Set path and build parallel level export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH -export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} +export PARALLEL_LEVEL=${PARALLEL_LEVEL:-8} export CUDA_REL=${CUDA_VERSION%.*} # Set home to the job's workspace