This patch augments the tensor-bufferize pass by adding a conversion
rule to translate ReshapeOp from the tensor dialect to the memref
dialect, in addition to adding a unit test to validate the translation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp | ||
---|---|---|
752 | If opOperand is shape, we should return true here. For the source, we can return false. | |
774 | nit: We should return failure() if state.getBuffer fails. I will update the remaining implementations in this file at some point.... | |
776 | same as above |
Comment Actions
fix bufferizesToMemoryRead() and bufferize()
This patch changes the bufferizesToMemoryRead() method so that it returns true
for the shape operand. It also makes bufferize() return false if
BufferizationState::getBuffer() returns a failure.
Comment Actions
Thanks @springerm! Could you commit the change please? I don't yet have write access to the repo.
If opOperand is shape, we should return true here. For the source, we can return false.