[Openmp-commits] [PATCH] D95062: [libomptarget][devicertl][nfc] Simplify target_atomic abstraction

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 20 10:01:10 PST 2021


JonChesterfield created this revision.
JonChesterfield added reviewers: jdoerfert, tianshilei1992, grokos, ABataev.
Herald added subscribers: jfb, mgorny, jvesely.
JonChesterfield requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

[libomptarget][devicertl][nfc] Simplify target_atomic abstraction

Atomic functions were implemented as a shim around cuda's atomics, with
amdgcn implementing those symbols as a shim around gcc style intrinsics.

This patch folds target_atomic.h into target_impl.h and folds amdgcn.

Further work is likely to be useful here, either changing to openmp's atomic
interface or instantiating the templates on the few used types in order to
move them into a cuda/c++ implementation file. This change is mostly to
group the remaining uses of the cuda api under nvptx' target_impl abstraction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95062

Files:
  openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
  openmp/libomptarget/deviceRTLs/amdgcn/src/hip_atomics.h
  openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
  openmp/libomptarget/deviceRTLs/common/omptargeti.h
  openmp/libomptarget/deviceRTLs/common/src/libcall.cu
  openmp/libomptarget/deviceRTLs/common/src/loop.cu
  openmp/libomptarget/deviceRTLs/common/src/reduction.cu
  openmp/libomptarget/deviceRTLs/common/state-queuei.h
  openmp/libomptarget/deviceRTLs/common/target_atomic.h
  openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
  openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95062.317917.patch
Type: text/x-patch
Size: 9291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210120/c12caa7c/attachment-0001.bin>


More information about the Openmp-commits mailing list