Skip to content
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

/opt/rocm/lib/cmake/hip/FindHIP.cmake does not find HIP by default #3019

Closed
Snektron opened this issue Oct 19, 2022 · 3 comments
Closed

/opt/rocm/lib/cmake/hip/FindHIP.cmake does not find HIP by default #3019

Snektron opened this issue Oct 19, 2022 · 3 comments

Comments

@Snektron
Copy link

Snektron commented Oct 19, 2022

When no environment variables are set, FindHIP.cmake attempts to find the HIP root directory from its installed path:
https://github.com/ROCm-Developer-Tools/HIP/blob/24c0cb92b38688b4db8cf80198752f2e8e03e248/cmake/FindHIP.cmake#L51
https://github.com/ROCm-Developer-Tools/HIP/blob/24c0cb92b38688b4db8cf80198752f2e8e03e248/cmake/FindHIP.cmake#L58-L68

There are two paths where FindHIP.cmake is installed: /opt/rocm/lib/cmake/hip/FindHIP.cmake and /opt/rocm/hip/cmake/FindHIP.cmake. In the latter case, _IMPORT_PREFIX gets resolved to /opt/rocm/hip, which indeed contains bin/hipconfig. In the former case though, it gets resolved to /opt/rocm/lib/cmake, which does not, and so find_package(HIP) fails when using this config file.

This is a regression from ROCm 5.2, though I believe that the line in question was always wrong. It broke after this commit. It can be worked around by using the other module by setting -DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake.

@Madouura
Copy link

Likely related: ROCm/hipamd#55

@abhimeda
Copy link

abhimeda commented Feb 7, 2024

@Snektron Hi, were you able to resolve this issue on the latest HIP? If so can we close this ticket?

@Snektron
Copy link
Author

Snektron commented Feb 9, 2024

This particular part seems to be working now. There are still some issues remaining with an out-of-the-box experience, but that's a separate problem.

@Snektron Snektron closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants