[Mlir-commits] [mlir] [mlir][bufferization] Add `BufferizableOpInterface::hasTensorSemantics` (PR #75273)
Matthias Springer
llvmlistbot at llvm.org
Fri Jan 5 06:51:17 PST 2024
================
@@ -575,6 +575,28 @@ def BufferizableOpInterface : OpInterface<"BufferizableOpInterface"> {
return false;
}]
>,
+ InterfaceMethod<
+ /*desc=*/[{
+ Return "true" if the this op has tensor semantics and should be
+ bufferized. By default, ops with tensor operands, tensor op results
+ and/or tensor block arguments have tensor semantics.
+
+ This interface methods can be implemented by ops that should be
+ bufferized but do not have tensor semantics according to the above
+ definition. E.g., this function can return "true" for symbols.
+
+ TODO: This interface method should be called `hasTensorSemantics`, but
----------------
matthias-springer wrote:
No, these two functions should never have contradicting return values. (But not all ops that can be bufferized are also destination-style ops, so some ops do not have a `DestinationStyleOpInterface::hasTensorSemantics` function.)
https://github.com/llvm/llvm-project/pull/75273
More information about the Mlir-commits
mailing list