[Mlir-commits] [mlir] [mlir][bufferization] Add `BufferizableOpInterface::hasTensorSemantics` (PR #75273)

Jacques Pienaar llvmlistbot at llvm.org
Thu Jan 4 12:53:44 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
----------------
jpienaar wrote:

And there are cases where one is true while the other isn't?

https://github.com/llvm/llvm-project/pull/75273


More information about the Mlir-commits mailing list