This is a partial revert of D128615.
to_memref(to_tensor(x)) always be folded to x. But to_tensor(to_memref(x)) cannot be folded in the general case because writes to the intermediary memref may go unnoticed.
Paths
| Differential D129354
[mlir][bufferization] Do not canonicalize to_tensor(to_memref(x)) ClosedPublic Authored by springerm on Jul 8 2022, 2:53 AM.
Details Summary This is a partial revert of D128615. to_memref(to_tensor(x)) always be folded to x. But to_tensor(to_memref(x)) cannot be folded in the general case because writes to the intermediary memref may go unnoticed.
Diff Detail
Event Timelinespringerm added a child revision: D129355: [mlir][linalg] Remove RemoveOutsDependency pattern.Jul 8 2022, 2:54 AM springerm added a child revision: D129356: [mlir][sparse] Switch to One-Shot Bufferize.Jul 8 2022, 3:37 AM This revision is now accepted and ready to land.Jul 8 2022, 4:25 PM Closed by commit rGfc9b37dd532d: [mlir][bufferization] Do not canonicalize to_tensor(to_memref(x)) (authored by springerm). · Explain WhyJul 9 2022, 12:27 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 443419 mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/test/Dialect/SCF/canonicalize.mlir
mlir/test/Dialect/SparseTensor/sparse_vector_chain.mlir
|