Revert "Backport currently dont work with some models if: (#86510)"

This reverts commit 4bfb734181.

Reverted https://github.com/pytorch/pytorch/pull/86510 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally
This commit is contained in:
PyTorch MergeBot 2022-10-12 04:12:43 +00:00
parent 25725fd624
commit e0d6898cbd
2 changed files with 1 additions and 5 deletions

View File

@ -1721,9 +1721,6 @@ def define_buck_targets(
"{}:flatbuffer_loader".format(ROOT),
"{}:flatbuffer_serializer_mobile".format(ROOT),
],
deps = [
third_party("flatbuffers-api"),
],
)
fb_xplat_cxx_library(
@ -1744,6 +1741,7 @@ def define_buck_targets(
":mobile_bytecode",
":torch_mobile_module",
C10,
third_party("flatbuffers-api"),
],
exported_deps = [
":torch_mobile_train",

View File

@ -7,7 +7,6 @@
#include <torch/csrc/jit/mobile/import.h>
#include <torch/csrc/jit/mobile/module.h>
#include <torch/csrc/jit/serialization/export.h>
#include <torch/csrc/jit/serialization/flatbuffer_serializer_jit.h>
#include <torch/csrc/jit/serialization/import.h>
#include <torch/csrc/jit/serialization/pickler.h>
#include <cstddef>
@ -504,7 +503,6 @@ std::stringstream backport_v7_to_v6(std::stringstream& input_model_stream) {
std::stringstream backport_v9_to_v8(std::stringstream& input_model_stream) {
ExtraFilesMap extra_files;
register_flatbuffer_all();
Module torch_script =
torch::jit::load(input_model_stream, c10::nullopt, extra_files);
std::stringstream intermediate_model_stream;