[all-commits] [llvm/llvm-project] c282d5: [mlir] add support for reductions in OpenMP WsLoopOp

ftynse via All-commits all-commits at lists.llvm.org
Fri Jul 9 08:54:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c282d55a38577e076b48cd7a8113e5eb0a2039cd
      https://github.com/llvm/llvm-project/commit/c282d55a38577e076b48cd7a8113e5eb0a2039cd
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-07-09 (Fri, 09 Jul 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/OpenMP/CMakeLists.txt
    M mlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/Dialect/OpenMP/CMakeLists.txt
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir
    M mlir/test/Dialect/OpenMP/invalid.mlir
    M mlir/test/Dialect/OpenMP/ops.mlir
    M mlir/test/Target/LLVMIR/openmp-llvm.mlir

  Log Message:
  -----------
  [mlir] add support for reductions in OpenMP WsLoopOp

Use a modeling similar to SCF ParallelOp to support arbitrary parallel
reductions. The two main differences are: (1) reductions are named and declared
beforehand similarly to functions using a special op that provides the neutral
element, the reduction code and optionally the atomic reduction code; (2)
reductions go through memory instead because this is closer to the OpenMP
semantics.

See https://llvm.discourse.group/t/rfc-openmp-reduction-support/3367.

Reviewed By: kiranchandramohan

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




More information about the All-commits mailing list