Even though iter_arg and init_arg of an scf.for loop may have the same tensor type, their bufferized memref types are not necessarily equal. It is sometimes necessary to insert a cast in case of differing layout maps.
Depends On D132859
Paths
| Differential D132860
[mlir][SCF][bufferize] Support different iter_arg/init_arg types (scf.for) ClosedPublic Authored by springerm on Aug 29 2022, 9:12 AM.
Details Summary Even though iter_arg and init_arg of an scf.for loop may have the same tensor type, their bufferized memref types are not necessarily equal. It is sometimes necessary to insert a cast in case of differing layout maps. Depends On D132859
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Aug 30 2022, 6:05 AM Closed by commit rG123c4b025178: [mlir][SCF][bufferize] Support different iter_arg/init_arg types (scf.for) (authored by springerm). · Explain WhyAug 30 2022, 7:35 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 456667 mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td
mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
mlir/test/Dialect/SCF/one-shot-bufferize.mlir
|