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

Update to CCCL 2.2.0. #404

Merged
merged 4 commits into from
Dec 18, 2023
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
17 changes: 4 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
cmake_minimum_required(VERSION 3.23.1 FATAL_ERROR)

if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUCO_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.12/RAPIDS.cmake
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake
${CMAKE_CURRENT_BINARY_DIR}/CUCO_RAPIDS.cmake)
endif()
include(${CMAKE_CURRENT_BINARY_DIR}/CUCO_RAPIDS.cmake)
Expand Down Expand Up @@ -74,8 +74,7 @@ rapids_find_package(

rapids_cpm_init()

include(cmake/thirdparty/get_thrust.cmake)
include(cmake/thirdparty/get_libcudacxx.cmake)
include(cmake/thirdparty/get_cccl.cmake)
bdice marked this conversation as resolved.
Show resolved Hide resolved

###################################################################################################
# - cuco target ---------------------------------------------------------------------------------
Expand All @@ -84,7 +83,7 @@ add_library(cuco::cuco ALIAS cuco)
target_include_directories(cuco INTERFACE
INTERFACE $<BUILD_INTERFACE:${CUCO_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(cuco INTERFACE libcudacxx::libcudacxx CUDA::toolkit $<BUILD_INTERFACE:cuco::Thrust>)
target_link_libraries(cuco INTERFACE CCCL::CCCL CUDA::toolkit)
target_compile_features(cuco INTERFACE cxx_std_17 cuda_std_17)

###################################################################################################
Expand Down Expand Up @@ -128,21 +127,13 @@ structures tailored for efficient use with GPUs.

]=])

set(code_string
[=[
if(NOT TARGET cuco::Thrust)
thrust_create_target(cuco::Thrust FROM_OPTIONS)
endif()
]=])

# build directory cuco-config generation
rapids_export(
BUILD cuco
EXPORT_SET cuco-exports
GLOBAL_TARGETS cuco
NAMESPACE cuco::
DOCUMENTATION doc_string
FINAL_CODE_BLOCK code_string)
DOCUMENTATION doc_string)

if(INSTALL_CUCO)
install(DIRECTORY include/cuco/ DESTINATION include/cuco)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2021-2022, NVIDIA CORPORATION.
# Copyright (c) 2021-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
Expand All @@ -12,11 +12,10 @@
# 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 cuco
BUILD_EXPORT_SET cuco-exports)
# Use CPM to find or clone CCCL
function(find_and_configure_cccl)
include(${rapids-cmake-dir}/cpm/cccl.cmake)
rapids_cpm_cccl(INSTALL_EXPORT_SET cuco-exports BUILD_EXPORT_SET cuco-exports)
endfunction()

find_and_configure_thrust()
find_and_configure_cccl()
28 changes: 0 additions & 28 deletions cmake/thirdparty/get_libcudacxx.cmake

This file was deleted.

Loading