-
Notifications
You must be signed in to change notification settings - Fork 923
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1a3e4b7
Update fmt (to 11.0.2) and spdlog (to 1.14.1).
jameslamb 6bc98d2
use RMM CI artifacts
jameslamb d3b87bc
Merge branch 'branch-24.10' into fmt-and-spdlog
jameslamb c9980ab
test if spdlog export is still needed
jameslamb b294193
Merge branch 'branch-24.10' into fmt-and-spdlog
jameslamb 13fd917
move rapids-cmake overrides [skip ci]
jameslamb 3a3e24a
stop exporting spdlog
jameslamb 8d1bac6
test some builds in CI
jameslamb 2235405
workflow branch
jameslamb b5ab6e5
merge branch-24.10, only run builds
jameslamb 0a71521
comment out static-configure
jameslamb a1fce83
run all CI
jameslamb f962642
Merge branch 'branch-24.10' into fmt-and-spdlog
jameslamb 9ba1063
cmakelint
jameslamb 058b0d3
export spdlog and mark it as an INTERFACE dependency of cudf::cudf
jameslamb b9cdb5d
Merge branch 'branch-24.10' of github.com:rapidsai/cudf into fmt-and-…
jameslamb ab6d345
make spdlog::spdlog_header_only a PUBLIC dependency of cudf::cudf
jameslamb 9568b98
Merge branch 'branch-24.10' into fmt-and-spdlog
jameslamb 630ce51
remove testing-only changes [skip ci]
jameslamb c9a3395
Merge branch 'branch-24.10' of github.com:rapidsai/cudf into fmt-and-…
jameslamb 1da86f7
remove testing-only changes [skip ci]
jameslamb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# ============================================================================= | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
# Copyright (c) 2023-2024, 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 | ||
|
@@ -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") | ||
|
||
if(spdlog_ADDED) | ||
rapids_export( | ||
BUILD spdlog | ||
EXPORT_SET spdlog | ||
GLOBAL_TARGETS spdlog spdlog_header_only | ||
NAMESPACE spdlog:: | ||
) | ||
include("${rapids-cmake-dir}/export/find_package_root.cmake") | ||
rapids_export_find_package_root( | ||
BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports | ||
) | ||
endif() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Context for this change: rapidsai/rapids-cmake#387 (comment) |
||
endfunction() | ||
|
||
find_and_configure_spdlog() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 incpp/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:I think because in devcontainers,
libcudf.so
is built outside of wheel builds, which means that this condition is hit:cudf/python/libcudf/CMakeLists.txt
Lines 29 to 31 in a0c6fc8
And then later code that makes
spdlog
available isn't run.There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If libcudf is only using spdlog privately, and its public headers don't depend on spdlog, then I think this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I'd thought it was only using it privately, but now that I search around again I'm really not sure.
This makes me think
libcudf
's logger is considered part of its public API:cudf/cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md
Lines 1084 to 1087 in 2676924
Here's the one non-test header directly
#include
-ingspdlog
:cudf/cpp/include/cudf/utilities/logger.hpp
Line 21 in 2676924
And there I can see that
cudf::logger
is aspdlog::logger
.cudf/cpp/include/cudf/utilities/logger.hpp
Line 46 in 2676924
So maybe it does need to be exported? But if so then I don't understand how the
pylibcudf
andcudf
builds and tests could be succeeding with it marked private like this.One other helpful piece of context that might help explain why this is even coming up now... we were previously patching
spdlog
inrapids-cmake
, which took it down the "always download with CPM and patch" code paths there. Now that we're not patching, differentrapids-cmake
codepaths are being followed. Something related to exporting must be different between those cases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're using the header-only version of spdlog, if the downstream targets already have include directories that contain spdlog, they don't need to link against the spdlog target to get those headers. So perhaps it is currently just working by accident.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok yeah the pip devcontainers job (where I'd originally observed the issue at the top of this thread) is passing with these changes: https://github.com/rapidsai/cudf/actions/runs/10962944541/job/30443351446?pr=16806
I feel much better about this state,
INTERFACE
seems right to me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that sounds right to me. Apologies for not catching this earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't see this earlier. Yes, the spdlog logger is currently part of the public API for cudf via the logger. That is why we also wound up with symbol issues around spdlog before we went through and hid all the necessary symbols.
The current code looks close, but I don't think
INTERFACE
is right. It should be aPUBLIC
dependency because it is required both by consumers of libcudf (because of the spdlog bits in the logger's public interface) and by libcudf internals (to compiled logger.cpp). I suspect that right nowINTERFACE
is working because we transitively inherit the spdlogINTERFACE
include from rmm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, ok that makes sense! Let me test switching it to
PUBLIC
, shouldn't take too long.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok yeah I tested that in devcontainers and it worked great (yes really that fast... yay
sccache
).And looks like it's working here in CI too: https://github.com/rapidsai/cudf/actions/runs/10963768468/job/30445951463?pr=16806