<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Excessive memory allocation in DftiCommitDescriptor() in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Excessive-memory-allocation-in-DftiCommitDescriptor/m-p/957502#M15587</link>
    <description>&lt;P&gt;Hi everyone!&lt;/P&gt;

&lt;P&gt;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.&lt;/P&gt;

&lt;P&gt;My version of Intel MKL is&amp;nbsp;11.0.5 Build 20130612 for Linux x86_64.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;On average allocated memory 2000 MB and 5600 MB.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;What could be the reason?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Sample code:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;
class getSpectrum : public computeModule
{
    DFTI_DESCRIPTOR_HANDLE fft_handle;
    quint32 fft_size;

    void initDescriptor()
    {        
        DftiCreateDescriptor(&amp;amp;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&amp;lt;Ipp32f&amp;gt; &amp;amp;data);
    void releaseData() { }

    virtual ~getSpectrum()
    {
        DftiFreeDescriptor(&amp;amp;fft_handle);
    }

};

void getSpectrum::handleData(ipp_vector&amp;lt;Ipp32f&amp;gt; &amp;amp;data)
{
    if(data.empty()) return;

    if(data.size() != fft_size)
    {
        fft_size = data.size();

        DftiFreeDescriptor(&amp;amp;fft_handle);
        initDescriptor();
    }

    DftiComputeForward(fft_handle, data.data());
}&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2014 09:35:52 GMT</pubDate>
    <dc:creator>Ildar_S_</dc:creator>
    <dc:date>2014-03-24T09:35:52Z</dc:date>
    <item>
      <title>Excessive memory allocation in DftiCommitDescriptor()</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Excessive-memory-allocation-in-DftiCommitDescriptor/m-p/957502#M15587</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;

&lt;P&gt;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.&lt;/P&gt;

&lt;P&gt;My version of Intel MKL is&amp;nbsp;11.0.5 Build 20130612 for Linux x86_64.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;On average allocated memory 2000 MB and 5600 MB.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;What could be the reason?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Sample code:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;
class getSpectrum : public computeModule
{
    DFTI_DESCRIPTOR_HANDLE fft_handle;
    quint32 fft_size;

    void initDescriptor()
    {        
        DftiCreateDescriptor(&amp;amp;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&amp;lt;Ipp32f&amp;gt; &amp;amp;data);
    void releaseData() { }

    virtual ~getSpectrum()
    {
        DftiFreeDescriptor(&amp;amp;fft_handle);
    }

};

void getSpectrum::handleData(ipp_vector&amp;lt;Ipp32f&amp;gt; &amp;amp;data)
{
    if(data.empty()) return;

    if(data.size() != fft_size)
    {
        fft_size = data.size();

        DftiFreeDescriptor(&amp;amp;fft_handle);
        initDescriptor();
    }

    DftiComputeForward(fft_handle, data.data());
}&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 09:35:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Excessive-memory-allocation-in-DftiCommitDescriptor/m-p/957502#M15587</guid>
      <dc:creator>Ildar_S_</dc:creator>
      <dc:date>2014-03-24T09:35:52Z</dc:date>
    </item>
    <item>
      <title>In MKL version 11.1.2 (build</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Excessive-memory-allocation-in-DftiCommitDescriptor/m-p/957503#M15588</link>
      <description>&lt;P&gt;&lt;SPAN style="color: rgb(34, 34, 34); font-family: Arial, sans-serif; font-size: 14px; line-height: 18px; white-space: pre-wrap; background-color: rgb(252, 252, 252);"&gt;In MKL version 11.1.2 (build 20140122) problem as well .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 10:36:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Excessive-memory-allocation-in-DftiCommitDescriptor/m-p/957503#M15588</guid>
      <dc:creator>Ildar_S_</dc:creator>
      <dc:date>2014-03-24T10:36:41Z</dc:date>
    </item>
    <item>
      <title>Dear Ildar S,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Excessive-memory-allocation-in-DftiCommitDescriptor/m-p/957504#M15589</link>
      <description>&lt;P&gt;Dear Ildar S,&lt;/P&gt;

&lt;P&gt;All implementations of Fourier transforms (including MKL) are optimized for lengths that are products of small prime numbers.&lt;/P&gt;

&lt;P&gt;MKL DFTI&amp;nbsp;may behave suboptimally for lengths containing large prime factors (e.g. you tried 62511253=7*8930179, etc.)&lt;/P&gt;

&lt;P&gt;You may contact Intel Premier Support in order to escalate your issue.&lt;/P&gt;

&lt;P&gt;Thank you for trying Intel MKL.&lt;/P&gt;

&lt;P&gt;Evgueni.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 03:14:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Excessive-memory-allocation-in-DftiCommitDescriptor/m-p/957504#M15589</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2014-03-27T03:14:40Z</dc:date>
    </item>
  </channel>
</rss>

