[all-commits] [llvm/llvm-project] 445756: [OpenMP] Implement GOMP task reductions

Jonathan Peyton via All-commits all-commits at lists.llvm.org
Fri Apr 16 14:36:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4457565757ea91207b7e5f2ce7b7bf173bfd2c0c
      https://github.com/llvm/llvm-project/commit/4457565757ea91207b7e5f2ce7b7bf173bfd2c0c
  Author: Peyton, Jonathan L <jonathan.l.peyton at intel.com>
  Date:   2021-04-16 (Fri, 16 Apr 2021)

  Changed paths:
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_ftn_os.h
    M openmp/runtime/src/kmp_gsupport.cpp
    M openmp/runtime/src/kmp_tasking.cpp
    M openmp/runtime/test/tasking/omp_task_red_taskloop.c
    A openmp/runtime/test/tasking/task_reduction1.c
    A openmp/runtime/test/tasking/task_reduction2.c
    A openmp/runtime/test/tasking/task_reduction3.c
    A openmp/runtime/test/tasking/task_reduction4.c

  Log Message:
  -----------
  [OpenMP] Implement GOMP task reductions

Implement the remaining 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
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* data pseudo-structure.  This style is tightly
coupled with GCC compiler codegen.  There also isn't any init(),
combiner(), fini() functions in GOMP's codegen so the two
implementations were to disparate to try to wrap GOMP's around our own.

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




More information about the All-commits mailing list