[Mlir-commits] [mlir] [mlir][transform] Add transform.get_operand op (PR #78397)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed Jan 17 01:05:11 PST 2024


================
@@ -725,22 +725,43 @@ def GetProducerOfOperand : TransformDialectOp<"get_producer_of_operand",
                        "functional-type(operands, results)";
 }
 
+def GetOperandOp : TransformDialectOp<"get_operand",
+    [DeclareOpInterfaceMethods<TransformOpInterface>,
+     NavigationTransformOpTrait, MatchOpInterface, MemoryEffectsOpInterface]> {
+  let summary = "Get a handle to the operand(s) of the targeted op";
+  let description = [{
+    The handle defined by this Transform op corresponds to the Operands of the
+    given `target` operation. Optionally `operand_number` can be specified to
+    select a specific operand.
+    
+    This transform fails silently if the targeted operation does not have enough
----------------
ftynse wrote:

Let's use "produces a silenceable failure" instead of "fails silently". Silenceable != silent.

(I know some ops are using "fails silently", but this is wrong.)

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


More information about the Mlir-commits mailing list