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

Maksim Levental llvmlistbot at llvm.org
Mon Jan 26 09:52:27 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> {
----------------
makslevental wrote:

you can do `nb::typed<nb::object, std::variant<PyBlock, PyOpView>>`

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


More information about the Mlir-commits mailing list