File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
include/mlir/Bindings/Python Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1852,12 +1852,12 @@ class PyOpResult : public PyConcreteValue<PyOpResult> {
18521852 static void bindDerived (ClassTy &c) {
18531853 c.def_prop_ro (
18541854 " owner" ,
1855- [](PyOpResult &self) -> nanobind::typed<nanobind::object, PyOperation > {
1855+ [](PyOpResult &self) -> nanobind::typed<nanobind::object, PyOpView > {
18561856 assert (mlirOperationEqual (self.getParentOperation ()->get (),
18571857 mlirOpResultGetOwner (self.get ())) &&
18581858 " expected the owner of the value in Python to match that in "
18591859 " the IR" );
1860- return self.getParentOperation (). getObject ();
1860+ return self.getParentOperation ()-> createOpView ();
18611861 },
18621862 " Returns the operation that produces this result." );
18631863 c.def_prop_ro (
Original file line number Diff line number Diff line change @@ -1993,15 +1993,15 @@ static void populateIRCore(nb::module_ &m) {
19931993 kDumpDocstring )
19941994 .def_prop_ro (
19951995 " owner" ,
1996- [](PyValue &self) -> nb::object {
1996+ [](PyValue &self) -> nb::typed<nb:: object, PyOpView> {
19971997 MlirValue v = self.get ();
19981998 if (mlirValueIsAOpResult (v)) {
19991999 assert (mlirOperationEqual (self.getParentOperation ()->get (),
20002000 mlirOpResultGetOwner (self.get ())) &&
20012001 " expected the owner of the value in Python to match "
20022002 " that in "
20032003 " the IR" );
2004- return self.getParentOperation (). getObject ();
2004+ return self.getParentOperation ()-> createOpView ();
20052005 }
20062006
20072007 if (mlirValueIsABlockArgument (v)) {
You can’t perform that action at this time.
0 commit comments