[Openmp-commits] [PATCH] D154172: [OpenMP] Added memory scope to atomic::inc API and used the device scope in reduction.
Dhruva Chakrabarti via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jun 29 17:43:01 PDT 2023
dhruvachak created this revision.
Herald added subscribers: sunshaoce, guansong, tpr, yaxunl.
Herald added a project: All.
dhruvachak requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, jplehr, sstefan1.
Herald added a project: OpenMP.
With https://reviews.llvm.org/D137524, memory scope and ordering
attributes are being used to generate the required instructions for
atomic inc/dec on AMDGPU. This patch adds the memory scope attribute to
the atomic::inc API and uses the device scope in reduction. Without
the device scope in atomic_inc, the default system scope leads to
unnecessary L2 write-backs/invalidates.
Additionally, for AMDGPU, the fence immediately before the atomic_inc in
the reduction code is no more necessary and has been removed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D154172
Files:
openmp/libomptarget/DeviceRTL/include/Synchronization.h
openmp/libomptarget/DeviceRTL/src/Reduction.cpp
openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154172.536070.patch
Type: text/x-patch
Size: 7075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230630/c598533c/attachment.bin>
More information about the Openmp-commits
mailing list