[Mlir-commits] [mlir] [MLIR][Transform][Python] Wrapper for transform.foreach (PR #171544)
Maksim Levental
llvmlistbot at llvm.org
Wed Dec 10 07:48:15 PST 2025
================
@@ -14,8 +14,10 @@
def _is_constant_int_like(i):
return (
isinstance(i, Value)
- and isinstance(i.owner, Operation)
- and isinstance(i.owner.opview, ConstantOp)
+ and (
+ (isinstance(i.owner, Operation) and isinstance(i.owner.opview, ConstantOp))
----------------
makslevental wrote:
You get a generic OpView:
https://github.com/llvm/llvm-project/blob/54b4bd510a8cc90fac3d2071179d1424af894c9c/mlir/lib/Bindings/Python/IRCore.cpp#L1438-L1442
> I will change Value.owner to also return an OpView
You should put in the notes here then that all `owner`s now return OpView (in case someone somewhere has some conditional like this which will break (maybe also a PSA on discourse)
https://github.com/llvm/llvm-project/pull/171544
More information about the Mlir-commits
mailing list