Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][tensor] Fold
tensor.cast
into tensor.collapse_shape
op
This commit folds a `tensor.cast` op into a `tensor.collapse_shape` op when following two conditions meet: 1. the `tensor.collapse_shape` op consumes result of the `tensor.cast` op. 2. `tensor.cast` op casts to a more dynamic version of the source tensor. This is added as a canonicalization pattern in `tensor.collapse_shape` op. Signed-Off-By: Gaurav Shukla <gaurav@nod-labs.com> Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D130650
- Loading branch information
1 parent
8a61749
commit 7d6ef5c
Showing
2 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters