Repository navigation
fix(rocr): Export NUMA dependency regardless of BUILD_SHARED_LIBS - #9716
Merged
Merged
Conversation
andmar-amd
requested review from
cfreeamd,
dayatsin-amd and
kentrussell
as code owners
August 5, 2026 15:18
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes hsakmt’s CMake package export so downstream find_package(hsakmt) works when libnuma was discovered as an imported target (e.g., numa::numa). It ensures the generated hsakmt-config.cmake proactively finds NUMA when needed, independent of BUILD_SHARED_LIBS.
Changes:
- Add conditional
find_dependency(NUMA)tohsakmt-config.cmake.in, with aPATHShint for ROCm’s bundledlibnumalocation. - Remove the
BUILD_SHARED_LIBScoupling by computing a dedicatedHSAKMT_FIND_NUMA_DEPENDENCYconfigure-time flag based on whether NUMA was found as a target.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| projects/rocr-runtime/libhsakmt/hsakmt-config.cmake.in | Adds conditional NUMA dependency discovery prior to loading exported hsakmt targets. |
| projects/rocr-runtime/libhsakmt/CMakeLists.txt | Introduces HSAKMT_FIND_NUMA_DEPENDENCY and enables it when NUMA is represented by imported targets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1 task
andmar-amd
force-pushed
the
users/andmar-amd/hsakmt-numa-dependency-fix
branch
2 times, most recently
from
August 5, 2026 18:51
0bec152 to
c9d702e
Compare
shwetagkhatri
self-requested a review
August 5, 2026 21:43
shwetagkhatri
approved these changes
Aug 5, 2026
shwetagkhatri
left a comment
Contributor
There was a problem hiding this comment.
I dont see any issues with this patch. LGTM.
dayatsin-amd
approved these changes
Aug 6, 2026
When NUMA is found as an imported target (e.g., numa::numa), hsakmt's
exported targets reference it. The generated hsakmt-config.cmake must
call find_dependency(NUMA) to make that target available to consumers,
otherwise find_package(hsakmt) fails with:
The link interface of target 'hsakmt::hsakmt' contains:
numa::numa
but the target was not found.
Previously, HSAKMT_FIND_NUMA_DEPENDENCY was only set ON when
BUILD_SHARED_LIBS=ON. In standalone builds where BUILD_SHARED_LIBS
may not be set, this caused the installed hsakmt-config.cmake to
omit find_dependency(NUMA), breaking downstream consumers.
This fix removes the BUILD_SHARED_LIBS condition, ensuring the NUMA
dependency is always exported when NUMA was found as a target,
regardless of build configuration.
Also adds the find_dependency(NUMA) call to hsakmt-config.cmake.in
with PATHS hint for bundled libnuma location.
Related to PR #9480 which fixed kfdtest's NUMA CONFIG mode handling.
JIRA ID: ROCM-28573
andmar-amd
force-pushed
the
users/andmar-amd/hsakmt-numa-dependency-fix
branch
from
August 6, 2026 21:21
c9d702e to
e7e0ea8
Compare
2 tasks done
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.
When NUMA is found as an imported target (e.g., numa::numa), hsakmt's exported targets reference it. The generated hsakmt-config.cmake must call find_dependency(NUMA) to make that target available to consumers, otherwise find_package(hsakmt) fails with:
The link interface of target 'hsakmt::hsakmt' contains:
numa::numa
but the target was not found.
Previously, HSAKMT_FIND_NUMA_DEPENDENCY was only set ON when BUILD_SHARED_LIBS=ON. In standalone builds where BUILD_SHARED_LIBS may not be set, this caused the installed hsakmt-config.cmake to omit find_dependency(NUMA), breaking downstream consumers.
This fix removes the BUILD_SHARED_LIBS condition, ensuring the NUMA dependency is always exported when NUMA was found as a target, regardless of build configuration.
Also adds the find_dependency(NUMA) call to hsakmt-config.cmake.in with PATHS hint for bundled libnuma location.
Related to PR #9480 which fixed kfdtest's NUMA CONFIG mode handling.
JIRA ID: ROCM-28573
Motivation
See PR #8221 and PR #9480
Technical Details
Issue Tracking
Test Plan
Test Result
Submission Checklist