Use HIP as language in CMake#3646
Conversation
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
|
Can one of the admins verify this patch? |
|
@ye-luo I'm getting the following warnings when building and suspect it's related to |
|
Is this OK on spock? |
|
@quantumsteve could you paste your cmake line here? I mean on a regular workstation not spock. I got a strange error no idea where |
|
@ye-luo I had some trouble getting the spacing right between arguments in |
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
|
Last commit fixes that issue on Nitrogen. @prckent I haven't tried building on spock. Using the same cmake configuration as GitHub Actions: |
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
|
I'm getting some linking errors This is on my desktop machine with the aomp 14.0 compiler and rocm 4.5.0. I did compile the aomp offload version successfully a few weeks ago. |
| endif() | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") | ||
| if(ENABLE_ROCM) |
There was a problem hiding this comment.
@markdewing Does adding another variable to this check fix the linking error your experiencing?
There was a problem hiding this comment.
I had offload enabled. If I disable that, then it works.
|
Nevermind ... I was confused about what this support was for. It's not for the offload version. |
|
Had no luck with gcc it tries to link programs with clang instead of gcc. which is expected host code. |
This test comment seems to suggest that the link language for mixed targets should always be HIP 😕 |
|
HIP is only part of the program. Having HIP compiler (and its flags) to take over linking is just so wrong. |
HIP, CXX, and CUDA have values of 90, 30, and 15. |
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
|
Unfortunately, I found the current ROCm 4.5 release is bad in many ways for adopting HIP as a language. I have to park this PR for the moment. ROCm/ROCm#1259 (comment) |
|
@ye-luo Thank you for reviewing this. I'll move onto other issues while we wait for a more usable ROCm release. |
|
temporarily close or mark this [WIP] it's clutter up the PR list. |
151536b to
ef7b5ad
Compare
|
Test this please |
|
Test this please |
885eaac to
560d34b
Compare
|
Test this please |
|
@quantumsteve @markdewing I think it is good now. We can use HIP as a cmake language. Since I did many changes. I should not approval my own changes. So please do another round of review. |
|
@prckent please review the documentation update. crusher recipe has been updated to use rocm 5.3.0 |
8cdfad5 to
34ad46e
Compare
LGTM, though GitHub won't let me approve a PR I'm the original author of. |
|
Confirmed good with rocm 5.4.0 as well. |
|
Test this please |
Please review the developer documentation
on the wiki of this project that contains help and requirements.
Proposed changes
Describe what this PR changes and why. If it closes an issue, link to it here
with a supported keyword.
Fixes #3581
What type(s) of changes does this code introduce?
Delete the items that do not apply
Does this introduce a breaking change?
What systems has this change been tested on?
Checklist
Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.