Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch FFT changes #3

Open
saugatkandel opened this issue Sep 3, 2021 · 4 comments
Open

Pytorch FFT changes #3

saugatkandel opened this issue Sep 3, 2021 · 4 comments

Comments

@saugatkandel
Copy link
Collaborator

Starting in Pytorch 1.8, torch.fft is a module and not a function. So the FFT calls are now similar to that for numpy.

See:
https://pytorch.org/blog/the-torch.fft-module-accelerated-fast-fourier-transforms-with-autograd-in-pyTorch/

I think the "adorym/adorym/wrappers.py" is the only file affected. Anywhere else?

@mdw771
Copy link
Owner

mdw771 commented Sep 3, 2021

Yes, all usage of torch.fft should be through the wrapper.
Also @saugatkandel in case you are interested in expanding Adorym, I've invited you as a collaborator. With that, when you find it necessary, you'll have control on accepting pull requests etc. for this repository.

@saugatkandel
Copy link
Collaborator Author

Pytorch even supports complex numbers natively now, so it looks like a lot of operations could be simplified now. I will try this out as well.

@tcpekin
Copy link
Contributor

tcpekin commented Oct 27, 2022

I think I've done the switch to complex numbers... at least for ptychography. I'm in the testing phase now. The master branch on my fork has the simple FFT conversion, while my dev is (I think) almost fully converted to complex numbers, and works. This generally gives me a pretty decent speed boost as well.

@mdw771
Copy link
Owner

mdw771 commented Oct 27, 2022

Thanks @tcpekin. If you would like to, please feel free to submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants