7 Commits

Author SHA1 Message Date
b28e696516 Update linspace and bump version nuymber to 8 (#71486)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71486

This PR adds upgraders for linspace and linspace.out as the optional step size will be deprecated soon. Old models will be using steps size of 100 when nothing is provided.

Test Plan: buck-out/gen/caffe2/test/jit#binary.par -r TestUpgraders.test_aten_linspace

Reviewed By: cccclai, mruberry

Differential Revision: D33654308

fbshipit-source-id: 0e0138091da0b11d4f49156eeb6bcd7e46102a5b
(cherry picked from commit 931ae4af3200b37d1cebcb7f30e8ba880c1305ec)
2022-02-01 18:16:55 +00:00
c5df294940 Fix bug in upgrader generation in mobile (#71578)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71578

Use more robust way of extracting upgrader min and max versions

Test Plan: omgitsgreen

Reviewed By: cccclai

Differential Revision: D33690113

fbshipit-source-id: 79a964acb26d7ca1354e104710a285b8da3f46d1
(cherry picked from commit 9e316ee5c12e7bce9b17edebec2eeb38ecabd336)
2022-01-28 18:20:59 +00:00
30699cbfd5 Reland D33284352: [jit][edge] Do not reuse mobile type parser for all unpicklers. (#71048)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71048

reland D33284352 (0a921ba0d0)
ghstack-source-id: 146735646

Test Plan: All Github CI: ciflow rerun -l ciflow/all

Reviewed By: gmagogsfm

Differential Revision: D33489731

fbshipit-source-id: 3e160209a1abb193ad3eed3018054aa7d331025e
2022-01-10 12:42:23 -08:00
9762aa0fdc Revert D33284352: [jit][edge] Do not reuse mobile type parser for all unpicklers.
Test Plan: revert-hammer

Differential Revision:
D33284352 (0a921ba0d0)

Original commit changeset: 997c4f110b36

Original Phabricator Diff: D33284352 (0a921ba0d0)

fbshipit-source-id: af316727442a64f1ae40d53d7a9d26ec550d634e
2022-01-07 19:58:03 -08:00
0a921ba0d0 [jit][edge] Do not reuse mobile type parser for all unpicklers. (#70338)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70338

Today Unpickler is used by both server and mobile for deserializing model, and it always fallback to mobile parser when there's no type resolver provided by user. However this is not intended as server and mobile type parser supports different things. In this diff we provide a default fallback using script parser and opt it out for all mobile cases.
ghstack-source-id: 146727330

(Note: this ignores all push blocking failures!)

Test Plan: CI

Reviewed By: iseeyuan

Differential Revision: D33284352

fbshipit-source-id: 997c4f110b36eee6596e8f23f6a87bf91a4197ed
2022-01-07 18:35:32 -08:00
a0c99a8d3b [Operator Verioning][Edge] Update upgrader codegen with latest change (#70293)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70293

```
python /Users/chenlai/pytorch/tools/codegen/operator_versions/gen_mobile_upgraders.py

```
https://github.com/pytorch/pytorch/pull/70161 is landed to resolve a thread safety issue. Accordingly, the upgrader codegen needs to be updated.
ghstack-source-id: 146296324

Test Plan:
```
buck test mode/opt //caffe2/test:upgrader_codegen
buck run mode/opt //caffe2/torch/fb/mobile/upgrader_codegen:upgrader_codegen
python /Users/chenlai/pytorch/tools/codegen/operator_versions/gen_mobile_upgraders.py

```

Reviewed By: iseeyuan

Differential Revision: D33274831

fbshipit-source-id: 0e1d2a81edc9b6111f3c6127dbd5b97e16c93dca
2021-12-28 18:34:31 -08:00
b23890177f [Operator Versioning][Edge] Codegen upgrader_mobile.cpp (#69194)
Summary:
From operator version map and upgrader torchscript, generate upgrader_mobile.cpp file. It also includes a unit test.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/69194

ghstack-source-id: 145819351

Test Plan:
```
buck test mode/opt //caffe2/test:upgrader_codegen
```
```
buck run mode/opt //caffe2/torch/fb/mobile/upgrader_codegen:upgrader_codegen
```
```
python /Users/chenlai/pytorch/tools/codegen/operator_versions/gen_mobile_upgraders.py
```

Reviewed By: iseeyuan

Differential Revision: D32748985

fbshipit-source-id: f8437766edaba459bfc5e7fc7a3ca0520c4edb9a
2021-12-16 10:29:35 -08:00