未验证 提交 0020d915 编写于 作者: W Wilber 提交者: GitHub

fix python pass builder error. (#30946)

上级 39aeaa16
......@@ -543,7 +543,10 @@ void BindAnalysisConfig(py::module *m) {
[](AnalysisConfig &self, const std::string &pass) {
self.pass_builder()->DeletePass(pass);
})
.def("pass_builder", &AnalysisConfig::pass_builder,
.def("pass_builder",
[](AnalysisConfig &self) {
return dynamic_cast<PaddlePassBuilder *>(self.pass_builder());
},
py::return_value_policy::reference);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册