aboutsummaryrefslogtreecommitdiff
path: root/openmp/runtime/src/kmp_barrier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp_barrier.cpp')
-rw-r--r--openmp/runtime/src/kmp_barrier.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp
index 88a5cbb..4d7989d 100644
--- a/openmp/runtime/src/kmp_barrier.cpp
+++ b/openmp/runtime/src/kmp_barrier.cpp
@@ -1853,6 +1853,14 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split,
}
#endif
+#if ENABLE_LIBOMPTARGET
+ // Give an opportunity to the offload runtime to make progress and create
+ // proxy tasks if necessary
+ if (UNLIKELY(kmp_target_sync_cb != NULL))
+ (*kmp_target_sync_cb)(
+ NULL, gtid, KMP_TASKDATA_TO_TASK(this_thr->th.th_current_task), NULL);
+#endif
+
if (!team->t.t_serialized) {
#if USE_ITT_BUILD
// This value will be used in itt notify events below.