未验证 提交 3d35827c 编写于 作者: A Aurelius84 提交者: GitHub

[Performance]Add static inline for MakeReturnPyObject (#42334) (#42339)

上级 b37e626e
......@@ -177,7 +177,7 @@ static inline void HandleViewBetweenInputAndOutput(
}
}
PyObject* MakeReturnPyObject(
static inline PyObject* MakeReturnPyObject(
const std::shared_ptr<paddle::imperative::VarBase>& out) {
return ::pybind11::detail::type_caster_base<imperative::VarBase>::cast_holder(
::pybind11::detail::holder_helper<
......@@ -186,7 +186,7 @@ PyObject* MakeReturnPyObject(
.ptr();
}
PyObject* MakeReturnPyObject(
static inline PyObject* MakeReturnPyObject(
const std::vector<std::shared_ptr<imperative::VarBase>>& out) {
PyObject* result = PyList_New((Py_ssize_t)out.size());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册