[Mlir-commits] [mlir] [MLIR][Transform][Python] transform.foreach wrapper and .owner OpViews (PR #172228)

Rolf Morel llvmlistbot at llvm.org
Mon Jan 26 09:44:40 PST 2026


================
@@ -4646,15 +4646,15 @@ void mlir::python::populateIRCore(nb::module_ &m) {
           kDumpDocstring)
       .def_prop_ro(
           "owner",
-          [](PyValue &self) -> nb::object {
+          [](PyValue &self) -> nb::typed<nb::object, PyOpView> {
----------------
rolfmorel wrote:

Agreed. Should be either `PyBlock` or `PyOpView`.

Does anybody know how to express that the type used by nb::typed is a Union?

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


More information about the Mlir-commits mailing list