Skip to content

Turn on RDC support for HIP#2029

Merged
WeiqunZhang merged 1 commit intoAMReX-Codes:developmentfrom
WeiqunZhang:hip_rdc
May 18, 2021
Merged

Turn on RDC support for HIP#2029
WeiqunZhang merged 1 commit intoAMReX-Codes:developmentfrom
WeiqunZhang:hip_rdc

Conversation

@WeiqunZhang
Copy link
Copy Markdown
Member

This will allow extern device variables.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • are described in the proposed changes to the AMReX documentation, if appropriate

This will allow `extern` device variables.
@WeiqunZhang WeiqunZhang requested review from atmyers and kngott May 17, 2021 23:58
@WeiqunZhang WeiqunZhang merged commit 9cf1ca5 into AMReX-Codes:development May 18, 2021
@WeiqunZhang WeiqunZhang deleted the hip_rdc branch May 18, 2021 00:46
@ax3l ax3l mentioned this pull request May 18, 2021
12 tasks
WeiqunZhang pushed a commit that referenced this pull request Jul 1, 2021
## Summary

Add `-fgpu-rdc` flags to HIP if requested via `AMReX_GPU_RDC`.

Modernize HIP logic with recommended targets that avoid the flaky `hipcc` compiler scripts: https://rocmdocs.amd.com/en/latest/Installation_Guide/Using-CMake-with-AMD-ROCm.html#using-hip-in-cmake
Add support for AMDs `clang++`/`clang` compiler for HIP instead of using the legacy `hipcc` perl wrapper as C++ compiler.
This also increases support towards Cray compiler wrappers, which also refer to `clang++`/`clang` underneath (Spock/OLCF).

Close #1688

## Additional background

Relocatable-device-code (RDC) flags are needed for `extern` device 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants