[Openmp-commits] [PATCH] D107008: [OpenMP] Clean up for hidden helper task
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 29 11:53:27 PDT 2021
protze.joachim added inline comments.
================
Comment at: openmp/runtime/src/kmp_taskdeps.h:148-151
+ kmp_int32 encountering_gtid =
+ next_taskdata->td_alloc_thread->th.th_info.ds.ds_gtid;
+ kmp_int32 encountering_tid = __kmp_tid_from_gtid(encountering_gtid);
+ __kmpc_give_task(successor->dn.task, encountering_tid);
----------------
This shouldn't be the encountering tid, but any random number in [0,teamsize).
The value is used as an index to the array of threads for the team to which the task binds.
================
Comment at: openmp/runtime/src/kmp_tasking.cpp:3931
// but we cannot use __kmp_get_random here
kmp_int32 start_k = start;
kmp_int32 pass = 1;
----------------
Either add an assertion (start<nthreads) or limit the value to nthreads
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107008/new/
https://reviews.llvm.org/D107008
More information about the Openmp-commits
mailing list