Skip to content

Commit 9f5d6ea

Browse files
committed
[OpenMP] Fix performance regression reported in bug llvm#51235
This patch fixes the "performance regression" reported in https://bugs.llvm.org/show_bug.cgi?id=51235. In fact it has nothing to do with performance. The root cause is, the stolen task is not allowed to execute by another thread because by default it is tied task. Since hidden helper task will always be executed by hidden helper threads, it should be untied. Reviewed By: protze.joachim Differential Revision: https://reviews.llvm.org/D107121
1 parent 0a6aad5 commit 9f5d6ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openmp/runtime/src/kmp_tasking.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,6 +1444,7 @@ kmp_task_t *__kmpc_omp_target_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
14441444
if (__kmp_enable_hidden_helper) {
14451445
auto &input_flags = reinterpret_cast<kmp_tasking_flags_t &>(flags);
14461446
input_flags.hidden_helper = TRUE;
1447+
input_flags.tiedness = TASK_UNTIED;
14471448
}
14481449

14491450
return __kmpc_omp_task_alloc(loc_ref, gtid, flags, sizeof_kmp_task_t,

0 commit comments

Comments
 (0)