
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does MKL's automatic download work for FFTs?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear divakar@umich.edu,
MKL on its own does not offload any FFT computation to the coprocessor.
However, if you write in C, it is OK to call MKL FFTs inside compound statements preceeded with #pragma offload -- such FFT calls will be executed on the coprocessor.
Please see the MIC MKL examples in C and FORTRAN in your MKL distribution.
The automatic offload feature is supported only by MKL BLAS and LAPACK.
Thank you.
Evgueni.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to compile the example file complex_dft_1d.c using the following command line:
icc -O3 -mkl -openmp -std=c99 complex_dft_1d.c
I got the error messages below. What are the right options to icc?
complex_dft_1d.c(100): error: function "DftiCreateDescriptor_s_1d" called in offload region must have been declared with compatible "target" attribute
status = DftiCreateDescriptor(&hand,
^
complex_dft_1d.c(100): error: function "DftiCreateDescriptor_s_md" called in offload region must have been declared with compatible "target" attribute
status = DftiCreateDescriptor(&hand,
^
complex_dft_1d.c(100): error: function "DftiCreateDescriptor_d_1d" called in offload region must have been declared with compatible "target" attribute
status = DftiCreateDescriptor(&hand,
^
complex_dft_1d.c(100): error: function "DftiCreateDescriptor_d_md" called in offload region must have been declared with compatible "target" attribute
status = DftiCreateDescriptor(&hand,
^
complex_dft_1d.c(100): error: function "DftiCreateDescriptor" called in offload region must have been declared with compatible "target" attribute
status = DftiCreateDescriptor(&hand,
^
complex_dft_1d.c(105): error: function "DftiCommitDescriptor" called in offload region must have been declared with compatible "target" attribute
status = DftiCommitDescriptor(hand);
^
complex_dft_1d.c(159): error: function "DftiComputeForward" called in offload region must have been declared with compatible "target" attribute
status = DftiComputeForward(hand, x);
^
complex_dft_1d.c(188): error: function "DftiFreeDescriptor" called in offload region must have been declared with compatible "target" attribute
DftiFreeDescriptor(&hand);
^
complex_dft_1d.c(218): error: function "DftiGetValue" called in offload region must have been declared with compatible "target" attribute
DftiGetValue(0, DFTI_VERSION, version);
^
compilation aborted for complex_dft_1d.c (code 2)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like -offload-attribute-target=mic does the trick. I was able to build and test with the following command line:
icc -offload-attribute-target=mic -O3 -openmp -std=c99 -mkl=parallel complex_dft_1d.c

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