pytorch/caffe2/serialize
Martin Yuan cf63893211 Enable implicit operator versioning via number of arguments (#58852)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58852

Enable implicit operator versioning via number of arguments from Mobile.
1. By default, TS doesn't emit instructions for tailing default args and the provided number of specified args is serialized to bytecode. From interpreter the default values are fetched from operator schema. The implementation has been landed in #56845. Please refer to #56845 for details.
2. Since there is bytecode schema change, the bytecode version is bumped from 5 to 6.
3. The corresponding backport function is provided, for forward compatibility use. Note that because there is instruction change, a global flag is used as the switch to control the two versions.

Test Plan: Imported from OSS

Reviewed By: raziel

Differential Revision: D28789746

Pulled By: iseeyuan

fbshipit-source-id: 6e5f16460c79b2bd3312de02d0f57b79f50bf66b
2021-06-15 02:07:40 -07:00
..
CMakeLists.txt
crc.cc
crc_alt.h
file_adapter.cc Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
file_adapter.h
inline_container.cc [clang-tidy] Exclude cppcoreguidelines-avoid-magic-numbers (#57841) 2021-05-07 20:02:33 -07:00
inline_container.h
inline_container_test.cc [clang-tidy] Exclude cppcoreguidelines-avoid-magic-numbers (#57841) 2021-05-07 20:02:33 -07:00
istream_adapter.cc Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
istream_adapter.h
read_adapter_interface.cc Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
read_adapter_interface.h
versions.h Enable implicit operator versioning via number of arguments (#58852) 2021-06-15 02:07:40 -07:00