[Openmp-commits] [PATCH] D80942: [openmp] Fixed nonmonotonic schedule implementation.

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 1 11:53:00 PDT 2020


AndreyChurbanov created this revision.
AndreyChurbanov added reviewers: hbae, tlwilmar.
AndreyChurbanov added a project: OpenMP.
Herald added subscribers: openmp-commits, sstefan1, jfb, guansong, yaxunl.
Herald added a reviewer: jdoerfert.

Threads may work on different loops concurrently, thus iterations stealing algorithm should check that thief and victim work on the same loop.
The changes are:

- th_steal_lock moved from thread-private to thread-loop-private buffer;
- fixed dispatch_init to check possibly corrected in dispatch_init_algorithm schedule;
- fixed stealing process and stealing finalization to work with thread-loop-private buffers of the same index, instead of th_dispatch_pr_current which might point to different loops in different threads.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80942

Files:
  openmp/runtime/src/kmp.h
  openmp/runtime/src/kmp_dispatch.cpp
  openmp/runtime/src/kmp_dispatch.h
  openmp/runtime/test/worksharing/for/omp_nonmonotonic_nowait.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80942.267677.patch
Type: text/x-patch
Size: 11849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200601/151621b6/attachment.bin>


More information about the Openmp-commits mailing list