From 59d8d5e1b6b9ccbb4b937cd452b0fbc5827479e3 Mon Sep 17 00:00:00 2001 From: Paul Taylor Date: Tue, 18 May 2021 12:27:53 -0500 Subject: [PATCH] Fix CMake FindPackage rmm, pin dev envs' dlpack to v0.3 (#8271) * Fix CMake FindPackage rmm * Pin conda envs dlpack to v0.3 Authors: - Paul Taylor (https://github.com/trxcllnt) Approvers: - Jordan Jacobelli (https://github.com/Ethyling) - Robert Maynard (https://github.com/robertmaynard) - Keith Kraus (https://github.com/kkraus14) URL: https://github.com/rapidsai/cudf/pull/8271 --- conda/environments/cudf_dev_cuda11.0.yml | 4 ++-- conda/environments/cudf_dev_cuda11.2.yml | 4 ++-- conda/recipes/cudf/meta.yaml | 2 +- conda/recipes/libcudf/meta.yaml | 2 +- cpp/cmake/thirdparty/CUDF_GetRMM.cmake | 10 ++++++++-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/conda/environments/cudf_dev_cuda11.0.yml b/conda/environments/cudf_dev_cuda11.0.yml index a44472de7dc..171a5ed8af5 100644 --- a/conda/environments/cudf_dev_cuda11.0.yml +++ b/conda/environments/cudf_dev_cuda11.0.yml @@ -10,7 +10,7 @@ dependencies: - clang=8.0.1 - clang-tools=8.0.1 - cupy>7.1.0,<10.0.0a0 - - rmm=0.20.* + - rmm=21.06.* - cmake>=3.18 - cmake_setuptools>=0.1.3 - python>=3.7,<3.9 @@ -44,7 +44,7 @@ dependencies: - dask==2021.4.0 - distributed>=2.22.0,<=2021.4.0 - streamz - - dlpack + - dlpack==0.3 - arrow-cpp=1.0.1 - arrow-cpp-proc * cuda - double-conversion diff --git a/conda/environments/cudf_dev_cuda11.2.yml b/conda/environments/cudf_dev_cuda11.2.yml index 6e8d3e58cf1..28373d203d1 100644 --- a/conda/environments/cudf_dev_cuda11.2.yml +++ b/conda/environments/cudf_dev_cuda11.2.yml @@ -10,7 +10,7 @@ dependencies: - clang=8.0.1 - clang-tools=8.0.1 - cupy>7.1.0,<10.0.0a0 - - rmm=0.20.* + - rmm=21.06.* - cmake>=3.18 - cmake_setuptools>=0.1.3 - python>=3.7,<3.9 @@ -44,7 +44,7 @@ dependencies: - dask==2021.4.0 - distributed>=2.22.0,<=2021.4.0 - streamz - - dlpack + - dlpack==0.3 - arrow-cpp=1.0.1 - arrow-cpp-proc * cuda - double-conversion diff --git a/conda/recipes/cudf/meta.yaml b/conda/recipes/cudf/meta.yaml index eda11cde899..e0b37e97c9c 100644 --- a/conda/recipes/cudf/meta.yaml +++ b/conda/recipes/cudf/meta.yaml @@ -26,7 +26,7 @@ requirements: - cython >=0.29,<0.30 - setuptools - numba >=0.53.1 - - dlpack + - dlpack 0.3 - pyarrow 1.0.1 - libcudf {{ version }} - rmm {{ minor_version }} diff --git a/conda/recipes/libcudf/meta.yaml b/conda/recipes/libcudf/meta.yaml index 0b3fb5aa549..ea2fda399fd 100644 --- a/conda/recipes/libcudf/meta.yaml +++ b/conda/recipes/libcudf/meta.yaml @@ -39,7 +39,7 @@ requirements: - cudatoolkit {{ cuda_version }}.* - arrow-cpp 1.0.1 - arrow-cpp-proc * cuda - - dlpack + - dlpack 0.3 run: - {{ pin_compatible('cudatoolkit', max_pin='x.x') }} - arrow-cpp-proc * cuda diff --git a/cpp/cmake/thirdparty/CUDF_GetRMM.cmake b/cpp/cmake/thirdparty/CUDF_GetRMM.cmake index 9f6221d5d1f..b2861ae48c4 100644 --- a/cpp/cmake/thirdparty/CUDF_GetRMM.cmake +++ b/cpp/cmake/thirdparty/CUDF_GetRMM.cmake @@ -20,6 +20,12 @@ function(find_and_configure_rmm VERSION) return() endif() + if(${VERSION} MATCHES [=[([0-9]+)\.([0-9]+)\.([0-9]+)]=]) + set(MAJOR_AND_MINOR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}") + else() + set(MAJOR_AND_MINOR "${VERSION}") + endif() + # Consumers have two options for local source builds: # 1. Pass `-D CPM_rmm_SOURCE=/path/to/rmm` to build a local RMM source tree # 2. Pass `-D CMAKE_PREFIX_PATH=/path/to/rmm/build` to use an existing local @@ -27,7 +33,7 @@ function(find_and_configure_rmm VERSION) CPMFindPackage(NAME rmm VERSION ${VERSION} GIT_REPOSITORY https://github.com/rapidsai/rmm.git - GIT_TAG branch-${VERSION} + GIT_TAG branch-${MAJOR_AND_MINOR} GIT_SHALLOW TRUE OPTIONS "BUILD_TESTS OFF" "BUILD_BENCHMARKS OFF" @@ -39,6 +45,6 @@ function(find_and_configure_rmm VERSION) fix_cmake_global_defaults(rmm::rmm) endfunction() -set(CUDF_MIN_VERSION_rmm "${CUDF_VERSION_MAJOR}.${CUDF_VERSION_MINOR}") +set(CUDF_MIN_VERSION_rmm "${CUDF_VERSION_MAJOR}.${CUDF_VERSION_MINOR}.00") find_and_configure_rmm(${CUDF_MIN_VERSION_rmm})