[all-commits] [llvm/llvm-project] a87db4: [mlir] Support partial folding of affine.min/max

ftynse via All-commits all-commits at lists.llvm.org
Thu May 7 03:30:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a87db48e6fdaf8ce9e7cc479945892b934dd9404
      https://github.com/llvm/llvm-project/commit/a87db48e6fdaf8ce9e7cc479945892b934dd9404
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    M mlir/lib/IR/AffineMap.cpp
    M mlir/test/Dialect/Linalg/tile.mlir
    M mlir/test/Dialect/Linalg/tile_conv.mlir
    M mlir/test/Dialect/Linalg/tile_conv_padding.mlir

  Log Message:
  -----------
  [mlir] Support partial folding of affine.min/max

Originally, these operations were folded only if all expressions in their
affine maps could be folded to a constant expression that can be then subject
to numeric min/max computation. This introduces a more advanced version that
partially folds the affine map by lifting individual constant expression in it
even if some of the expressions remain variable. The folding can update the
operation in place to use a simpler map. Note that this is not as powerful as
canonicalization, in particular this does not remove dimensions or symbols that
became useless. This allows for better composition of Linalg tiling and
promotion transformation, where the latter can handle some canonical forms of
affine.min that the folding can now produce.

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




More information about the All-commits mailing list