You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed Intel Python on Windows 10, the version of mkl_fft is 1.3.0 and it is package py37h5a85a7c_0.
If one does a 2D FFT on a ndim=3 array, the resulting computation takes much longer than doing the same 2D FFT on an ndim=2 array. For example:
In [1]: import numpy as np, mkl_fft
In [2]: a = np.ones((4096,4096), dtype=np.complex128)
In [3]: %timeit b = mkl_fft.fftn(a, axes=(0, 1))
183 ms ± 3.26 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
In [4]: b = np.ones((1, 4096,4096), dtype=np.complex128)
In [5]: %timeit c = mkl_fft.fftn(b, axes=(1, 2))
354 ms ± 13.2 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
I believe that what is happening is that any time one feeds in a 3d array, all of the multi-threading turns off and you get the performance of a single-threaded computation.
This can not be the intended behavior. It's 2021 and the MKL has one of the finest FFT algorithms on the planet. It has got to be better than this in Intel's Python distribution.
The above behavior also occurs in Anaconda's python distribution which is where I discovered the problem originally but I switched to ipd to verify.
The text was updated successfully, but these errors were encountered:
I installed Intel Python on Windows 10, the version of mkl_fft is 1.3.0 and it is package py37h5a85a7c_0.
If one does a 2D FFT on a ndim=3 array, the resulting computation takes much longer than doing the same 2D FFT on an ndim=2 array. For example:
I believe that what is happening is that any time one feeds in a 3d array, all of the multi-threading turns off and you get the performance of a single-threaded computation.
This can not be the intended behavior. It's 2021 and the MKL has one of the finest FFT algorithms on the planet. It has got to be better than this in Intel's Python distribution.
The above behavior also occurs in Anaconda's python distribution which is where I discovered the problem originally but I switched to ipd to verify.
The text was updated successfully, but these errors were encountered: