Commit Graph

8 Commits

Author SHA1 Message Date
PyTorch MergeBot
0ddabe56ad Revert "Move RefInfo classes into opinfo.refs (#83563)"
This reverts commit 03ce36e3c1.

Reverted https://github.com/pytorch/pytorch/pull/83563 on behalf of https://github.com/peterbell10 due to Stack broke lint
2022-08-19 02:21:40 +00:00
PyTorch MergeBot
c8730d0a2f Revert "Move torch.linalg opinfos to opinfo.definitions (1/2) (#83547)"
This reverts commit bb86c31e26.

Reverted https://github.com/pytorch/pytorch/pull/83547 on behalf of https://github.com/peterbell10 due to Stack broke lint
2022-08-19 02:18:23 +00:00
PyTorch MergeBot
393137e13f Revert "Move torch.linalg opinfos to opinfo.definitions (2/2) (#83554)"
This reverts commit 1f2efdce15.

Reverted https://github.com/pytorch/pytorch/pull/83554 on behalf of https://github.com/peterbell10 due to Stack broke lint
2022-08-19 02:14:42 +00:00
Peter Bell
1f2efdce15 Move torch.linalg opinfos to opinfo.definitions (2/2) (#83554)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83554
Approved by: https://github.com/albanD
2022-08-19 01:49:48 +00:00
Peter Bell
bb86c31e26 Move torch.linalg opinfos to opinfo.definitions (1/2) (#83547)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83547
Approved by: https://github.com/albanD
2022-08-19 01:49:48 +00:00
Peter Bell
03ce36e3c1 Move RefInfo classes into opinfo.refs (#83563)
Given that there is already a clear `op_db`, `python_ref_db` split I
think it makes sense to have the `RefInfo` classes be defined in a
different file.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83563
Approved by: https://github.com/albanD
2022-08-19 01:49:47 +00:00
Peter Bell
b1e02ae8fc Move PythonRefInfos for torch.fft into opinfo.definitions (#83277)
Ref #82518

The moves `python_ref_db` entries for `torch.fft` into
`opinfo/definitions/fft.py`.

I ran into a problem with `_find_referenced_opinfo` since it's called
at init time for the module, yet relies on the completed op_db list.
This PR fixes the circular dependency by explicitly passing in an
op_db argument which can point to only the locally defined `op_db`.

An alternative solution would be to have a different folder for the
`op_db` and the `python_ref_db` definitions. However that would mean
losing the convenience of having closely related opinfos be in the
same file.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83277
Approved by: https://github.com/albanD
2022-08-17 18:50:58 +00:00
Peter Bell
5f50289b39 Move OpInfos for torch.fft into opinfo.definitions (#83276)
Ref #82518

This moves the `op_db` entries into `opinfo/definitions/fft.py` and
also appends them to `common_methods_invocations.op_db` so existing
users are unaffected by this change.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83276
Approved by: https://github.com/albanD
2022-08-17 18:50:58 +00:00