[all-commits] [llvm/llvm-project] f4eb68: [mlir][Linalg] Drop unit-trip loops of reductions ...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Thu Apr 8 22:32:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f4eb681dc37ae84e08579bf96cd2a6f58c44f260
      https://github.com/llvm/llvm-project/commit/f4eb681dc37ae84e08579bf96cd2a6f58c44f260
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2021-04-08 (Thu, 08 Apr 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Passes.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
    M mlir/test/Dialect/Linalg/canonicalize.mlir
    M mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
    M mlir/test/Dialect/Linalg/reshape_fusion.mlir

  Log Message:
  -----------
  [mlir][Linalg] Drop unit-trip loops of reductions only if other reduction loops exists.

Recent change enable dropping unit-trip loops of "reduction" iterator
type as well. This is fine as long as there is one other "reduction"
iterator in the operation. Without this the initialized value (value
of `out`) is not read which leads to a correctness issue.

Also fix a bug in the `fill` -> `tensor_reshape` folding. The `out`
operand of the `fill` needs to be reshaped to get the `out` operand of
the generated `fill` operation.

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




More information about the All-commits mailing list