mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Test Plan: revert-hammer Differential Revision: D34805092 (284b2b7135
) Original commit changeset: 57f3fc81d68f Original Phabricator Diff: D34805092 (284b2b7135
) fbshipit-source-id: 780dfb6fd6ba5f9348f24a2fb3c57971b7155541 (cherry picked from commit bebeb8b84e11c34cbde4857d0e1c291731a7c781)
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
|