Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

speed of MKL convolution & correlation

wyc
Débutant
1 036 Visites
I'm trying to measure the speed of convolution/correlation in MKL and getting a result which seems to be too low: 0.5 gigaflop.

I'm computing the correlation of a short sequence (n=16) with a long sequence (m=8016) in single precision. I force MKL to use MODE_DIRECT. Using MODE_DIRECT, the op count should be 2*m*n. I do 8000 such correlations and measure the overall time, so time quantization is not an issue.

I seem to be getting the correct answer, so I'm not grossly misusing the function calls.

Does anyone have an idea what the problem could be, or have sample code where they measure speed of convolution/correlations?
0 Compliments
3 Réponses
Yevgeny_Latkin__Inte
1 036 Visites

The direct convolution/correlation code for IA32shipped with MKL 8.0 and 8.0.1isn't very fast. We are currently working on this performance issue.

As a workaround, I would recommend using MODE_FFT or MODE_AUTO to involve the Fourier algorithm whichmustprovide better performance.

0 Compliments
wyc
Débutant
1 036 Visites
Can you estimate how fast the correlation/convolution should be when it is implemented? I thought convolution was a perfect example of an algorithm which would work well out of cache (assuming that the shorter vector is small).
0 Compliments
Yevgeny_Latkin__Inte
1 036 Visites

Sorry; I cannot make a commitment about future MKL releases.

But,we could probably pay more attention to the use-case which you mention -- filtering longer data samples with a very short sequence. Currently, performance looks better for a longer filter, like n=100 and above.

Besides, did you try signal processing (FIR) functions from the Intel IPP library?

0 Compliments
Répondre