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

why mkl can not get fft(x,1)? #237

Closed
liushang0322 opened this issue May 11, 2022 · 2 comments
Closed

why mkl can not get fft(x,1)? #237

liushang0322 opened this issue May 11, 2022 · 2 comments

Comments

@liushang0322
Copy link

please first create a random matrix x = rand(100,100,100) and then call the FFTW library. If you use FFTW.set_provider!("mkl") and then fft(x,1), it will report an error. What is the reason?

i always get ERROR: FFTW could not create plan

@tkuraku
Copy link

tkuraku commented Sep 15, 2022

It looks like it cannot do fft along a given axis for arrays with more than two dimensions. Seems like either a major regression or some missing functionality.

import FFTW

# %% Works perfectly
a = ones(Float64, 64, 64);
iffta = FFTW.fft(a, 1)

# %% ERROR: FFTW could not create plan 
b = ones(Float64, 64, 64, 64);
iffta = FFTW.fft(b, 1)

@stevengj
Copy link
Member

stevengj commented Sep 15, 2022

This is a documented and longstanding limitation of MKL, which does not support the full functionality of FFTW. See the fourth bullet point in Intel's list of unsupported features:

image

That is, it can't handle multiple nested loops of FFTs, only a single loop of FFTs. A workaround for the first or last dimensions would be to reshape the array to group the other dimensions together, in which case it can handle it, but it still won't be able to transform the middle dimension.

Or you could just use FFTW.

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