[Openmp-commits] [openmp] d3abb04 - [OpenMP][libomptarget] Fix __tgt_rtl_run_target_team_region_async API with missing parameter

Carlo Bertolli via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 17 07:59:17 PST 2021


Author: Carlo Bertolli
Date: 2021-12-17T15:58:18Z
New Revision: d3abb04e148b6ac856b6e5a5c1b835f0507e2bb4

URL: https://github.com/llvm/llvm-project/commit/d3abb04e148b6ac856b6e5a5c1b835f0507e2bb4
DIFF: https://github.com/llvm/llvm-project/commit/d3abb04e148b6ac856b6e5a5c1b835f0507e2bb4.diff

LOG: [OpenMP][libomptarget] Fix __tgt_rtl_run_target_team_region_async API with missing parameter
I missed the async info parameter in the first version of this API.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D115887

Added: 
    

Modified: 
    openmp/libomptarget/plugins/amdgpu/src/rtl.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
index e5edae145f87f..a3d52706f13b2 100644
--- a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -2289,7 +2289,10 @@ int32_t __tgt_rtl_run_target_region(int32_t device_id, void *tgt_entry_ptr,
 int32_t __tgt_rtl_run_target_team_region_async(
     int32_t device_id, void *tgt_entry_ptr, void **tgt_args,
     ptr
diff _t *tgt_offsets, int32_t arg_num, int32_t num_teams,
-    int32_t thread_limit, uint64_t loop_tripcount) {
+    int32_t thread_limit, uint64_t loop_tripcount,
+    __tgt_async_info *AsyncInfo) {
+  assert(AsyncInfo && "AsyncInfo is nullptr");
+  initAsyncInfo(AsyncInfo);
 
   DeviceInfo.load_run_lock.lock_shared();
   int32_t res =
@@ -2305,16 +2308,13 @@ int32_t __tgt_rtl_run_target_region_async(int32_t device_id,
                                           ptr
diff _t *tgt_offsets,
                                           int32_t arg_num,
                                           __tgt_async_info *AsyncInfo) {
-  assert(AsyncInfo && "AsyncInfo is nullptr");
-  initAsyncInfo(AsyncInfo);
-
   // use one team and one thread
   // fix thread num
   int32_t team_num = 1;
   int32_t thread_limit = 0; // use default
-  return __tgt_rtl_run_target_team_region_async(device_id, tgt_entry_ptr,
-                                                tgt_args, tgt_offsets, arg_num,
-                                                team_num, thread_limit, 0);
+  return __tgt_rtl_run_target_team_region_async(
+      device_id, tgt_entry_ptr, tgt_args, tgt_offsets, arg_num, team_num,
+      thread_limit, 0, AsyncInfo);
 }
 
 int32_t __tgt_rtl_synchronize(int32_t device_id, __tgt_async_info *AsyncInfo) {


        


More information about the Openmp-commits mailing list