[all-commits] [llvm/llvm-project] 2b0c85: [mlir][Linalg] Add pass to remove unit-extent dims...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Thu May 28 11:07:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b0c8546ac9fb47e1bf9c5e54f1450420eadeab7
      https://github.com/llvm/llvm-project/commit/2b0c8546ac9fb47e1bf9c5e54f1450420eadeab7
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2020-05-28 (Thu, 28 May 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Passes.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    A mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
    A mlir/test/Dialect/Linalg/fold-unit-trip-loops.mlir

  Log Message:
  -----------
  [mlir][Linalg] Add pass to remove unit-extent dims from tensor
operands of Generic ops.

Unit-extent dimensions are typically used for achieving broadcasting
behavior. The pattern added (along with canonicalization patterns
added previously) removes the use of unit-extent dimensions, and
instead uses a more canonical representation of the computation.  This
new pattern is not added as a canonicalization for now since it
entails adding additional reshape operations. A pass is added to
exercise these patterns, along with an API entry to populate a
patterns list with these patterns.

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




More information about the All-commits mailing list