[Openmp-commits] [PATCH] D95093: [libomptarget][devicertl] Drop templated atomic functions

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 21 19:30:54 PST 2021


tianshilei1992 accepted this revision.
tianshilei1992 added a comment.
This revision is now accepted and ready to land.

LGTM with some nits. We might want to rewrite these atomics with LLVM intrinsics.



================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip:134
 
 DEVICE int GetNumberOfBlocksInKernel() {
+  return get_grid_dim(__builtin_amdgcn_grid_size_x(),
----------------
This change seems unrelated.


================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip:140
 DEVICE int GetNumberOfThreadsInBlock() {
-  return get_workgroup_dim(__builtin_amdgcn_workgroup_id_x(), __builtin_amdgcn_grid_size_x(),
+  return get_workgroup_dim(__builtin_amdgcn_workgroup_id_x(),
+                           __builtin_amdgcn_grid_size_x(),
----------------
ditto


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95093



More information about the Openmp-commits mailing list