mmuckley / torchkbnufft

A high-level, easy-to-deploy non-uniform Fast Fourier Transform in PyTorch.
https://torchkbnufft.readthedocs.io/
MIT License
201 stars 44 forks source link

Turn off complex tensors completely #51

Open ajlok3 opened 2 years ago

ajlok3 commented 2 years ago

Since some features of pytorch are not yet supported for ComplexFloat tensors, it would be desirable to have a "switch" to turn off complex tensor completely (maybe in a different branch?).

My particular use case involves multi-GPU training with nccl backend. The error message I get is:

RuntimeError: Input tensor data type is not supported for NCCL process group: ComplexFloat

... and the complex tensors don't seem to come from my code but from within KbNUFFT object within the model.

mmuckley commented 2 years ago

Hello @ajlok3, I'm not sure this is possible with more recent versions of PyTorch - as you can see here there are no options for real-valued tensors. If you pass in something real-valued, the function will return something complex valued.

I assume that you are passing real-valued tensors into torchkbnufft where the last dimension is of size 2?

mmuckley commented 2 years ago

Also, could you let me know what version of PyTorch you're on? As you can see here on more recent versions there might be complex-valued NCCL support.

anjali411 commented 2 years ago

cc. @rohan-varma