mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51241 Test Plan: Imported from OSS Reviewed By: SplitInfinity Differential Revision: D26111488 Pulled By: Lilyjjo fbshipit-source-id: 3315068ac9adef8aa23670a4a5f86c5a54fdd1f7
42 lines
1022 B
C++
42 lines
1022 B
C++
#include <torch/csrc/jit/api/module.h>
|
|
#include <torch/csrc/jit/serialization/export.h>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
void Module::save(std::ostream& out, const ExtraFilesMap& extra_files) const {
|
|
ExportModule(*this, out, extra_files, false /* bytecode_format */);
|
|
}
|
|
|
|
void Module::save(const std::string& filename, const ExtraFilesMap& extra_files)
|
|
const {
|
|
ExportModule(*this, filename, extra_files, false /* bytecode_format */);
|
|
}
|
|
|
|
void Module::_save_for_mobile(
|
|
std::ostream& out,
|
|
const ExtraFilesMap& extra_files,
|
|
bool save_mobile_debug_info) const {
|
|
ExportModule(
|
|
*this,
|
|
out,
|
|
extra_files,
|
|
true /* bytecode_format */,
|
|
save_mobile_debug_info);
|
|
}
|
|
|
|
void Module::_save_for_mobile(
|
|
const std::string& filename,
|
|
const ExtraFilesMap& extra_files,
|
|
bool save_mobile_debug_info) const {
|
|
ExportModule(
|
|
*this,
|
|
filename,
|
|
extra_files,
|
|
true /* bytecode_format */,
|
|
save_mobile_debug_info);
|
|
}
|
|
|
|
} // namespace jit
|
|
} // namespace torch
|