Skip to content
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
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-129_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies:
- libcufile-dev
- libcurand-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvcomp-dev==5.2.0.10
- libnvcomp-dev==5.3.0.16
- libnvjitlink-dev
- librapidsmpf==26.8.*,>=0.0.0a0
- librdkafka<2.15.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies:
- libcufile-dev
- libcurand-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvcomp-dev==5.2.0.10
- libnvcomp-dev==5.3.0.16
- libnvjitlink-dev
- librapidsmpf==26.8.*,>=0.0.0a0
- librdkafka<2.15.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-133_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies:
- libcufile-dev
- libcurand-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvcomp-dev==5.2.0.10
- libnvcomp-dev==5.3.0.16
- libnvjitlink-dev
- librapidsmpf==26.8.*,>=0.0.0a0
- librdkafka<2.15.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-133_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies:
- libcufile-dev
- libcurand-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvcomp-dev==5.2.0.10
- libnvcomp-dev==5.3.0.16
- libnvjitlink-dev
- librapidsmpf==26.8.*,>=0.0.0a0
- librdkafka<2.15.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/libcudf/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ flatbuffers_version:
- "=24.3.25"

nvcomp_version:
- "=5.2.0.10"
- "=5.3.0.16"

zlib_version:
- ">=1.2.13"
56 changes: 35 additions & 21 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1244,21 +1244,6 @@ target_compile_definitions(cudf PRIVATE $<$<BOOL:${CUDF_KVIKIO_REMOTE_IO}>:CUDF_
# https://github.com/NVIDIA/cccl/pull/2844
target_compile_definitions(cudf PRIVATE THRUST_FORCE_32_BIT_OFFSET_TYPE=1 CCCL_AVOID_SORT_UNROLL=1)

# Specify the target module library dependencies
target_link_libraries(
cudf
PUBLIC CCCL::CCCL $<BUILD_LOCAL_INTERFACE:BS::thread_pool>
PRIVATE $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>
$<BUILD_LOCAL_INTERFACE:cuco::cuco>
ZLIB::ZLIB
${CUDF_nvcomp_TARGET}
kvikio::kvikio
${CUDF_nanoarrow_TARGET}
zstd
$<BUILD_LOCAL_INTERFACE:xxhash>
rtcx::rtcx
)

# When rmm is a static library being absorbed via whole-archive, strip nvtx3 from its public
# interface. We bundle nvtx3 headers directly into cudf's install tree, so consumers get them from
# cudf's include path without needing the nvtx3 target or find_dependency(nvtx3).
Expand All @@ -1280,7 +1265,10 @@ endif()
# dependencies and export set metadata into cudf's interface.
set(_absorbed_deps rmm rapids_logger)
foreach(_dep IN LISTS _absorbed_deps)
set(_dep_link "${_dep}::${_dep}")
if(NOT TARGET "${_dep}::${_dep}")
continue()
endif()
get_target_property(_dep_link "${_dep}::${_dep}" NAME)
get_target_property(_target_type ${_dep_link} TYPE)
if(NOT BUILD_SHARED_LIBS OR NOT _target_type STREQUAL "STATIC_LIBRARY")
# If not building a shared library, or the dependency is not a static library, link normally.
Expand All @@ -1307,11 +1295,14 @@ foreach(_dep IN LISTS _absorbed_deps)
target_include_directories(cudf PUBLIC ${_dep_includes})
endif()

# Wrap with WHOLE_ARCHIVE + BUILD_INTERFACE so the static lib is absorbed into libcudf.so and
# hidden from the installed interface.
target_link_libraries(
cudf PRIVATE "$<BUILD_INTERFACE:$<LINK_LIBRARY:WHOLE_ARCHIVE,${_dep_link}>>"
)
# nvcomp_static already whole-archives rmm and rapids_logger.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nvcomp_static already whole-archives rmm and rapids_logger

There is no promise that nvcomp is going to whole archive the same version of rmm that cudf has built against. We need to whole archive rmm even when nvcomp_static is being used

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was changed in 5a80603. Prior to that, CI failed in the linters job: https://github.com/rapidsai/cudf/actions/runs/30135081055/job/89617508579

Errors look like:

/opt/conda/envs/clang_tidy/bin/x86_64-conda-linux-gnu-ld: _deps/rapids_logger-build/librapids_logger.a(logger.cpp.o): in function `rapids_logger::detail::default_flush()':
logger.cpp:(.text._ZN13rapids_logger6detail13default_flushEv+0x0): multiple definition of `rapids_logger::detail::default_flush()'; _deps/nvcomp_proprietary_binary-src/lib/libnvcomp_static.a(logger.cpp.o):logger.cpp:(.text+0x0): first defined here
/opt/conda/envs/clang_tidy/bin/x86_64-conda-linux-gnu-ld: _deps/rapids_logger-build/librapids_logger.a(logger.cpp.o): in function `rapids_logger::sink::sink(std::unique_ptr<rapids_logger::detail::sink_impl, std::default_delete<rapids_logger::detail::sink_impl> >)':
logger.cpp:(.text._ZN13rapids_logger4sinkC2ESt10unique_ptrINS_6detail9sink_implESt14default_deleteIS3_EE+0x0): multiple definition of `rapids_logger::sink::sink(std::unique_ptr<rapids_logger::detail::sink_impl, std::default_delete<rapids_logger::detail::sink_impl> >)'; _deps/nvcomp_proprietary_binary-src/lib/libnvcomp_static.a(logger.cpp.o):logger.cpp:(.text+0x2e0): first defined here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah you have to disable or ignore those linter checks. We know we have duplicate symbols in our archives since rapids-logger is being embedded into nvcomp. We don't have a way to avoid that currently and are relying on the fact that rapids-logger is ABI stable.

if(NOT CUDF_nvcomp_TARGET STREQUAL "nvcomp::nvcomp_static")
# Wrap with WHOLE_ARCHIVE + BUILD_INTERFACE so the static lib is absorbed into libcudf.so and
# hidden from the installed interface.
target_link_libraries(
cudf PRIVATE "$<BUILD_INTERFACE:$<LINK_LIBRARY:WHOLE_ARCHIVE,${_dep_link}>>"
)
endif()

# Merge the absorbed library's export set metadata into cudf-exports so the installed config has
# find_dependency() calls for all transitive deps (e.g. nvtx3, CUDAToolkit from rmm).
Expand Down Expand Up @@ -1341,6 +1332,29 @@ foreach(_dep IN LISTS _absorbed_deps)
endforeach()
endforeach()

# Specify the target module library dependencies We do this after all the WHOLE_ARCHIVES to protect
# against any of these libraries ever adding a rapids_logger / rmm hidden dependency
target_link_libraries(
cudf
PUBLIC CCCL::CCCL $<BUILD_LOCAL_INTERFACE:BS::thread_pool>
PRIVATE $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp> $<BUILD_LOCAL_INTERFACE:cuco::cuco> ZLIB::ZLIB
kvikio::kvikio ${CUDF_nanoarrow_TARGET} zstd $<BUILD_LOCAL_INTERFACE:xxhash> rtcx::rtcx
)

if(TARGET spdlog::spdlog)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why was spdlog different compared to rmm and rapids-logger?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

f404547 was needed because of this issue where fmt was being exported as a dependency. This made the cuDF CMake tests fail: https://github.com/rapidsai/cudf/actions/runs/30124560885/job/89585363258#step:13:1511

 -- Found cudf: /__w/cudf/cudf/cpp/build/cmake-tests/cudf_export_consumer/cudf-build/cudf-config.cmake (found version "26.08.0")
CMake Error at CMakeLists.txt:16 (message):
  cudf::cudf INTERFACE_LINK_LIBRARIES exposes private dependency fmt:::
  CCCL::CCCL;dl;CUDA::cudart_static;Threads::Threads;fmt::fmt-header-only;CCCL::CCCL


-- Configuring incomplete, errors occurred!
ninja: build stopped: subcommand failed.

I don't know if this is the right fix, or if the test itself is flawed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay that makes sense, rapids-logger and rmm are part of the public API and have to be exported

get_target_property(_spdlog_link spdlog::spdlog NAME)
get_target_property(_spdlog_type ${_spdlog_link} TYPE)
if(BUILD_SHARED_LIBS AND _spdlog_type STREQUAL "STATIC_LIBRARY")
target_link_libraries(
cudf PRIVATE "$<BUILD_INTERFACE:$<LINK_LIBRARY:WHOLE_ARCHIVE,${_spdlog_link}>>"
)
else()
target_link_libraries(cudf PRIVATE ${_spdlog_link})
endif()
endif()

target_link_libraries(cudf PRIVATE ${CUDF_nvcomp_TARGET})

# Add Conda library, and include paths if specified
if(TARGET conda_env)
target_link_libraries(cudf PRIVATE conda_env)
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmake/thirdparty/get_nvcomp.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# =============================================================================
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on
# =============================================================================
Expand Down Expand Up @@ -127,7 +127,7 @@ function(find_and_configure_nvcomp)
endif()
endfunction()

set(_nvcomp_args VERSION 5.2.0.10)
set(_nvcomp_args VERSION 5.3.0.16)
if(CUDF_BUILD_STATIC_DEPS STREQUAL "FORCE")
list(APPEND _nvcomp_args DOWNLOAD_ONLY)
endif()
Expand Down
8 changes: 4 additions & 4 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ dependencies:
- output_types: conda
packages:
# Align nvcomp version with rapids-cmake
- libnvcomp-dev==5.2.0.10
- libnvcomp-dev==5.3.0.16
specific:
- output_types: [requirements, pyproject]
matrices:
Expand All @@ -671,14 +671,14 @@ dependencies:
- matrix:
cuda: "12.*"
packages:
- nvidia-libnvcomp-cu12==5.2.0.13
- nvidia-libnvcomp-cu12==5.3.0.16
- matrix:
cuda: "13.*"
packages:
- nvidia-libnvcomp-cu13==5.2.0.13
- nvidia-libnvcomp-cu13==5.3.0.16
- matrix:
packages:
- nvidia-libnvcomp==5.2.0.13
- nvidia-libnvcomp==5.3.0.16
rapids_build_skbuild:
common:
- output_types: [conda, requirements, pyproject]
Expand Down
4 changes: 2 additions & 2 deletions python/libcudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
dependencies = [
"libkvikio==26.8.*,>=0.0.0a0",
"librmm==26.8.*,>=0.0.0a0",
"nvidia-libnvcomp==5.2.0.13",
"nvidia-libnvcomp==5.3.0.16",
"nvidia-nvjitlink>=13.3,<14",
"rapids-logger==0.2.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
Expand Down Expand Up @@ -73,7 +73,7 @@ requires = [
"libkvikio==26.8.*,>=0.0.0a0",
"librmm==26.8.*,>=0.0.0a0",
"ninja",
"nvidia-libnvcomp==5.2.0.13",
"nvidia-libnvcomp==5.3.0.16",
"nvidia-nvjitlink>=13.3,<14",
"rapids-logger==0.2.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
Loading