[Openmp-commits] [PATCH] D98806: [OpenMP] Implement GOMP task reductions
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Mar 17 12:44:54 PDT 2021
jlpeyton created this revision.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar, hbae, Nawrin.
jlpeyton added a project: OpenMP.
Herald added subscribers: jfb, guansong, yaxunl.
jlpeyton requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Implement the GOMP functions to support task reductions in taskgroup, parallel, loop, and taskloop constructs. The unused `mem` argument to many of the work-sharing constructs has to do with the implementation of the scan() directive & inscan() modifier. If mem is set, each function will call `KMP_FATAL()` and tell the user scan/inscan is unsupported. The GOMP reduction implementation is kept separate from our implementation because of how GOMP presents reduction data and computes the reductions.
GOMP expects the privatized copies to be present even after a `#pragma omp parallel reduction(task:...)` region has ended so the data is stored inside GOMP's `uintptr_t*` array structure. This style is tightly coupled with GCC compiler codegen. There isn't any init(), combiner(), fini() functions in GOMP's codegen either so the two implementations are too disparate to attempt wrapping GOMP's methods around our own.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98806
Files:
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_ftn_os.h
openmp/runtime/src/kmp_gsupport.cpp
openmp/runtime/src/kmp_tasking.cpp
openmp/runtime/test/tasking/omp_task_red_taskloop.c
openmp/runtime/test/tasking/task_reduction1.c
openmp/runtime/test/tasking/task_reduction2.c
openmp/runtime/test/tasking/task_reduction3.c
openmp/runtime/test/tasking/task_reduction4.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98806.331346.patch
Type: text/x-patch
Size: 29933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210317/de2bd4be/attachment-0001.bin>
More information about the Openmp-commits
mailing list