#include #include namespace torch::_export { void initExportBindings(PyObject* module) { auto rootModule = py::handle(module).cast(); auto m = rootModule.def_submodule("_export"); py::class_(m, "CppExportedProgram"); m.def("deserialize_exported_program", [](const std::string& serialized) { return nlohmann::json::parse(serialized).get(); }); m.def("serialize_exported_program", [](const ExportedProgram& ep) { return nlohmann::json(ep).dump(); }); } } // namespace torch::_export