[Openmp-commits] [PATCH] D105308: [OpenMP] Fix a few issues with hidden helper task

Hansang Bae via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 1 13:18:27 PDT 2021


hbae added inline comments.


================
Comment at: openmp/runtime/src/kmp_runtime.cpp:6190
 
 void __kmp_internal_end_library(int gtid_req) {
   /* if we have already cleaned up, don't try again, it wouldn't be pretty */
----------------
tianshilei1992 wrote:
> Just out of curiosity, why the deinitz in `__kmp_internal_end_thread` is not enough?
When the runtime shutdown is processed by `__kmp_internal_end_library` setting `__kmp_global.g.g_done`, `__kmp_internal_end_thread` does not have a chance to finalize hidden helper.


================
Comment at: openmp/runtime/src/kmp_tasking.cpp:439
 
+  auto hidden_helper = taskdata->td_flags.hidden_helper;
+
----------------
tianshilei1992 wrote:
> Why this needs to be done in lock? After the task is created, we never change this flag, don't we?
Observed some weird situations that the flag value changes after releasing the lock whereas there is nothing wrong in the lock implementation and the lock variable passed to it. Also verified that the flag is correct before invoking the actual task function. I don't have an exact root cause of the problem, so this seems to be the best we can do now. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105308



More information about the Openmp-commits mailing list