pytorch/caffe2/serialize
Chen Lai 8b8012a165 [PyTorch Edge] Skip writing version during backport (#65842)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65842

During backport, only parts of the model (like bytecode.pkl) needs to be re-written, while the rest of the model is the same. However, `version` will always be re-written when `PyTorchStreamWriter` is destrcuted.

Change version to optional and add an api to allow skipping writing version when closing the writer.
ghstack-source-id: 139580386

Test Plan: buck run papaya/scripts/repro:save_load

Reviewed By: iseeyuan, tugsbayasgalan

Differential Revision: D31262904

fbshipit-source-id: 3b8a5e1aaa610ffb0fe8a616d9ad9d0987c03f23
2021-10-01 21:18:31 -07:00
..
CMakeLists.txt
crc.cc
crc_alt.h
file_adapter.cc [easy][PyTorchEdge] print error message when failing to load model file (#63404) 2021-08-17 22:27:49 -07:00
file_adapter.h
inline_container.cc [PyTorch Edge] Skip writing version during backport (#65842) 2021-10-01 21:18:31 -07:00
inline_container.h
inline_container_test.cc
istream_adapter.cc
istream_adapter.h [caffe2] fixes to allow stricter compilation flag (#64016) 2021-08-27 10:38:37 -07:00
read_adapter_interface.cc
read_adapter_interface.h
versions.h [PyTorch Edge] Backport function for defaults args with out args, flag on (#63651) 2021-09-20 22:50:30 -07:00