-
Notifications
You must be signed in to change notification settings - Fork 74
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
Check for HIP versions in min/max range #2196
Conversation
cmake/alpakaCommon.cmake
Outdated
message(STATUS "Could not find HIP v${_alpaka_HIP_MAX_VER}. Now searching for HIP v${_alpaka_HIP_MIN_VER}") | ||
find_package(hip "${_alpaka_HIP_MIN_VER}") | ||
endif() | ||
find_package(hip "${_alpaka_HIP_MIN_VER}...<${_alpaka_HIP_MAX_VER}") |
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.
Nice, this feature has been available since CMake 3.19 and we forgot about it after we required a newer version of CMake.
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.
<
should be removed else the max version will be excluded. see https://cmake.org/cmake/help/latest/command/find_package.htm
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 could verify it with ROCm 5.5 and ROCm 5.7 on our dev system.
Co-authored-by: Simeon Ehrig <[email protected]>
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 checked it again locally. For unknown reason the warning with HIP 5.5 and different CMake versions appears only on my dev system. The CI is fine and does not trow a warning. Also the documentation says, that the upper version should be included. Therefor I will merge it :-)
With the current logic, cmake checks first for HIP 5.5, then for 5.0:
I think the behaviour should give an inclusive range but I don't immediately have a way to test this (only having a somewhat broken HIP 5.1 installation).