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

{tools}[GCCcore/11.2.0] HIP v4.5.0 #14339

Merged
merged 7 commits into from
Dec 12, 2021

Conversation

nordmoen
Copy link
Contributor

(created using eb --new-pr)

@nordmoen
Copy link
Contributor Author

I have tested this with #14327 and this is able to compile and run several examples from the HIP repository

@nordmoen
Copy link
Contributor Author

So a bit of a challenge with this build. To get clang to correctly link with HIP I had to export ROCM_PATH=$EBROOTHIP. This enables hipcc to properly function and is then able to compile HIP sources for AMD GPUs. However, one thing that I did not notice right away is that this same export makes clang unable to pick up it's own device lib.

In other words, if one just loads the Clang-AOMP module and tries to compile an OpenMP offloading code that works. Loading HIP is then able to build HIP GPU codes, but now OpenMP offloading will not work. It works for HIP since hipcc sets up the path to device lib manually.

This has effects on downstream packages. I wanted the ROCm package to be the one to depend on when you need ROCm, but when trying to build hipSYCL this problem (the path exporting) ended up making it impossible to build.

@SebastianAchilles SebastianAchilles added this to the 4.x milestone Nov 17, 2021
@nordmoen
Copy link
Contributor Author

So a bit of a challenge with this build. To get clang to correctly link with HIP I had to export ROCM_PATH=$EBROOTHIP. This enables hipcc to properly function and is then able to compile HIP sources for AMD GPUs. However, one thing that I did not notice right away is that this same export makes clang unable to pick up it's own device lib.

In other words, if one just loads the Clang-AOMP module and tries to compile an OpenMP offloading code that works. Loading HIP is then able to build HIP GPU codes, but now OpenMP offloading will not work. It works for HIP since hipcc sets up the path to device lib manually.

This has effects on downstream packages. I wanted the ROCm package to be the one to depend on when you need ROCm, but when trying to build hipSYCL this problem (the path exporting) ended up making it impossible to build.

Managed to solve this by exporting HIP_DEVICE_LIB_PATH in Clang-AOMP since that is what Clang is using. With that export loading this module or the full ROCm module works without issue. I also managed to solve the problem for the hipSYCL downstream package (which was a bit unrelated).

@boegel boegel modified the milestones: 4.x, 4.5.1 Dec 8, 2021
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nordmoen Required patch file is missing in the PR?

Jørgen Nordmoen and others added 2 commits December 9, 2021 07:17
@nordmoen
Copy link
Contributor Author

nordmoen commented Dec 9, 2021

@nordmoen Required patch file is missing in the PR?

Must have spaced out on that, added now, in addition to your suggestion about sources.

@easybuilders easybuilders deleted a comment from boegelbot Dec 9, 2021
@boegel
Copy link
Member

boegel commented Dec 10, 2021

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
pg-lab02 - Linux centos linux 8.3.2011, x86_64, AMD EPYC 7542 32-Core Processor (zen2), Python 3.6.8
See https://gist.github.com/af93175791988d81f07e8bbdda626447 for a full test report.

@easybuilders easybuilders deleted a comment from boegelbot Dec 10, 2021
@easybuilders easybuilders deleted a comment from boegelbot Dec 10, 2021
@boegel
Copy link
Member

boegel commented Dec 12, 2021

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
pg-lab02 - Linux centos linux 8.3.2011, x86_64, AMD EPYC 7542 32-Core Processor (zen2), Python 3.6.8
See https://gist.github.com/d441cdd7ccf8f33aa60d383ef63c81ae for a full test report.

@boegel
Copy link
Member

boegel commented Dec 12, 2021

Going in, thanks @nordmoen!

@boegel boegel merged commit dad7265 into easybuilders:develop Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants