[hipdnn] Add explicit cmake dependency on fmtlib#4889
Merged
SamuelReeder merged 2 commits intodevelopfrom Feb 26, 2026
Merged
Conversation
4c3a9a5 to
f0dccd5
Compare
The hipdnn backend uses fmtlib (via spdlog) but was missing an explicit cmake dependency and link for fmt::fmt. Add fmt to the hipdnn dependency system (hipdnn_add_dependency) so it can be found on the system or fetched via FetchContent if unavailable, and link fmt::fmt to hipdnn_backend_private. Co-Authored-By: Rob Suderman <rob.suderman@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f0dccd5 to
86b3baf
Compare
hipdnn_enable_spdlog() uses an include-only approach (no linking) to avoid inheriting spdlog compile options incompatible with clang++ on Windows. However, this also drops the transitive link to fmt::fmt that spdlog normally provides. When spdlog is built with SPDLOG_FMT_EXTERNAL and fmt is a compiled static library (not header-only), the missing link causes linker errors. Add an explicit target_link_libraries for fmt::fmt in the specific case where spdlog uses external compiled fmt. This does not affect the bundled-fmt or header-only-fmt paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (76.83%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #4889 +/- ##
===========================================
- Coverage 65.94% 65.94% -0.00%
===========================================
Files 1718 1718
Lines 267197 267197
Branches 37045 37045
===========================================
- Hits 176202 176201 -1
Misses 75442 75442
- Partials 15553 15554 +1
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
fmt::fmtin the backend when external fmt is used (not transitive through spdlog)Based on work in #4569 from @rsuderman.
Test plan
🤖 Generated with Claude Code