CMake: HIP Modernizing & RDC#2031
Conversation
|
This is what happens when one perl's around on CLI arguments in the compiler world. Update: Ohhh
Update: Fortran builds with |
2459c44 to
f8b50af
Compare
|
Either we drop (for now) HIP + Fortran support in CMake, work-around the flaky |
|
As for as I know, only Castro requires rdc, but it does not use cmake or amrex as a library. So maybe we can wait. |
aea51f3 to
08f1771
Compare
e5ec258 to
2b35103
Compare
007945c to
84a1fd9
Compare
9a2697e to
d315a34
Compare
Add `-fgpu-rdc` flags to HIP. Relocatable-device-code (RDC) flags are needed for `extern` device variable support (for codes that use global variables on device).
|
Hi @jmsexton03 @mwm126 et al., in this PR, I am modernizing the ROCm support so that we can also build with the AMD Until ROCm 4.4 is shipped, there are a few limitations with respect to Fortran, which I think you both do not use. I documented them in the docs, but the TL;DR is:
This PR adds support for the 2nd option, since this is also the preferred way to use ROCm with CMake: In ROCm 4.4, the issue with Fortran will be solved as well (ROCm/hip#2280) and then the 2nd option should be generally preferred for all builds. I added a CI entry for both the legacy wrapper and the direct usage of |
2b29b6c to
55e3077
Compare
|
Hi @jmsexton03 @mwm126, are you ok if we merge this? :) |
Summary
Add
-fgpu-rdcflags to HIP if requested viaAMReX_GPU_RDC.Modernize HIP logic with recommended targets that avoid the flaky
hipcccompiler scripts: https://rocmdocs.amd.com/en/latest/Installation_Guide/Using-CMake-with-AMD-ROCm.html#using-hip-in-cmakeAdd support for AMDs
clang++/clangcompiler for HIP instead of using the legacyhipccperl wrapper as C++ compiler.This also increases support towards Cray compiler wrappers, which also refer to
clang++/clangunderneath (Spock/OLCF).Close #1688
Additional background
Relocatable-device-code (RDC) flags are needed for
externdevice variable support (for codes that use global variables on device). Also needed when linking with Ascent.Follow-up to #2029
With HIP GPU RDC, static libs emitting & linking does get more fancy:
ROCm/rccl#260
Tests
hipcc) w/ MPI:Checklist
The proposed changes: