Skip to content
Commit 589eac65 authored by Mahesh Ravishankar's avatar Mahesh Ravishankar
Browse files

[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
parent 60d719b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment