Extend jit::load to work on flatbuffer file; Take 2 (#75256)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75256

ghstack-source-id: 153138970

Test Plan: CI

Reviewed By: iseeyuan

Differential Revision: D35399581

fbshipit-source-id: dafe9d301009d3f70986ed92bfe06d160ab90ba0
(cherry picked from commit ccc860fd07946de5aae12bc179a0b8bbba83b997)
This commit is contained in:
Pavithran Ramachandran
2022-04-06 10:41:25 -07:00
committed by PyTorch MergeBot
parent ff7051781f
commit f984e50f39
9 changed files with 249 additions and 120 deletions

View File

@ -540,6 +540,7 @@ mobile::Module _load_for_mobile(
std::istream& in,
c10::optional<at::Device> device,
ExtraFilesMap& extra_files) {
in.seekg(0, in.beg);
auto format = getFileFormat(in);
switch (format) {
case FileFormat::ZipFileFormat: {