[Openmp-commits] [PATCH] D107121: [OpenMP] Fix performance regression reported in bug #51235

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 29 17:27:12 PDT 2021


tianshilei1992 created this revision.
tianshilei1992 added reviewers: AndreyChurbanov, jdoerfert, protze.joachim.
Herald added subscribers: guansong, yaxunl.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

This patch fixes the "performance regression" reported in https://bugs.llvm.org/show_bug.cgi?id=51235.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107121

Files:
  openmp/runtime/src/kmp_tasking.cpp


Index: openmp/runtime/src/kmp_tasking.cpp
===================================================================
--- openmp/runtime/src/kmp_tasking.cpp
+++ openmp/runtime/src/kmp_tasking.cpp
@@ -2785,7 +2785,8 @@
     victim_td->td.td_deque_head =
         (victim_td->td.td_deque_head + 1) & TASK_DEQUE_MASK(victim_td->td);
   } else {
-    if (!task_team->tt.tt_untied_task_encountered) {
+    if (!task_team->tt.tt_untied_task_encountered &&
+        !task_team->tt.tt_hidden_helper_task_encountered) {
       // The TSC does not allow to steal victim task
       __kmp_release_bootstrap_lock(&victim_td->td.td_deque_lock);
       KA_TRACE(10, ("__kmp_steal_task(exit #3): T#%d could not steal from "


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107121.362930.patch
Type: text/x-patch
Size: 701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210730/8e07b1f0/attachment.bin>


More information about the Openmp-commits mailing list