Skip to content

Commit

Permalink
Mark all cccl and cuco kernels with hidden visibility (#523)
Browse files Browse the repository at this point in the history
Patch both CCCL and CUCO to have only internal linkage.

For cuco I am working on upstreaming these changes ( NVIDIA/cuCollections#422 ). Once that is accepted and we have validated that moving cuco is stable ( e.g. changes around `cuco::experimental::static_set` ) we can drop this patch set.

For cccl the long term fix is to move to CCCL 2.3+, but due to issues ( NVIDIA/cccl#1249, maybe others ) that isn't viable for the 24.02 timeframe.
Since the CCCL changes mean C++ and CUDA sources have non compatible ABI's, we need to specify `THRUST_DISABLE_ABI_NAMESPACE` and `THRUST_IGNORE_ABI_NAMESPACE_ERROR` so that we don't change ABI in rapids-cmake consumers since they expect 2.2 behavior.

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #523
  • Loading branch information
robertmaynard authored Jan 18, 2024
1 parent 2b94de8 commit 40d1a96
Show file tree
Hide file tree
Showing 4 changed files with 2,071 additions and 1 deletion.
15 changes: 15 additions & 0 deletions rapids-cmake/cpm/cccl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,21 @@ function(rapids_cpm_cccl)
EXPORT_SET ${_RAPIDS_INSTALL_EXPORT_SET} CONDITION to_install)
endif()

# Can be removed once we move to CCCL 2.3
#
target_compile_definitions(CCCL::CCCL INTERFACE THRUST_DISABLE_ABI_NAMESPACE)
target_compile_definitions(CCCL::CCCL INTERFACE THRUST_IGNORE_ABI_NAMESPACE_ERROR)
set(post_find_code
[=[
target_compile_definitions(CCCL::CCCL INTERFACE THRUST_DISABLE_ABI_NAMESPACE)
target_compile_definitions(CCCL::CCCL INTERFACE THRUST_IGNORE_ABI_NAMESPACE_ERROR)
]=])
include("${rapids-cmake-dir}/export/detail/post_find_package_code.cmake")
rapids_export_post_find_package_code(BUILD CCCL "${post_find_code}" EXPORT_SET
${_RAPIDS_BUILD_EXPORT_SET})
rapids_export_post_find_package_code(INSTALL CCCL "${post_find_code}" EXPORT_SET
${_RAPIDS_INSTALL_EXPORT_SET} CONDITION to_install)

# Propagate up variables that CPMFindPackage provides
set(CCCL_SOURCE_DIR "${CCCL_SOURCE_DIR}" PARENT_SCOPE)
set(CCCL_BINARY_DIR "${CCCL_BINARY_DIR}" PARENT_SCOPE)
Expand Down
Loading

0 comments on commit 40d1a96

Please sign in to comment.