Files
pytorch/torch/csrc/jit/api/module_save.cpp
Nikita Shulga 8f1c3c68d3 [BE] Use nested namespaces in .cpp/.cu files (#92100)
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
2023-01-13 16:32:34 +00:00

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