mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-22 06:11:27 +08:00
As we live in C++17 world This is a functional no-op, just - `s/namespace at { namespace native {/namespace at::native {/` - `s/namespace torch { namespace jit {/namespace torch::jit {/` Pull Request resolved: https://github.com/pytorch/pytorch/pull/92100 Approved by: https://github.com/izaitsevfb
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#include <torch/csrc/jit/api/module.h>
|
|
#include <torch/csrc/jit/serialization/export.h>
|
|
|
|
namespace torch::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,
|
|
bool use_flatbuffer) const {
|
|
ExportModule(
|
|
*this,
|
|
out,
|
|
extra_files,
|
|
true /* bytecode_format */,
|
|
save_mobile_debug_info,
|
|
use_flatbuffer);
|
|
}
|
|
|
|
void Module::_save_for_mobile(
|
|
const std::string& filename,
|
|
const ExtraFilesMap& extra_files,
|
|
bool save_mobile_debug_info,
|
|
bool use_flatbuffer) const {
|
|
ExportModule(
|
|
*this,
|
|
filename,
|
|
extra_files,
|
|
true /* bytecode_format */,
|
|
save_mobile_debug_info,
|
|
use_flatbuffer);
|
|
}
|
|
|
|
} // namespace torch::jit
|