[Openmp-commits] [PATCH] D73076: [libomptarget] Implement hip atomic functions in terms of intrinsics

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 21 14:41:51 PST 2020


jdoerfert added a comment.

Is is necessary, or useful, to have 3 different kinds of intrinsics here? We have `__atomic_fetch_max` and `__atomic_max_fetch` in clang, unsure if they could replace the OpenCL intrinsic. Similarly, there is `__atomic_compare_exchange` and `__atomic_exchange`. I would also be fine with only __amdgcn intrinsics or only __opencl ones but I am a little worried about mixing these 3 kinds.



================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt:73
 
+set(llvm_sources
+  ${CMAKE_CURRENT_SOURCE_DIR}/src/atomic_inc.ll)
----------------
Add a TODO here and in the ll file to state this is a *temporary workaround*. Also state the proper solution please.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73076/new/

https://reviews.llvm.org/D73076





More information about the Openmp-commits mailing list