Skip to content

Commit

Permalink
[PIR] fix ci error. (#57513)
Browse files Browse the repository at this point in the history
  • Loading branch information
winter-wang authored Sep 20, 2023
1 parent e30b274 commit 4fd9767
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion paddle/fluid/pybind/ir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,12 @@ void BindOpResult(py::module *m) {
})
.def("__hash__",
[](OpResult &self) { return std::hash<pir::Value>{}(self); })
.def("get_defining_op", &OpResult::owner, return_value_policy::reference)
.def(
"get_defining_op",
[](const OpResult &self) -> pir::Operation * {
return self ? self.owner() : nullptr;
},
return_value_policy::reference)
.def_property_readonly(
"block",
[](OpResult &self) { return self.owner()->GetParent(); },
Expand Down

0 comments on commit 4fd9767

Please sign in to comment.