[Mlir-commits] [mlir] [mlir][MLProgram] Add MLProgram to MemRef bufferization pass (PR #75103)
Matthias Springer
llvmlistbot at llvm.org
Mon Dec 11 23:52:46 PST 2023
matthias-springer wrote:
Instead of a separate pass, can you implement the `BufferizableOpInterface` for these three ops? Then it would compose better with the One-Shot Bufferize infrastructure. We keep those interface implementations in `(Dialect)/Transforms/BufferizableOpInterfaceImpl.cpp` files.
The implementation would be similar to `flow.dispatch.tensor.load/store` in IREE (https://github.com/openxla/iree/blob/main/compiler/src/iree/compiler/Codegen/Interfaces/BufferizationInterfaces.cpp#L164). I think you also won't need to create a copy when loading a tensor. The implementation of `GlobalLoadOp::isWritable` can return `false`, so that every write would trigger a copy during One-Shot Bufferize.
https://github.com/llvm/llvm-project/pull/75103
More information about the Mlir-commits
mailing list