[Openmp-commits] [PATCH] D58409: [OpenMP][libomptarget] New reduction scheme for team reductions

Gheorghe-Teodor Bercea via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Feb 19 14:56:12 PST 2019


gtbercea created this revision.
gtbercea added reviewers: ABataev, caomhin.
Herald added subscribers: openmp-commits, jdoerfert, jfb, guansong.
Herald added a project: OpenMP.
gtbercea edited the summary of this revision.

This patch adds a more sophisticated team reduction scheme to the OpenMP libomptarget-nvptx runtime.

The scheme uses a fixed size global memory buffer whose length can be adjusted via compiler flag:

  -fopenmp-cuda-teams-reduction-recs-num=1024

The global buffer is a structure of arrays (with default size of 1024 each and controlled by the above flag), one array for each reduction variable.

Values in the buffer are processed by the last team to finish executing the body of the target region.

In addition to adding support for the new flag, the compiler also emits special functions used for the reduction of the intermediate reduction values. These changes will be added in a separate compiler patch following this one.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D58409

Files:
  libomptarget/deviceRTLs/nvptx/src/interface.h
  libomptarget/deviceRTLs/nvptx/src/reduction.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58409.187447.patch
Type: text/x-patch
Size: 6603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190219/9605c193/attachment-0001.bin>


More information about the Openmp-commits mailing list