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 fmt (to 11.0.2) and spdlog (to 1.14.1). #16806

Open
wants to merge 11 commits into
base: branch-24.10
Choose a base branch
from

Conversation

jameslamb
Copy link
Member

@jameslamb jameslamb commented Sep 16, 2024

Description

Replaces #15603

Contributes to:

Now that most of conda-forge has been updated to fmt >=11.0.1,<12 and spdlog>=1.14.1,<1.15 (rapidsai/build-planning#56 (comment)), we're attempting to upgrade RAPIDS to similar versions of those libraries.

This improves the likelihood that RAPIDS will be installable alongside newer versions of its
dependencies and complementary packages on conda-forge.

Notes for Reviewers

This PR is testing changes made in rapidsai/rapids-cmake#689.
It shouldn't be merged until those rapids-cmake changes are merged and any testing-specific details have been removed.

@jameslamb jameslamb added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Sep 16, 2024
@github-actions github-actions bot added the CMake CMake build issue label Sep 16, 2024
rapids_export_find_package_root(
BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports
)
endif()
Copy link
Member Author

Choose a reason for hiding this comment

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

Context for this change: rapidsai/rapids-cmake#387 (comment)

@@ -16,21 +16,8 @@
function(find_and_configure_spdlog)

include(${rapids-cmake-dir}/cpm/spdlog.cmake)
rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO" INSTALL_EXPORT_SET cudf-exports)
rapids_export_package(BUILD spdlog cudf-exports)
rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO")
Copy link
Member Author

Choose a reason for hiding this comment

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

I've paired removing the spdlog export here with adding this over in cpp/CMakeLists.txt:

target_linked_libraries(cudf PRIVATE spdlog::spdlog_header_only)

Without that, the pip devcontainer build here fails like this while building the pylibcudf wheel:

CMake Error at /home/coder/.local/share/venvs/rapids/lib/python3.10/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
    By not providing "Findspdlog.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "spdlog", but
    CMake did not find one.
    
    Could not find a package configuration file provided by "spdlog" with any
    of the following names:
    
        spdlogConfig.cmake
        spdlog-config.cmake
    
    Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set
    "spdlog_DIR" to a directory containing one of the above files.  If "spdlog"
    provides a separate development package or SDK, be sure it has been
    installed.

I think because in devcontainers, libcudf.so is built outside of wheel builds, which means that this condition is hit:

if(cudf_FOUND)
return()
endif()

And then later code that makes spdlog available isn't run.

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems plausible to me but I'd like a confirmation from a CMake expert. @vyasr or @KyleFromNVIDIA?

@jameslamb jameslamb added the 5 - DO NOT MERGE Hold off on merging; see PR for details label Sep 19, 2024
@jameslamb jameslamb changed the title WIP: [DO NOT MERGE] Update fmt (to 11.0.2) and spdlog (to 1.14.1). Update fmt (to 11.0.2) and spdlog (to 1.14.1). Sep 19, 2024
@jameslamb jameslamb marked this pull request as ready for review September 19, 2024 16:52
@jameslamb jameslamb requested review from a team as code owners September 19, 2024 16:52
@jameslamb jameslamb requested review from raydouglass and bdice and removed request for raydouglass September 19, 2024 16:52
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Looks good to me, but maybe a second eye on the CMake changes would be helpful to confirm that we're going the right way.

@@ -16,21 +16,8 @@
function(find_and_configure_spdlog)

include(${rapids-cmake-dir}/cpm/spdlog.cmake)
rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO" INSTALL_EXPORT_SET cudf-exports)
rapids_export_package(BUILD spdlog cudf-exports)
rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO")
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems plausible to me but I'd like a confirmation from a CMake expert. @vyasr or @KyleFromNVIDIA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - DO NOT MERGE Hold off on merging; see PR for details CMake CMake build issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants