Commit graph

49298 commits

Author SHA1 Message Date
Horace He
85576dbb2d [functorch] update op analysis script 2022-07-21 13:41:14 -07:00
Horace He
421aeeb04d [functorch] Added a bunch of __foo__ ops 2022-07-21 13:41:14 -07:00
Animesh Jain
60cdeb6654 [functorch] [Benchmarking] Adding scripts for lightseq benchmarking (pytorch/functorch#310) 2022-07-21 13:41:13 -07:00
Richard Zou
306eda0845 [functorch] Fix CI 2022-07-21 13:41:13 -07:00
Richard Zou
6f882bb4aa [functorch] Fix CI 2022-07-21 13:41:13 -07:00
Richard Zou
211b2148b1 [functorch] Fix CI 2022-07-21 13:41:13 -07:00
Richard Zou
6f4330e6f8 [functorch] Fix CI 2022-07-21 13:41:13 -07:00
Richard Zou
20997b4917 [functorch] Fix some linting 2022-07-21 13:41:13 -07:00
vfdev
1d956a0aaf [functorch] Added grid_sample backward batch rule (pytorch/functorch#284)
* Added grid_sample backward batch rule
Description:
- Added grid_sample backward batch rule: CPU and CUDA
- Updated tests

Notes:
I had to expand on dim 0 in most of the cases and could not use
tricks like in forward pass when batch dim is merged either with channel or H_out
due to wrong grid grads in these cases

* Code updates according to the review

* Updated OutOfPlacePlumbing.cpp to the latest pytorch
2022-07-21 13:41:13 -07:00
Kshiteej K
d9c63e2dc1 [functorch] replace reshape with view (pytorch/functorch#304) 2022-07-21 13:41:13 -07:00
Horace He
f03ac2ec86 [functorch] Added logit decompositions 2022-07-21 13:41:13 -07:00
Horace He
73443c14a5 [functorch] added some more decompositions 2022-07-21 13:41:13 -07:00
Horace He
211e09586c [functorch] Add node about potential exponential blowup 2022-07-21 13:41:13 -07:00
Horace He
9720b5b1db [functorch] fix decomposition tests to work on GPU 2022-07-21 13:41:13 -07:00
Kshiteej K
f6baad47af [functorch] [batching] pixel_un|shuffle (pytorch/functorch#295) 2022-07-21 13:41:13 -07:00
Horace He
2553c1a29c [functorch] added some more decompositions and rejiggered the testing infra 2022-07-21 13:41:13 -07:00
Horace He
5eb9a1d109 [functorch] modified gitignore 2022-07-21 13:41:13 -07:00
Horace He
ab64065e5e [functorch] updated with some more decompositions 2022-07-21 13:41:13 -07:00
Richard Zou
c51aceb877 [functorch] jacobian / hessian correctness tests (pytorch/functorch#301)
Ported from PyTorch core
2022-07-21 13:41:13 -07:00
Horace He
036b0d873f [functorch] fix unexpected scucess with hessian test 2022-07-21 13:41:13 -07:00
Horace He
d1f8127043 [functorch] moved decompositions to their own file 2022-07-21 13:41:13 -07:00
Horace He
653e56b6b0 [functorch] moved some stuff around 2022-07-21 13:41:13 -07:00
Kshiteej K
f3946010cd [functorch] [batching] slice_scatter (pytorch/functorch#290) 2022-07-21 13:41:13 -07:00
Richard Zou
7f4fc89b33 [functorch] Quick fix 2022-07-21 13:41:13 -07:00
Richard Zou
b9500431f9 [functorch] quick fix 2022-07-21 13:41:13 -07:00
vfdev
18ac89a86c [functorch] Update README.md (pytorch/functorch#302) 2022-07-21 13:41:13 -07:00
Richard Zou
476252c0be [functorch] Fix CI 2022-07-21 13:41:12 -07:00
Richard Zou
9573737a83 [functorch] Fix CI
Some of our fallbacks weren't handling Tensor?[] correctly.
2022-07-21 13:41:12 -07:00
Richard Zou
30350bfcaf [functorch] jacfwd accepts pytree inputs (pytorch/functorch#300)
Test Plan:
- new tests
2022-07-21 13:41:12 -07:00
Richard Zou
057aaa3b51 [functorch] jvp with pytree inputs (pytorch/functorch#299)
Test Plan:
- new tests
2022-07-21 13:41:12 -07:00
Richard Zou
1501f81a8e [functorch] functorch jvp quick fixes (pytorch/functorch#298)
Quick fixes for jvp support.
2022-07-21 13:41:12 -07:00
Horace He
fe9aac72d1 [functorch] Added decomposition testing + display infra (pytorch/functorch#281)
* Added decomposition testing + display infra

* add a couple more decompositions

* changed some stuff

* made some changes

* Added decomposition testing + display infra

* add a couple more decompositions

* fix some decompositions

* changed some stuff

* updated generation

* fix test failures

* removed extraneous files

* fixed test failures

* fixed tests

* updated

* fixed tests again
2022-07-21 13:41:12 -07:00
Richard Zou
0fa9f7af83 [functorch] Fix CI 2022-07-21 13:41:12 -07:00
soulitzer
63ca57247d [functorch] Add per-op tests for jvp and vmap + jvp (pytorch/functorch#232)
* Test

* Address comments
2022-07-21 13:41:12 -07:00
Richard Zou
9323734e0e [functorch] Fix CI 2022-07-21 13:41:12 -07:00
Richard Zou
b912da127d [functorch] Update jacrev to accept functions with pytree inputs and outputs (pytorch/functorch#297)
Test Plan:
- a lot of new tests
2022-07-21 13:41:12 -07:00
Kshiteej K
3deb38e68e [functorch] [batching] select_scatter (pytorch/functorch#289) 2022-07-21 13:41:12 -07:00
Kshiteej K
70e052a87e [functorch] [batching] isinf, isreal (pytorch/functorch#294) 2022-07-21 13:41:12 -07:00
Richard Zou
7f0d0fe53b [functorch] layer_norm batch rule (pytorch/functorch#293)
Test Plan:
- run tests
2022-07-21 13:41:12 -07:00
Richard Zou
5daececc91 [functorch] Fix CI 2022-07-21 13:41:12 -07:00
Richard Zou
e7b95307e4 [functorch] Fix functorch additional ops db
dtypesIfCPU -> dtypes, and dtypes is now required.
2022-07-21 13:41:12 -07:00
Richard Zou
1b33ea0d13 [functorch] OutOfPlacePlumbing now gets annotated with aten ops 2022-07-21 13:41:12 -07:00
Kshiteej K
fada7dd563 [functorch] [batching] index_copy (pytorch/functorch#282)
* [batching] index_copy

* undo circular pad xfail

* add back conv1d xfail

* support batching with decomposition

* update variable name

* remove incorrect inline on function
2022-07-21 13:41:12 -07:00
Kshiteej K
1a6d3cd0d4 [functorch] add missing undef (pytorch/functorch#291) 2022-07-21 13:41:12 -07:00
vfdev
7506e8b8aa [functorch] Added logical_and/or/xor vmaps to enable torch.pow (pytorch/functorch#286)
* Added logical_and/or/xor vmaps to enable torch.pow
Description:
- Added logical_and/or/xor vmaps to enable torch.pow
- Updated tests

* Removed xfails for logical_* and logit
2022-07-21 13:41:12 -07:00
vfdev
ecf5817ac9 [functorch] Fix method rename (pytorch/functorch#288)
sample_inputs_hardshrink_hardtanh -> sample_inputs_softshrink_hardshrink_hardtanh
by https://github.com/pytorch/pytorch/pull/68521
2022-07-21 13:41:12 -07:00
vfdev
99ed1b27e1 [functorch] Added adaptive_max_poolNd batch rule (pytorch/functorch#263)
* Added adaptive_max_poolNd fw/bw batch rules
Description:
- Added adaptive_max_poolNd fw/bw batch rules
- Updated tests

Related to pytorch/functorch#240

Notes:
I created two additional macros to handle adaptive_max_pool2d and adaptive_max_pool3d_backward.
Not sure if we could make a generic rule to handle max_pool2d_with_indices_backward_batch_rule and adaptive_max_pool3d_backward,
as max_pool2d_with_indices_backward_batch_rule requires some args in the middle between gradOutput, input and indices.

* Replaced EXISTING_BDIM_MULTIOUT by EXISTING_BDIM_ALL_BOXED

* Removed specific implementations with indices.contiguous() for
- max_pool2d_with_indices_backward
- adaptive_max_pool2d_backward
- adaptive_max_pool3d_backward
and added ALL_TENSORS_HAVE_OPTIONAL_BDIM_BOXED_CONTIG1 to handle that
2022-07-21 13:41:12 -07:00
vfdev
1f9c78cce7 [functorch] Removed some xfail for nn functional pad circular (pytorch/functorch#285) 2022-07-21 13:41:12 -07:00
Richard Zou
9e6a6f5d27 [functorch] copy batch rule (pytorch/functorch#278) 2022-07-21 13:41:12 -07:00
Richard Zou
907fc8822c [functorch] new_blah batch rules (pytorch/functorch#277) 2022-07-21 13:41:12 -07:00