[all-commits] [llvm/llvm-project] 2a876a: [mlir] Create a generic reduction detection utility

Diego Caballero via All-commits all-commits at lists.llvm.org
Fri Sep 24 13:50:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a876a711dc7c644936017daf20e78f48bfd2270
      https://github.com/llvm/llvm-project/commit/2a876a711dc7c644936017daf20e78f48bfd2270
  Author: Diego Caballero <diegocaballero at google.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt
    M mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    M mlir/lib/IR/Diagnostics.cpp
    A mlir/test/Analysis/test-match-reduction.mlir
    M mlir/test/lib/Analysis/CMakeLists.txt
    A mlir/test/lib/Analysis/TestMatchReduction.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir] Create a generic reduction detection utility

This patch introduces a generic reduction detection utility that works
across different dialecs. It is mostly a generalization of the reduction
detection algorithm in Affine. The reduction detection logic in Affine,
Linalg and SCFToOpenMP have been replaced with this new generic utility.

The utility takes some basic components of the potential reduction and
returns: 1) the reduced value, and 2) a list with the combiner operations.
The logic to match reductions involving multiple combiner operations disabled
until we can properly test it.

Reviewed By: ftynse, bondhugula, nicolasvasilache, pifon2a

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




More information about the All-commits mailing list