[Mlir-commits] [mlir] [MLIR][Python] Support dialect conversion in python bindings (PR #177782)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jan 30 20:14:48 PST 2026


================
@@ -305,3 +307,14 @@ def _get_int_array_array_attr(
 
     # Turn the outer list into an ArrayAttr.
     return ArrayAttr.get(values)
+
+
+class OpAdaptor:
+    def __init__(
+        self, operands: _Sequence[Value], opview_or_attributes: OpView | OpAttributeMap
+    ) -> None:
+        self.operands = operands
+        if isinstance(opview_or_attributes, OpView):
+            self.attributes = opview_or_attributes.operation.attributes
+        else:
+            self.attributes = opview_or_attributes
----------------
PragmaTwice wrote:

done.

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


More information about the Mlir-commits mailing list