Apply hip workaround for raja-framework#32469
Conversation
trws
commented
Sep 1, 2022
- add workaround for broken behavior in HIP
- propagate openmp requirement and workaround to camp
Hip has a longstanding cmake issue where they calculate include paths incorrectly, this works around it for raja and adds an explicit rocprim dependency.
|
Nice, thanks @trws! |
|
@davidbeckingsale, I remember fixing this |
| depends_on("[email protected]:0.2.3", when="@0.14.0") | ||
| depends_on("[email protected]", when="@0.10.0:0.13.0") | ||
| depends_on("[email protected]:", when="@2022.03.0:") | ||
| depends_on("camp+openmp", when="+openmp") |
There was a problem hiding this comment.
@trws - Umpire needs this line too, I think that will fix the problem.
There was a problem hiding this comment.
Sadly, that did not take care of it. I think we may need to get the updates in a release to get past this. =/
There was a problem hiding this comment.
:( - will constraining the camp version help?
There was a problem hiding this comment.
I can try it, I'll add the new version bump I put up for camp and see if it's enough, or if we need to bump the others.
There was a problem hiding this comment.
It looks like that might actually do it, I bumped camp to 2022.03.2 on the theory we might have to bump the other two to bump camp (the submodule is still wrong) but bumping it in spack seems to make gitlab happy: https://gitlab.spack.io/spack/spack/-/pipelines/164770
…and develop raja and umpire
|
Ok, this is actually passing now. Want to go forward with this and see if it gets us over the hump @davidbeckingsale? |
Yup that sounds good to me, thanks @trws ! |
* add workaround for broken behavior in HIP Hip has a longstanding cmake issue where they calculate include paths incorrectly, this works around it for raja and adds an explicit rocprim dependency. * propagate openmp requirement and workaround to camp * refactor and include umpire * propagate openmp option to camp in umpire and use main camp for main and develop raja and umpire * bump camp to new patch release
|
I have been working with this change in camp and it has broken the existing functioning ROCm installs that I have been working on. This ends up appending the string literal to the 2 errors found in build log:
>> 5 CMake Error at login2-cray-sles15-zen3-clang@@14.0.0.cmake:42:
6 Parse error. Expected a command name, got unquoted argument with text
7 "-DHIP_CLANG_INCLUDE_PATH=/opt/rocm-5.2.0/llvm/lib/clang/14.0.0/include".
8
9
>> 10 CMake Error: Error processing file: /gpfs/alpine/proj-shared/csc359/spack-install/build-stage/rcruther/spack-stage-raja-0.1
4.0-srsbc2bzv4ps3pbdja32wv3cfklbv4ug/spack-src/login2-cray-sles15-zen3-clang@@14.0.0.cmake
11 -- Configuring incomplete, errors occurred!I am determining a workaround, but it took me quite a while to figure out what I had broken when I updated the spack ref we are using... |
| options.append( | ||
| "-DHIP_CLANG_INCLUDE_PATH=" | ||
| + glob.glob("{}/lib/clang/*/include".format(spec["llvm-amdgpu"].prefix))[0] | ||
| ) |
There was a problem hiding this comment.
I think this needs to be changed slightly to resolve my issue:
path = glob.glob("{}/lib/clang/*/include".format(spec["llvm-amdgpu"].prefix))[0]
options.append(cmake_cache_path("HIP_CLANG_INCLUDE_PATH", "{0}".format(path))There was a problem hiding this comment.
I have verified that with a camp already built, this patch fixes my problem. I will probably make a PR to add this change, but want to make sure I'm not breaking things elsewhere/in camp
There was a problem hiding this comment.
It's being caused by the fact that we have both CmakePackage and CachedCmakePackage for some reason. There is a fix in the umpire package in #32504.
There was a problem hiding this comment.
I see. Can/Will that fix also be applied to RAJA?
There was a problem hiding this comment.
I see there is a RAJA PR linked to this as well, so I assume so. Thanks for the help!