[Openmp-commits] [PATCH] D95294: [libomptarget][nvptx] Replace cuda atomic primitives with clang intrinsics
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jan 23 12:31:01 PST 2021
tianshilei1992 added inline comments.
================
Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu:142
DEVICE uint32_t __kmpc_atomic_add(uint32_t *Address, uint32_t Val) {
- return atomicAdd(Address, Val);
+ return __atomic_fetch_add(Address, Val, __ATOMIC_SEQ_CST);
}
----------------
what about using NVVM atomic intrinsics directly? We don't need the memory order then.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95294/new/
https://reviews.llvm.org/D95294
More information about the Openmp-commits
mailing list