Repository navigation
[rpp] link half publicly - #13951
[rpp] link half publicly#13951
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
There was a problem hiding this comment.
🟢 Approval recommended
The public dependency and installed-package discovery are consistent, with no unresolved issues identified.
No open issues 🎉
What changed in this PR
Fixes RPP consumers’ missing half.hpp error by exposing HALF as a transitive dependency.
Changes:
- Links
HALF::halfpublicly while keeping OpenMP private. - Installs
FindHALF.cmakeand resolves HALF before loading exported targets.
| File | Description |
|---|---|
| projects/rpp/CMakeLists.txt | Exposes HALF publicly and installs its discovery module. |
| projects/rpp/cmake_modules/rpp-config.cmake.in | Adds the module search path and discovers HALF for consumers. |
Review effort: Balanced
There was a problem hiding this comment.
Installing FindHALF.cmake alongside RPP makes RPP responsible for finding half in every consumer's build and appends to their CMAKE_MODULE_PATH. This is beyond the scope of RPP's responsibilities, and will likely interfere with other libraries.
Could you describe the environment that ran into this problem? For same-prefix installs, half should already be on the same include path as the rpp install (typically ROCM_PATH/include), and half is a header-only library as far as I'm aware.
This issue was found on Spack where rpp and half are installed to different prefixes. |
@afzpatel Got it. In that case, the solution for this would have to pass the include path that contains HALF as a public dependency without installing Potentially something like this in # half is header-only with no CMake package; rppdefs.h includes it.
find_path(@PROJECT_NAME@_HALF_INCLUDE_DIR
NAMES half/half.hpp half.hpp
HINTS "${PACKAGE_PREFIX_DIR}/include" "$ENV{ROCM_PATH}/include")
mark_as_advanced(@PROJECT_NAME@_HALF_INCLUDE_DIR)
if(@PROJECT_NAME@_HALF_INCLUDE_DIR)
set_property(TARGET @PROJECT_NAME@::@PROJECT_NAME@ APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "${@PROJECT_NAME@_HALF_INCLUDE_DIR}")
endif()Optimally, the preferred solution would be to have a |
TheRock Submodule Bump ActivityNewest first
|
JIRA ID : ROCM-33202
Motivation
rppdefs.hincludeshalf.hpp, butHALF::halfis linked privately, so dependents cannot find the header:fatal error: 'half.hpp' file not found