[all-commits] [llvm/llvm-project] fbc1dc: [libomptarget][devicertl][nfc] Simplify target_ato...

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Wed Jan 20 11:55:46 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fbc1dcb946553a3dc923a63288d9275eea86f918
      https://github.com/llvm/llvm-project/commit/fbc1dcb946553a3dc923a63288d9275eea86f918
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

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

  Log Message:
  -----------
  [libomptarget][devicertl][nfc] Simplify target_atomic abstraction

[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.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95062




More information about the All-commits mailing list