diff --git a/paddle/pybind/protobuf.cc b/paddle/pybind/protobuf.cc index 91f4c7d7c887240366e9bdcc019bfe2e43d42b6f..47b3c43ebfccd0d26ac5a44d10911018895ba353 100644 --- a/paddle/pybind/protobuf.cc +++ b/paddle/pybind/protobuf.cc @@ -17,7 +17,7 @@ limitations under the License. */ namespace paddle { namespace framework { -void bind_program_desc(py::module &m) { +void BindProgramDesc(py::module &m) { py::class_(m, "ProgramDesc", "") .def_static("instance", [] { return &GetProgramDesc(); }, @@ -45,7 +45,7 @@ void bind_program_desc(py::module &m) { .def("__str__", [](ProgramDesc &self) { return self.DebugString(); }); } -void bind_block_desc(py::module &m) { +void BindBlockDesc(py::module &m) { py::class_(m, "BlockDesc", "") .def("id", [](BlockDesc &self) { return self.idx(); }) .def("parent", [](BlockDesc &self) { return self.parent_idx(); }) @@ -57,7 +57,7 @@ void bind_block_desc(py::module &m) { py::return_value_policy::reference); } -void bind_var_dses(py::module &m) { +void BindVarDsec(py::module &m) { py::class_(m, "VarDesc", "") .def(py::init<>()) .def("set_name", @@ -85,7 +85,7 @@ void bind_var_dses(py::module &m) { }); } -void bind_op_desc(py::module &m) { +void BindOpDesc(py::module &m) { auto op_desc_set_var = [](OpDesc::Var *var, const std::string ¶meter, const std::vector &arguments) { diff --git a/paddle/pybind/protobuf.h b/paddle/pybind/protobuf.h index ff4813cce7c09aa87f84c3d9481fcd04459e618a..a32acfb03826e8cf0161f3a001e05d6b5a76ac2b 100644 --- a/paddle/pybind/protobuf.h +++ b/paddle/pybind/protobuf.h @@ -46,9 +46,9 @@ inline void VectorToRepeated(const std::vector& vec, } } -void bind_program_desc(py::module& m); -void bind_block_desc(py::module& m); -void bind_var_dses(py::module& m); -void bind_op_desc(py::module& m); +void BindProgramDesc(py::module& m); +void BindBlockDesc(py::module& m); +void BindVarDsec(py::module& m); +void BindOpDesc(py::module& m); } // namespace framework } // namespace paddle diff --git a/paddle/pybind/pybind.cc b/paddle/pybind/pybind.cc index 10c6670e004a70b72e5b61b0a8718720950814b6..d9dd7523bf34e15121f9a49823b786b81683d1a5 100644 --- a/paddle/pybind/pybind.cc +++ b/paddle/pybind/pybind.cc @@ -307,10 +307,10 @@ All parameter, weight, gradient are variables in Paddle. m.def("is_compile_gpu", IsCompileGPU); - bind_program_desc(m); - bind_block_desc(m); - bind_var_dses(m); - bind_op_desc(m); + BindProgramDesc(m); + BindBlockDesc(m); + BindVarDsec(m); + BindOpDesc(m); return m.ptr(); }