[Openmp-commits] [openmp] 262289c - [OpenMP] mark target task untied

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Sat Aug 7 09:31:24 PDT 2021


Author: Ye Luo
Date: 2021-08-07T12:31:20-04:00
New Revision: 262289c1037745bf3dfe45941d9002ff80b77db8

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

LOG: [OpenMP] mark target task untied

OpenMP specification Tasking Terminology
target task :A mergeable and untied task that ...

Reviewed By: tianshilei1992

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

Added: 
    

Modified: 
    openmp/runtime/src/kmp_tasking.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp
index f8cb56e53a59b..b3b6f3fe81c71 100644
--- a/openmp/runtime/src/kmp_tasking.cpp
+++ b/openmp/runtime/src/kmp_tasking.cpp
@@ -1434,11 +1434,12 @@ kmp_task_t *__kmpc_omp_target_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
                                          size_t sizeof_shareds,
                                          kmp_routine_entry_t task_entry,
                                          kmp_int64 device_id) {
-  if (__kmp_enable_hidden_helper) {
-    auto &input_flags = reinterpret_cast<kmp_tasking_flags_t &>(flags);
+  auto &input_flags = reinterpret_cast<kmp_tasking_flags_t &>(flags);
+  // target task is untied defined in the specification
+  input_flags.tiedness = TASK_UNTIED;
+
+  if (__kmp_enable_hidden_helper)
     input_flags.hidden_helper = TRUE;
-    input_flags.tiedness = TASK_UNTIED;
-  }
 
   return __kmpc_omp_task_alloc(loc_ref, gtid, flags, sizeof_kmp_task_t,
                                sizeof_shareds, task_entry);


        


More information about the Openmp-commits mailing list