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

Different installation location - How to point "clang" to *.bc files? #114

Closed
justxi opened this issue Jun 21, 2020 · 3 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@justxi
Copy link

justxi commented Jun 21, 2020

Hi,

first, installing AOMP as user works and an OpenMP example works also.
I managed to install AOMP on Gentoo Linux.
So currently the bitcode files (*.bc) are in "/usr/lib64" and "/usr/lib64/libdevice" instead in "[path_to_AOMP]/lib" and "[path_to_AOMP]/lib/libdevice".

Clang(AOMP) does not find the bitcode files. If I copy the bitcode files to the directories used by the AOMP installation it works.
Of couse I could install the files accordingly.

But in https://github.com/ROCm-Developer-Tools/amd-llvm-project/blob/a71d014b68d3f029905fe50dd7ec5c5322c4f5dd/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp#L405 I think it should be possible to give another directory where Clang(AOMP) searches for bitcode files. But it does not work either.

So my question: Is it possible to give Clang(AOMP) a hint to the location of the bitcode files?

@gregrodgers
Copy link
Contributor

We need to document library search a little better. Try this

export HIP_DEVICE_LIB_PATH=/usr/lib64/libdevice:/usr/lib64

Let me know if that works.

@gregrodgers
Copy link
Contributor

Sorry, Ignore last comment. I need to fix the new AMDGPU OpenMP driver. Hopefully I can get this in AOMP11.6-2 . If I get this fix in the next release the above advice on setting HIP_DEVICE_LIB_PATH will work.

@gregrodgers gregrodgers added the question Further information is requested label Apr 20, 2021
@carlobertolli
Copy link
Contributor

Hi @justxi

The current strategy for aomp to find bc files is to invoke the compiler from the install folder. The driver will look for the bc files by using a path relative to the location of the clang binary. We are not planning on extending or changing this.

Adding environment variables to instruct the driver of the location of the files is possible, but undesirable in trunk: think about having a new set of env variables for each language and architecture match.

Let me know if you have more questions about this. Will close for now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants