[Mlir-commits] [mlir] [MLIR][Python] Python binding support for AffineIfOp (PR #108323)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Tue Oct 29 13:29:36 PDT 2024


================
@@ -156,3 +156,61 @@ def for_(
             yield iv, iter_args[0]
         else:
             yield iv
+
+
+ at _ods_cext.register_operation(_Dialect, replace=True)
+class AffineIfOp(AffineIfOp):
+    """Specialization for the Affine if op class."""
+
+    def __init__(
+        self,
+        cond: IntegerSet,
+        results_: Optional[Type] = None,
+        *,
+        cond_operands: Optional[_VariadicResultValueT] = None,
+        hasElse: bool = False,
----------------
ftynse wrote:

```suggestion
        has_else: bool = False,
```

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


More information about the Mlir-commits mailing list