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