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