[Mlir-commits] [mlir] [MLIR][Python] Python binding support for AffineIfOp (PR #107336)
Amy Wang
llvmlistbot at llvm.org
Wed Sep 4 20:12:44 PDT 2024
================
@@ -407,7 +407,8 @@ def AffineIfOp : Affine_Op<"if",
}
```
}];
- let arguments = (ins Variadic<AnyType>);
+ let arguments = (ins Variadic<AnyType>,
+ IntegerSetAttr:$condition);
----------------
kaitingwang wrote:
My understanding is AffineIfOp has skipDefaultBuilders=1 which effectively skips the creation of the default AffineIfOp::builder on the C++ side. (AffineIfOp has two custom OpBuilder defined immediately below in the extraClassDeclaration.) Interestingly, on the python side, _affine_ops_gen.py shows that the default builder is still being created, but it does not accept IntegerSet and thus makes it useless.
This fix at line 411 makes the default python AffineIfOp builder take in an IntegerSet input and does impact the C++ side of things. (This is my understanding and I can be wrong :)
We definitely need a TD file expert to chime in here!
https://github.com/llvm/llvm-project/pull/107336
More information about the Mlir-commits
mailing list