[Openmp-commits] [PATCH] D103464: [OpenMP] Use new task type/flag for taskwait depend events

Hansang Bae via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 2 08:16:59 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7ba4e96ede0f: [OpenMP] Use new task type/flag for taskwait depend events. (authored by hbae).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103464

Files:
  openmp/runtime/src/kmp_taskdeps.cpp
  openmp/runtime/test/ompt/callback.h
  openmp/runtime/test/ompt/tasks/task_if0-depend.c


Index: openmp/runtime/test/ompt/tasks/task_if0-depend.c
===================================================================
--- openmp/runtime/test/ompt/tasks/task_if0-depend.c
+++ openmp/runtime/test/ompt/tasks/task_if0-depend.c
@@ -63,8 +63,8 @@
 // CHECK-SAME: parent_task_frame.reenter={{0x[0-f]+}},
 // CHECK-SAME: new_task_id=[[SECOND_TASK:[0-f]+]],
 // CHECK-SAME: codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]{{[0-f][0-f]}},
-// CHECK-SAME: task_type=ompt_task_explicit|ompt_task_undeferred|
-// CHECK-SAME: ompt_task_mergeable=1207959556, has_dependences=yes
+// CHECK-SAME: task_type=ompt_task_taskwait|ompt_task_undeferred|
+// CHECK-SAME: ompt_task_mergeable=1207959568, has_dependences=yes
 
 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_dependences:
 // CHECK-SAME: task_id=[[SECOND_TASK]], deps=[([[ADDRX]],
Index: openmp/runtime/test/ompt/callback.h
===================================================================
--- openmp/runtime/test/ompt/callback.h
+++ openmp/runtime/test/ompt/callback.h
@@ -34,7 +34,8 @@
     "ompt_task_detach", // 4
     "ompt_task_early_fulfill", // 5
     "ompt_task_late_fulfill", // 6
-    "ompt_task_switch" // 7
+    "ompt_task_switch", // 7
+    "ompt_taskwait_complete" // 8
 };
 static const char* ompt_cancel_flag_t_values[] = {
   "ompt_cancel_parallel",
@@ -67,6 +68,8 @@
     progress += sprintf(progress, "ompt_task_explicit");
   if (type & ompt_task_target)
     progress += sprintf(progress, "ompt_task_target");
+  if (type & ompt_task_taskwait)
+    progress += sprintf(progress, "ompt_task_taskwait");
   if (type & ompt_task_undeferred)
     progress += sprintf(progress, "|ompt_task_undeferred");
   if (type & ompt_task_untied)
@@ -1015,7 +1018,8 @@
          (second_task_data ? second_task_data->value : -1),
          ompt_task_status_t_values[prior_task_status], prior_task_status);
   if (prior_task_status == ompt_task_complete ||
-      prior_task_status == ompt_task_late_fulfill) {
+      prior_task_status == ompt_task_late_fulfill ||
+      prior_task_status == ompt_taskwait_complete) {
     printf("%" PRIu64 ":" _TOOL_PREFIX " ompt_event_task_end: task_id=%" PRIu64
            "\n", ompt_get_thread_data()->value, first_task_data->value);
   }
Index: openmp/runtime/src/kmp_taskdeps.cpp
===================================================================
--- openmp/runtime/src/kmp_taskdeps.cpp
+++ openmp/runtime/src/kmp_taskdeps.cpp
@@ -647,11 +647,7 @@
                                 ompt_data_t *taskwait_task_data) {
   if (ompt_enabled.ompt_callback_task_schedule) {
     ompt_callbacks.ompt_callback(ompt_callback_task_schedule)(
-        &(current_task->ompt_task_info.task_data), ompt_task_switch,
-        taskwait_task_data);
-    ompt_callbacks.ompt_callback(ompt_callback_task_schedule)(
-        taskwait_task_data, ompt_task_complete,
-        &(current_task->ompt_task_info.task_data));
+        taskwait_task_data, ompt_taskwait_complete, NULL);
   }
   current_task->ompt_task_info.frame.enter_frame.ptr = NULL;
   *taskwait_task_data = ompt_data_none;
@@ -700,7 +696,7 @@
       ompt_callbacks.ompt_callback(ompt_callback_task_create)(
           &(current_task->ompt_task_info.task_data),
           &(current_task->ompt_task_info.frame), taskwait_task_data,
-          ompt_task_explicit | ompt_task_undeferred | ompt_task_mergeable, 1,
+          ompt_task_taskwait | ompt_task_undeferred | ompt_task_mergeable, 1,
           OMPT_LOAD_OR_GET_RETURN_ADDRESS(gtid));
     }
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103464.349278.patch
Type: text/x-patch
Size: 3475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210602/ad32ea2f/attachment.bin>


More information about the Openmp-commits mailing list