mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add a pybind for Module::get_functions. (#20594)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20594 ghimport-source-id: 96f8046fd3aed49d8b29312ce2f8d7e0ea5e5787 Differential Revision: D15375132 Pulled By: ZolotukhinM fbshipit-source-id: 7ad87e29d965e459c49be1be8a08f86ed2a0b4db
This commit is contained in:
committed by
Facebook Github Bot
parent
2af5911a95
commit
986c9eb537
@ -312,6 +312,11 @@ void initJitScriptBindings(PyObject* module) {
|
||||
},
|
||||
py::return_value_policy::reference_internal)
|
||||
.def("_register_parameter", &Module::register_parameter)
|
||||
.def(
|
||||
"_get_functions",
|
||||
[](Module& self) {
|
||||
return self.class_compilation_unit().get_functions();
|
||||
})
|
||||
.def(
|
||||
"_register_attribute",
|
||||
[](Module& self, std::string name, TypePtr type, py::object value) {
|
||||
|
Reference in New Issue
Block a user