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

Excessive memory allocation in DftiCommitDescriptor()

Ildar_S_
Beginner
12,118 Views

Hi everyone!

When designing your project, I was faced with the problem of excessive memory allocation. In the course of the analysis found that the function DftiCommitDescriptor in the implementation process allocates a lot of memory. In the attachment I have attached a summary table of the time of execution of this function.

My version of Intel MKL is 11.0.5 Build 20130612 for Linux x86_64. On average allocated memory 2000 MB and 5600 MB. 

What could be the reason?

Sample code:

class getSpectrum : public computeModule
{
    DFTI_DESCRIPTOR_HANDLE fft_handle;
    quint32 fft_size;

    void initDescriptor()
    {        
        DftiCreateDescriptor(&fft_handle, DFTI_SINGLE, DFTI_REAL, 1, fft_size);
        DftiCommitDescriptor(fft_handle);
    }

public:
    getSpectrum() : fft_size(c_Basic_freq/2)
    {
        initDescriptor();
    }

    void handleData(ipp_vector<Ipp32f> &data);
    void releaseData() { }

    virtual ~getSpectrum()
    {
        DftiFreeDescriptor(&fft_handle);
    }

};

void getSpectrum::handleData(ipp_vector<Ipp32f> &data)
{
    if(data.empty()) return;

    if(data.size() != fft_size)
    {
        fft_size = data.size();

        DftiFreeDescriptor(&fft_handle);
        initDescriptor();
    }

    DftiComputeForward(fft_handle, data.data());
}

Thanks!

0 Kudos
2 Replies
Ildar_S_
Beginner
12,118 Views

In MKL version 11.1.2 (build 20140122) problem as well .

0 Kudos
Evgueni_P_Intel
Employee
12,118 Views

Dear Ildar S,

All implementations of Fourier transforms (including MKL) are optimized for lengths that are products of small prime numbers.

MKL DFTI may behave suboptimally for lengths containing large prime factors (e.g. you tried 62511253=7*8930179, etc.)

You may contact Intel Premier Support in order to escalate your issue.

Thank you for trying Intel MKL.

Evgueni.

0 Kudos
Reply