[all-commits] [llvm/llvm-project] 81264d: [mlir][Linalg] Add utility method to reshape ops t...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Tue Feb 16 13:42:55 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81264dfbe80df08668a325a61613b64243b99c01
      https://github.com/llvm/llvm-project/commit/81264dfbe80df08668a325a61613b64243b99c01
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2021-02-16 (Tue, 16 Feb 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/test/Dialect/Linalg/canonicalize.mlir

  Log Message:
  -----------
  [mlir][Linalg] Add utility method to reshape ops to express output shape in terms of input shape.

Resolving the dim of outputs of a tensor_reshape op in terms of its
input shape allows the op to be eliminated when its used only in its
dims. The init_tensor -> tensor_reshape canonicalization can be
simplified to use the dims of the output of the tensor_reshape which
gets canonicalized away later making the tensor_reshape dead.

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




More information about the All-commits mailing list