MKL's automatic download for FFTs

MKL's automatic download for FFTs

Does MKL's automatic download work for FFTs?

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

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)

 

 

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 

Leave a Comment

Please sign in to add a comment. Not a member? Join today