[Mlir-commits] [mlir] [mlir][Interfaces] `DestinationStyleOpInterface`: Rename `hasTensor/BufferSemantics` (PR #77574)

Jacques Pienaar llvmlistbot at llvm.org
Wed Jan 10 12:07:34 PST 2024


================
@@ -17,24 +17,26 @@ def DestinationStyleOpInterface : OpInterface<"DestinationStyleOpInterface"> {
     as initial tensor values for the results of the operation or the init
     buffers to which the results of the op will be written.
 
-    Init operands must be ranked tensors or ranked memrefs. Input operands can
-    have any type. All non-init operands are DPS inputs.
+    Init operands must be tensors or memrefs. Input operands can have any type.
+    All non-init operands are DPS inputs.
 
     The init operands of this op are specified by the MutableOperandRange that
     the `getDpsInitsMutable` interface methods returns. This implies that the
     init operands must be a consecutive range of operands.
 
-    If the op has "tensor semantics", then the input operands are either ranked
-    tensors or other non-tensor/memref types ("scalars"). The init operands are
-    ranked tensors and every tensor init is tied to a corresponding tensor
-    OpResult in a 1-to-1 fashion. The i-th init tensor is tied to the i-th
-    OpResult. The op may not have any additional OpResults. Init operands and
-    their tied OpResults have the same type. Dynamic dimension sizes also match
-    at runtime.
+    Each tensor init operand is tied to a corresponding tensor OpResult in a
+    1-to-1 fashion. The i-th init tensor is tied to the i-th OpResult. The op
+    may not have any additional OpResults. Init operands and their tied
+    OpResults have the same type. Dynamic dimension sizes also match at runtime.
 
-    If the op has "buffer semantics", then the input operands are either ranked
-    memrefs or other non-tensor/memref types ("scalar" types). Furthermore, the
-    init operands are ranked memrefs and the op has no results.
+    Note: This implies that a destination style op without any tensor inits must
+    not have any OpResults.
+
+    An op has "tensor semantics" if it has at least one tensor operand.
----------------
jpienaar wrote:

Should this be a bulleted list?

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


More information about the Mlir-commits mailing list