-
Notifications
You must be signed in to change notification settings - Fork 34
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
Simplify finding the hip package #66
Conversation
On Fedora, where hip is installed as an rpm, its cmake files can not be found and are reported as an error. CMake Error at cmake/dependencies.cmake:44 (find_package): No "FindHIP.cmake" found in CMAKE_MODULE_PATH. This change treats hip as a the normal package. Signed-off-by: Tom Rix <trix@redhat.com>
Thanks for this PR! Looks like a good idea; we'll take a look and run it through the tests. |
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.
In the currently released versions of HIP, hip-config.cmake only supports the AMD platform. You must use the FindHIP.cmake module when building for the NVIDIA platform. However, this proposed change still does the module-mode search first and hip-config.cmake should eventually support the NVIDIA platform. So, I think this is fine.
I'm hoping to move away from FindHIP.cmake entirely. We'll probably want to clean up this whole section of HIP-searching code in the near future. It's a bit overly-complicated at the moment.
I wouldn't worry about it. @trixirt and I can confirm this change is useful for Fedora and Debian, respectively. You can validate that it doesn't break the official ROCm builds, and that is probably sufficient. Our whole method of using FindHIP.cmake is kind of silly. We're using FindHIP.cmake from the HIP package, so you need to find HIP to use FindHIP.cmake. Writing a bunch of tests might help prevent a few bugs, but I think it would be cheaper in the long run to eliminate the complexity that causes these sorts of bugs. |
This commit is also useful to Gentoo. By the cmake documentation,
HIP uses cmake to build. It should not have shipped a FindHIP.cmake (a cmake MODULE).
For nVidia targets HIP is a wrapper around CUDA, it should hide the implementation detail of itself to hipFFT.
|
Loosen the versioned dependence on dev-util/hip. Reference: ROCm/hipFFT#66 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Hi @heroxbd,
Just FYI, the folks that work on libraries like hipFFT are users of HIP, much like you. They work for AMD, but not on HIP itself. While they certainly can relay concerns to the HIP team, it's usually better for affected users to file issues directly on the repo for the component that the problem originates from. It helps prevent duplicate reports, it's less work for the library teams, and it helps keep you in the loop on any updates. |
Thanks @cgmb! Sure, we are sorting out the patches carried by Gentoo |
Thank you for doing that. I know it's a fair bit of effort to upstream things, but it is very much appreciated. |
hipFFT is not updated in 5.7.1, and we need to manually backport it. Reference: ROCm/hipFFT#66 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
According to the cmake documentation, do not write find modules for packages that themselves build with CMake. Instead provide a CMake package configuration file with the package itself. FindHIP is needed by HIP over CUDA, not what Gentoo is aiming for. Reference: ROCm/hipFFT#66 Reference: https://cmake.org/cmake/help/latest/command/find_package.html Bug: ROCm/hipamd#39 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
On Fedora, where hip is installed as an rpm, its cmake files can not be found and are reported as an error.
CMake Error at cmake/dependencies.cmake:44 (find_package):
No "FindHIP.cmake" found in CMAKE_MODULE_PATH.
This change treats hip as a the normal package.