- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks,
Rahul Modi.
This is regarding the comparison of Direct Mode vs FFT mode for Multi-dimensional convolutions in terms of performance. My expectation was that the FFT mode should be faster than direct mode, but it turned out to be the other way for my test cases.
I tested all modes for 2-dimensional convolution of a 256 x 256 matrix with a 5 x 5 kernel
Approximate runtime (averaged over 1000 runs) was
DIRECT mode: 2.4 ms
FFT mode: 9.5 ms
AUTO mode: 9.5 ms
I was surprised by the slower run time of FFT mode.Any insight regarding performance of Intel MKL convolution routines will be helpful.
Thanks,
Rahul Modi.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Teoretically direct mode is faster then FFT mode for kernels less then 7*7but actuallycut-off pointdepends to performance of FFT mode and direct mode which depend to MKL version andhardaware.
Victor
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rahul,
Which MKL release and Intel processordo you use?
FFT mode vs. DIRECT mode:
FFT mode hasoverhead, soexecution time of FFT modecan be bigger then execution time of direct mode for "small" problem. This overhead depends to hardware, MKL version and sizes of problem.
Victor.
Which MKL release and Intel processordo you use?
FFT mode vs. DIRECT mode:
FFT mode hasoverhead, soexecution time of FFT modecan be bigger then execution time of direct mode for "small" problem. This overhead depends to hardware, MKL version and sizes of problem.
Victor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Victor,
Thanks again for your prompt reply.
I am using MKL ver 10.3 Update 8 release and I am using an Intel core i7-2600K CPU @ 3.4 GHz
Currently I have MKL configured to run in the sequential mode.
So do you suggest using direct mode for smaller problems?
As for more on the test problem, I had a simple 256*256 input array
0 1 2 . . . . 255
256 257 ... ... ... ... 511
...
...
65280 ... ... ... ... 65535
Ans this array is convolved with a 5*5 kernel
-1, -0.5,
0, 0.5,
1,
-1.5, -0.75,
0,
0.75, 1.5,
-2,
-1,
0,
1, 2,
-1.5,
-0.75,
0, 0.75, 1.5,
-1,
-0.5,
0, 0.5, 1,
-1,
-0.5,
0,
0.5,
1 Thanks for all your help.
Best,
Rahul Modi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Teoretically direct mode is faster then FFT mode for kernels less then 7*7but actuallycut-off pointdepends to performance of FFT mode and direct mode which depend to MKL version andhardaware.
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, that helps
-Rahul

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page