pytorch/test/cpp
Chen Lai 880098a7e3 [PyTorch Edge] Backport function for defaults args with out args, flag on (#63651)
Summary:
1. Enable support for operators with default args and out args. For `torch.add(x, h, out=x)`, the number of specified arguments will be 3 instead of 4.
2. Bump bytecode version from 6 to 7
3. Implement backport_v7_to_v6 function. Also slightly refactor the local_thread to allow re-emit operators.
4. unittest to cover backport function
5. Update expect result from 4 to 3 in unit test DefaultArgsWithOutArg to cover the number of specified arguments.

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

ghstack-source-id: 138539912

Test Plan:
```
caffe2/test/cpp/jit:jit - LiteInterpreterTest.DefaultArgsWithOutArg
caffe2/test/cpp/jit:jit - LiteInterpreterTest.DefaultArgsPinvWithOutArg
caffe2/test/cpp/jit:jit - LiteInterpreterTest.BackPortByteCodeModelAllVersions
```

Reviewed By: raziel, tugsbayasgalan

Differential Revision: D30454080

fbshipit-source-id: 357c50b96682430675142d20d688d1f64e1de307
2021-09-20 22:50:30 -07:00
..
api Disable autograd fallback tests on Windows (#65147) 2021-09-17 08:32:43 -07:00
c10d [Pytorch Profiler] Add support for adding module hierarchy to (#61792) 2021-08-13 21:39:10 -07:00
common
dist_autograd Fix distributed autograd gradients synchronization (#57792) 2021-05-09 17:32:59 -07:00
jit [PyTorch Edge] Backport function for defaults args with out args, flag on (#63651) 2021-09-20 22:50:30 -07:00
lite_interpreter_runtime [Pytorch Edge] Enable kineto profiler on mobile via EdgeKinetoProfiler (#62419) 2021-08-13 21:40:19 -07:00
rpc Remove process_group_agent and faulty_process_group_agent files (#62985) 2021-08-10 15:57:39 -07:00
tensorexpr [nnc] Updated inlining to handle cases when producer indices are constants after eval (#65044) 2021-09-17 11:28:48 -07:00
__init__.py remediation of S205607 2020-07-17 17:19:47 -07:00