[Openmp-commits] [PATCH] D112156: [OpenMP] Ensure broken assumptions print once, not thousands of times.
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Oct 21 00:57:26 PDT 2021
JonChesterfield added inline comments.
================
Comment at: openmp/libomptarget/DeviceRTL/include/Utils.h:80
+/// guarded such that release mode execution will not be impacted.
+template <auto ID> struct SingletonFlag {
+
----------------
Are we c++17 in the deviceRTL? Can presumably be whatever clang trunk has implemented
================
Comment at: openmp/libomptarget/DeviceRTL/include/Utils.h:99
+ }
+};
+
----------------
Or we could use zero for the initial value and write 1 into it. Seq_cst seems unnecessary - acq_rel? Global ordering on GPUs is expensive and not obviously required here, don't care which thread wins the race to print a debug message
================
Comment at: openmp/libomptarget/DeviceRTL/src/Synchronization.cpp:263
+uint32_t atomic::exchange(uint32_t *Addr, uint32_t V, int Ordering) {
+ return impl::atomicExchange(Addr, V, Ordering);
+}
----------------
Normally takes two orderings
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112156/new/
https://reviews.llvm.org/D112156
More information about the Openmp-commits
mailing list