Skip to content

Commit

Permalink
Fix CMake FindPackage rmm, pin dev envs' dlpack to v0.3 (#8271)
Browse files Browse the repository at this point in the history
* 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: #8271
  • Loading branch information
trxcllnt authored May 18, 2021
1 parent eb88a38 commit 59d8d5e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions conda/environments/cudf_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions conda/environments/cudf_dev_cuda11.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/libcudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions cpp/cmake/thirdparty/CUDF_GetRMM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@ 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
# RMM build directory as the install location for find_package(rmm)
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"
Expand All @@ -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})

0 comments on commit 59d8d5e

Please sign in to comment.