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

Force downloading spdlog by default to avoid using system packages and fmt linkage #1740

Draft
wants to merge 9 commits into
base: branch-25.02
Choose a base branch
from
Draft
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
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ set(RMM_LOGGING_LEVEL
CACHE STRING "Choose the logging level.")
set_property(CACHE RMM_LOGGING_LEVEL PROPERTY STRINGS "TRACE" "DEBUG" "INFO" "WARN" "ERROR"
"CRITICAL" "OFF")
option(RMM_HIDE_ALL_SPDLOG_SYMBOLS "Ensure all spdlog symbols are hidden" ON)

message(VERBOSE "RMM: Build with NVTX support: ${RMM_NVTX}")
# Set logging level. Must go before including gtests and benchmarks. Set the possible values of
Expand All @@ -74,8 +75,13 @@ rapids_find_package(
rapids_cpm_init()

include(${rapids-cmake-dir}/cpm/rapids_logger.cmake)
rapids_cpm_rapids_logger()
rapids_make_logger(rmm EXPORT_SET rmm-exports)
set(RAPIDS_LOGGER_HIDE_ALL_SPDLOG_SYMBOLS ${RMM_HIDE_ALL_SPDLOG_SYMBOLS})
set(_hide_all_symbols_flag)
if(RMM_HIDE_ALL_SPDLOG_SYMBOLS)
set(_hide_all_symbols_flag HIDE_ALL_SPDLOG_SYMBOLS)
endif()
rapids_cpm_rapids_logger(BUILD_EXPORT_SET rmm-exports INSTALL_EXPORT_SET rmm-exports)
rapids_make_logger(rmm EXPORT_SET rmm-exports ${_hide_all_symbols_flag})

include(cmake/thirdparty/get_cccl.cmake)
include(cmake/thirdparty/get_nvtx.cmake)
Expand Down
33 changes: 0 additions & 33 deletions cmake/thirdparty/get_spdlog.cmake

This file was deleted.

1 change: 0 additions & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ dependencies:
- cxx-compiler
- cython>=3.0.0
- doxygen=1.9.1
- fmt>=11.0.2,<12
- gcc_linux-64=11.*
- gcovr>=5.0
- graphviz
Expand Down
1 change: 0 additions & 1 deletion conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ dependencies:
- cxx-compiler
- cython>=3.0.0
- doxygen=1.9.1
- fmt>=11.0.2,<12
- gcc_linux-64=11.*
- gcovr>=5.0
- graphviz
Expand Down
6 changes: 0 additions & 6 deletions conda/recipes/librmm/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ cuda11_compiler:
cmake_version:
- ">=3.26.4,!=3.30.0"

fmt_version:
- ">=11.0.2,<12"

spdlog_version:
- ">=1.14.1,<1.15"

c_stdlib:
- sysroot
c_stdlib_version:
Expand Down
11 changes: 1 addition & 10 deletions conda/recipes/librmm/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
# Copyright (c) 2018-2025, NVIDIA CORPORATION.

{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %}
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %}
Expand Down Expand Up @@ -26,13 +26,6 @@ requirements:
- {{ stdlib("c") }}
host:
- cuda-version ={{ cuda_version }}
# We need fmt here for now because the conda spdlog package is hard-coded
# to use fmt as a compiled library, not header-only, so we must ensure that
# the library is present for now so that if a downstream library tries to
# build against rmm and some other package in its build environment uses
# fmt (or spdlog) that the default rmm build is consistent with such
# environments.
- fmt {{ fmt_version }}

build:
script_env:
Expand Down Expand Up @@ -77,8 +70,6 @@ outputs:
{% if cuda_major == "11" %}
- cudatoolkit
{% endif %}
# See comment about fmt in the build section above.
- fmt {{ fmt_version }}
test:
commands:
- test -d "${PREFIX}/include/rmm"
Expand Down
1 change: 0 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ dependencies:
packages:
- c-compiler
- cxx-compiler
- fmt>=11.0.2,<12
specific:
- output_types: conda
matrices:
Expand Down
4 changes: 3 additions & 1 deletion rapids_config.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
# Copyright (c) 2018-2025, 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 @@ -25,6 +25,8 @@ else()
"Could not determine RAPIDS version. Contents of VERSION file:\n${_rapids_version_formatted}")
endif()

set(rapids-cmake-repo "vyasr/rapids-cmake")
set(rapids-cmake-branch "feat/force_spdlog_clone")
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS-${RAPIDS_VERSION_MAJOR_MINOR}.cmake")
file(
DOWNLOAD
Expand Down
8 changes: 1 addition & 7 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
# Copyright (c) 2018-2025, 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 Down Expand Up @@ -134,8 +134,6 @@ endfunction()
add_library(rmm_test_logger OBJECT)
target_link_libraries(rmm_test_logger PRIVATE rmm_logger_impl)

include(../cmake/thirdparty/get_spdlog.cmake)

# test sources

# device mr_ref tests
Expand Down Expand Up @@ -168,8 +166,6 @@ ConfigureTest(STATISTICS_TEST mr/device/statistics_mr_tests.cpp)

# tracking adaptor tests
ConfigureTest(TRACKING_TEST mr/device/tracking_mr_tests.cpp)
target_link_libraries(TRACKING_TEST PRIVATE spdlog::spdlog_header_only)
target_link_libraries(TRACKING_PTDS_TEST PRIVATE spdlog::spdlog_header_only)

# out-of-memory callback adaptor tests
ConfigureTest(FAILURE_CALLBACK_TEST mr/device/failure_callback_mr_tests.cpp)
Expand Down Expand Up @@ -206,8 +202,6 @@ ConfigureTest(PREFETCH_TEST prefetch_tests.cpp)

# logger tests
ConfigureTest(LOGGER_TEST logger_tests.cpp)
target_link_libraries(LOGGER_TEST PRIVATE spdlog::spdlog_header_only)
target_link_libraries(LOGGER_PTDS_TEST PRIVATE spdlog::spdlog_header_only)

# arena MR tests
ConfigureTest(ARENA_MR_TEST mr/device/arena_mr_tests.cpp GPUS 1 PERCENT 100)
Expand Down
Loading