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

Test updates of CCCL (thrust, cub, libcudacxx) to 2.1.0. #5388

Closed
wants to merge 3 commits into from
Closed
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
3 changes: 3 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ if(BUILD_CUML_TESTS OR BUILD_PRIMS_TESTS)
find_package(Threads)
endif()

# thrust before rmm, rmm before raft so we get the right version of thrust/rmm
include(cmake/thirdparty/get_thrust.cmake)
include(cmake/thirdparty/get_rmm.cmake)
Comment on lines +224 to +225
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a flag or something to enable this conditionally and then be able to do these test PRs without adding the get_dependency.cmake files every time>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discussed with @robertmaynard about this, since I was missing some historical context here. It sounds like this was tried before in #4643 which was closed without much discussion. I think I would argue that cuML should explicitly depend on thrust and rmm. As I understand it, the only reason not to do so (and to instead get those dependencies via raft) was because of patches that raft needed on thrust/rmm. However, it doesn't look like raft has patches for thrust/rmm at present (see raft's patches directory).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words, the historical reasons for the current state (no explicit dependencies) may be outdated and we may want to add explicit dependencies on thrust/rmm so that rapids-cmake is able to properly control these versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other context from @robertmaynard:
The original PR that added thrust and rmm to cuml: #3844
PR that yanked thrust/rmm/etc in 22.02: #4256

include(cmake/thirdparty/get_raft.cmake)

if(LINK_TREELITE)
Expand Down
23 changes: 23 additions & 0 deletions cpp/cmake/thirdparty/get_rmm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#=============================================================================
# Copyright (c) 2021-2022, 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.
#=============================================================================

function(find_and_configure_rmm)
include(${rapids-cmake-dir}/cpm/rmm.cmake)
rapids_cpm_rmm(BUILD_EXPORT_SET cuml-exports
INSTALL_EXPORT_SET cuml-exports)
endfunction()

find_and_configure_rmm()
24 changes: 24 additions & 0 deletions cpp/cmake/thirdparty/get_thrust.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# =============================================================================
# Copyright (c) 2022-2023, 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.
# =============================================================================

# Use CPM to find or clone thrust
function(find_and_configure_thrust)
include(${rapids-cmake-dir}/cpm/thrust.cmake)

rapids_cpm_thrust( NAMESPACE cuml
BUILD_EXPORT_SET cuml-exports
INSTALL_EXPORT_SET cuml-exports)
endfunction()

find_and_configure_thrust()
2 changes: 2 additions & 0 deletions fetch_rapids.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================
set(rapids-cmake-repo bdice/rapids-cmake)
set(rapids-cmake-branch cccl-update-2.1.0)
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUML_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.10/RAPIDS.cmake
${CMAKE_CURRENT_BINARY_DIR}/CUML_RAPIDS.cmake
Expand Down
Loading