Files
clang-p2996/mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp
Matthias Springer 8f2d83da26 [mlir][bufferization] Add BufferizableOpInterface::hasTensorSemantics (#75273)
Add a new interface method to `BufferizableOpInterface`:
`hasTensorSemantics`. This method returns "true" if the op has tensor
semantics and should be bufferized.

Until now, we assumed that an op has tensor semantics if it has tensor
operands and/or tensor op results. However, there are ops like
`ml_program.global` that do not have any results/operands but must still
be bufferized (#75103). The new interface method can return "true" for
such ops.

This change also decouples `bufferization::bufferizeOp` a bit from the
func dialect.
2024-01-16 10:07:34 +01:00

20 KiB