Moves (most) ops to symbolic script (#23794)
Summary:
This PR removes the following operators to symbolic script:
- add
- sub
- mul
- div
- threshold
- clamp
- addmm
- comparison ops (lt, le, ge, ...)
- fmod
- remainder
- max_pool2d_with_indices
Additionally, the view and reshape operations were removed from autodiff.cpp (they were already written in symbolic script).
The functionality of these operators is mostly preserved, except clamp and threshold have been modified to be gradient preserving at the boundary. Moving clamp also changed the graph tested in test_jit.py, which I think is expected.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23794
Test Plan: Existing tests provided sufficient coverage.
Differential Revision: D16902986
Pulled By: mruberry
fbshipit-source-id: 478f2a59d9a5b0487fc523fd594cb775cb617525