提交 e4aea7fd 编写于 作者: Y Yi Wang

Fix pybind and const type mismatch

上级 ddb29b6c
...@@ -154,8 +154,8 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -154,8 +154,8 @@ All parameter, weight, gradient are variables in Paddle.
m.def_submodule( m.def_submodule(
"var_names", "var_names",
"The module will return special predefined variable name in Paddle") "The module will return special predefined variable name in Paddle")
.def("empty", kEmptyVarName) .def("empty", []() { return kEmptyVarName; })
.def("temp", kTempVarName); .def("temp", []() { return kTempVarName; });
// clang-format off // clang-format off
py::class_<paddle::platform::DeviceContext>(m, "DeviceContext") py::class_<paddle::platform::DeviceContext>(m, "DeviceContext")
.def_static("create", .def_static("create",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册