facebookresearch / fastMRI

A large-scale dataset of both raw MRI measurements and clinical MRI images.
https://fastmri.org
MIT License
1.34k stars 373 forks source link

Issues with torch.fft #20

Closed akshaysc closed 5 years ago

akshaysc commented 5 years ago

I tried running some sample code in the provided Jupyter notebook, but keep getting an error "RuntimeError: fft: ATen not compiled with MKL support" on the torch.fft operator.

A GPU is visible to torch (torch.cuda.current_device() = 0). The requirements.txt file had issues finding the appropriate mkl-fft package (both using pip and conda install) and some relevant packages in my virtual environment are:

cudnn = 7.6.0 mkl = 2019.4 mkl_fft = 1.0.12 mkl_random = 1.0.2 python = 3.6.9 torchvision = 0.2.1

Any help would be much appreciated!

anuroopsriram commented 5 years ago

The jupyter notebook runs everything on CPU. If you want to run on GPU, you can move the tensors to GPU by calling x.cuda() where x is the tensor that you want to move. This should solve your problem.

If you need to run on the CPU, you need to install MKL. Check out: https://discuss.pytorch.org/t/error-using-fft-runtimeerror-fft-aten-not-compiled-with-mkl-support/21671

akshaysc commented 5 years ago

Ah perfect, I was inadvertently moving my tensors to the CPU and not the GPU. Thanks.