Revert "Back out "Revert D40198461: [pytorch][PR] Backport currently dont work with some models if:" (#87124)"

This reverts commit a42fbfa0cb.

Reverted https://github.com/pytorch/pytorch/pull/87124 on behalf of https://github.com/ZainRizvi due to This is causing periodic jobs to fail
This commit is contained in:
PyTorch MergeBot
2022-10-21 16:03:00 +00:00
parent d73d4aa7de
commit 0c1dec375f
5 changed files with 12 additions and 23 deletions
+4 -8
View File
@@ -27,14 +27,6 @@
#include <caffe2/serialize/versions.h>
#include <torch/csrc/jit/serialization/import_export_functions.h>
#include <unordered_set>
#if defined(FB_XPLAT_BUILD) || defined(FBCODE_CAFFE2)
#include <torch/csrc/jit/serialization/mobile_bytecode_generated_fbsource.h> // NOLINT
namespace flatbuffers = flatbuffers_fbsource;
#define FLATBUFFERS_MAX_ALIGNMENT FLATBUFFERS_FBSOURCE_MAX_ALIGNMENT
#else
#include <torch/csrc/jit/serialization/mobile_bytecode_generated.h> // NOLINT
#endif
// Tests go in torch::jit
namespace torch {
namespace jit {
@@ -1804,9 +1796,13 @@ TEST(FlatbufferUpgraderTest, DivScalarInplaceIntV2) {
} // namespace jit
} // namespace torch
#include <torch/csrc/jit/serialization/mobile_bytecode_generated.h>
namespace torch {
namespace jit {
#if defined(FBCODE_CAFFE2) or defined(FB_XPLAT_BUILD)
namespace flatbuffers = flatbuffers_fbsource;
#endif
/**
* An Allocator that can only deallocate (using delete []), counting
* the number of times that it has been asked to deallocate.