[all-commits] [llvm/llvm-project] 589eac: [mlir] Add canonicalizations for op -> tensor.cast...
MaheshRavishankar via All-commits
all-commits at lists.llvm.org
Tue Mar 8 10:27:30 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 589eac6524d6ba080a51107757c1f356c365d047
https://github.com/llvm/llvm-project/commit/589eac6524d6ba080a51107757c1f356c365d047
Author: Mahesh Ravishankar <ravishankarm at google.com>
Date: 2022-03-08 (Tue, 08 Mar 2022)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
M mlir/include/mlir/Dialect/Tensor/IR/Tensor.h
M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
M mlir/test/Dialect/Linalg/canonicalize.mlir
M mlir/test/Dialect/Linalg/tile-and-fuse-tensors.mlir
Log Message:
-----------
[mlir] Add canonicalizations for op -> tensor.cast folding.
A `tensor.cast` consumer can be folded with its producer. This is
beneficial only if the result of the tensor cast is more static than
the source. This patch adds a utility function to check that this is
the case, and adds a couple of canonicalizations patterns that fold an
operation with `tensor.cast` conusmers.
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D120950
More information about the All-commits
mailing list