Search code examples
fftintel-mkl

Intel-MKL FFT performance for some conditions


I am currently using Intel's MKL 2D FFT routines.

I am running into a condition where the performance is changing by a factor of 4-5.

What I am doing is implementing a type of band pass filter using FFT libraries. The results of test are correct, but the speed is an issue.

What I am seeing is about 1.3 sec on the forward FFT and between 1.3 and 6 seconds on the inverse FFT.

I have tracked this down to the weights I am applying after the forward pass of the FFT. The weights are between 0 and -1, mostly 0 when I am getting the 6 seconds. If I set the weights to 1 before applying the time is 1.3 seconds. Other test show this kind of behavior without using weights of 1.

My questions is how can the values I am applying cause this kind of slow down? I could understand a minor change in execution time, but not this dramatic of a change.

Thanks, Jim K

I don't know if this is specific to the MKL version of the FFT or a general issue.


Solution

  • Some CPUs may require many more execution cycles to do floating point arithmetic operations using underflowed operands or when producing underflowed results.

    For your filter coefficients, you can try weights far far larger than zero (in relation to a value near an IEEE double or float underflowed number), and still have a filter with a better than -120 dB stopband. Try that.

    Some CPU and OS combinations might allow turning off underflowed floating point arithmetic or results. That may also help.