Commit Graph

28 Commits

Author SHA1 Message Date
Eli Uriegas
93aef3a010 Use presence of _symint in kernel name to generate symint sig or not (#84579)
Something people found confusing was that whether or not a native::
signature would get SymInt or not in its type was based on the dispatch
key.  This changes it so that SymInt or not in type is based on whether
or not you have _symint in the name of the kernel or not.  This means
that even when we make operators support SymInt, you no longer have to
go and update all the preexisting definitions; instead, you now
selectively write _symint to opt individual kernels into SymInt support.

I then go and update a bunch of kernels that don't have proper SymInt
support to make use of this convention.  There is some hacking around
for view generation code.

I also add support for external backends to specify 'symint' operators, for which we generate SymInt signatures instead of regular signatures.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Differential Revision: [D39310060](https://our.internmc.facebook.com/intern/diff/D39310060)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84579
Approved by: https://github.com/wconstab
2022-09-09 18:31:56 +00:00
Zachary DeVito
d7cebab7d8 Merge torchdim into functorch build (#82454)
This moves first-class dimensions, as prototyped in https://github.com/facebookresearch/torchdim
into the functorch build. This makes them availiable for use in PrimTorch more easily.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82454
Approved by: https://github.com/ezyang, https://github.com/zou3519
2022-08-08 17:07:59 +00:00
PyTorch MergeBot
d3e7d09ebe Revert "Merge torchdim into functorch build (#82454)"
This reverts commit 23b90044da.

Reverted https://github.com/pytorch/pytorch/pull/82454 on behalf of https://github.com/zengk95 due to this is breaking mac jobs on trunk 23b90044da
2022-08-03 02:15:08 +00:00
Zachary DeVito
23b90044da Merge torchdim into functorch build (#82454)
This moves first-class dimensions, as prototyped in https://github.com/facebookresearch/torchdim
into the functorch build. This makes them availiable for use in PrimTorch more easily.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82454
Approved by: https://github.com/ezyang, https://github.com/zou3519
2022-08-03 00:15:37 +00:00
Richard Zou
c4eafb0569 [functorch] Bump functorch mininum PyTorch version
PyTorch nightlies are on 1.13; our setup.py should match.
2022-07-21 13:41:37 -07:00
Richard Zou
e4da6e15aa [functorch] Revert "[release] Set up CI for release/0.2 (pytorch/functorch#830)"
This reverts commit 4edf2199a8113be2196994c81d8358aaa5b5e27b.
2022-07-21 13:41:34 -07:00
Richard Zou
8f18d6da34 [functorch] [release] Set up CI for release/0.2 (pytorch/functorch#830)
Test Plan:
- wait for CI
2022-07-21 13:41:34 -07:00
Richard Zou
505f8ef06d [functorch] Remove erroneous -g from opt build 2022-07-21 13:41:29 -07:00
Richard Zou
962b566370 [functorch] Fix visibility macros (pytorch/functorch#698)
Previously we were using TORCH_API, which doesn't actually mean much for
us because it is always set to import (windows) or default visibility
(gnu). This PR changes it so that FUNCTORCH_API is set to export/import
(windows) correctly.
2022-07-21 13:41:29 -07:00
Richard Zou
db4d0500f9 [functorch] Fix strict-prototypes handling for Windows 2022-07-21 13:41:29 -07:00
Zachary DeVito
b7bc52b618 [functorch] Cleanup warnings (pytorch/functorch#562) 2022-07-21 13:41:24 -07:00
Richard Zou
10e383b907 [functorch] Excise prototype mentions (pytorch/functorch#478) 2022-07-21 13:41:21 -07:00
Horace He
89443f4ac1 [functorch] Fixed some test cases/added some easy batching rules (pytorch/functorch#416)
* Fixed some test cases/added some easy batching rules

* Added debug_compile to simplify flow for minimizing graphs

* test flake

* fixed stuff hopefully

* fix poisson test

* fixed some more

* fix matrix_H

* cleaned more stuff up

* fixed gelu

* last one?
2022-07-21 13:41:20 -07:00
vfdev
d9125de7b4 [functorch] Fixes flake8 2022-07-21 13:41:20 -07:00
Stas Bekman
07679ac656 [functorch] [requirements] missing networkx (pytorch/functorch#403)
* [requirements] missing networkx

trying the examples it requires `networkx`

* switch to extras

* Update README.md

* Update README.md

Co-authored-by: Horace He <horacehe2007@yahoo.com>
2022-07-21 13:41:20 -07:00
Richard Zou
9ad55a212b [functorch] Fix setup.py, hopefully to work on windows
'-Wno-array-bounds' was doing nothing because we don't have -Werror
turned on
2022-07-21 13:41:15 -07:00
vfdev
8823ad8401 [functorch] Update setup.py (pytorch/functorch#223) 2022-07-21 13:41:08 -07:00
Richard Zou
bafdc5d9f9 [functorch] Turn -Werror off 2022-07-21 13:41:04 -07:00
vfdev
5237b85e3d [functorch] Ported _reshape_alias to the new API (pytorch/functorch#130)
* Ported _reshape_alias to the new API

* Updated implementation and using SmallBuffer instead std::vector
2022-07-21 13:41:04 -07:00
Richard Zou
051b24d478 [functorch] Turn on -Werror
So that importing internally becomes easier. Also prevent UB because C++
compiler warnings are usually relevant.
2022-07-21 13:41:04 -07:00
Richard Zou
abc520f804 [functorch] Update dependency (pytorch/functorch#58) 2022-07-21 13:40:57 -07:00
Richard Zou
c446037aa4 [functorch] Add LICENSE headers to code files 2022-07-21 13:40:54 -07:00
Richard Zou
7ddbbc392f [functorch] Enable colors in build log 2022-07-21 13:40:54 -07:00
Richard Zou
2910423017 [functorch] Update some version numbers" 2022-07-21 13:40:53 -07:00
Richard Zou
7001a2f1e4 [functorch] Update README, setup.py 2022-07-21 13:40:50 -07:00
Richard Zou
985b35c23d [functorch] new_blah hack 2022-07-21 13:40:50 -07:00
Richard Zou
8201dfc2d5 [functorch] Various bug fixes; new BR api 2022-07-21 13:40:50 -07:00
Richard Zou
93888a3779 [functorch] a lot of files 2022-07-21 13:40:50 -07:00