<?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 MKL FFT on Iris Xe Graphics in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411382#M33581</link>
    <description>&lt;P&gt;Hi all.&lt;/P&gt;
&lt;P&gt;I'm using MKL (ver.&amp;nbsp;2019.4.245) programmatically to calculate FFT : by linking static .lib (mkl_core.lib, mkl_intel_lp64.lib, mkl_intel_thread.lib) into a VS 2019 C++&amp;nbsp; project.&lt;/P&gt;
&lt;P&gt;All worked fine comparing results with the FFT by Matlab on all PC with Intel processor (11th generation family) and Intel Graphics UHD Family.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Problem : running the same project on PC with Intel Iris Graphics Family, results are wrong: some output values are NaN (!) and only some values (the first) of original matrix columns are well processed.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;So that I moved to use last MKL : Intel oneAPI 2022.01 supposing new version supporting those Iris, but obtaining the same results as previous version of MKL.&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The C/C++ code is very simple:&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;void FourierTransform(_MKL_Complex8* l_pMklInputOutputData, // input vectors&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;int p_iNumberOfRow, // num rows&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;int p_iNumberOfCol) // num columns &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DFTI_DESCRIPTOR* l_pMklDftDescriptor=NULL;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DftiCreateDescriptor(&amp;amp;l_pMklDftDescriptor, DFTI_SINGLE, DFTI_COMPLEX, 1, (MKL_LONG)p_iNumberOfRow);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;float l_fRangeScaleFactor = (float)(1.0);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DftiSetValue(l_pMklDftDescriptor, DFTI_FORWARD_SCALE, l_fRangeScaleFactor);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DftiCommitDescriptor(l_pMklDftDescriptor);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;for(l_iCol = 0; l_iCol&amp;lt; p_iNumberOfCol;l_iCol++)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;_MKL_Complex8* l_pMklData = &amp;amp;l_pMklInputOutputData[l_iCol*p_iNumberOfRow];&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;// calculate FFT&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;l_ulResult = DftiComputeForward(l_pMklRangeDftDescriptor, l_pMklData, l_pMklData);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;... where&amp;nbsp;&lt;EM&gt;l_pMklInputOutputData is the input vector of complex data to manage, previously allocated and filled by FourierTransform caller.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Exiting from this method, the same vector will contain results of FFT by&amp;nbsp;DftiComputeForward one column at time.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;On all PC with Intel CPU the results are the same except on Hw with Intel Iris *** Graphics.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The question is : &lt;EM&gt;is FFT by MKL available on Intel Iris Graphics family too? If yes, what's the reason of those malformed output of FFT by the same project (MKL statically linked) on Intel Iris Graphics family with respect of all pc with different Intel Graphics card?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thanks in advance for the support and kindly responses.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2022 19:09:05 GMT</pubDate>
    <dc:creator>stemsc</dc:creator>
    <dc:date>2022-08-29T19:09:05Z</dc:date>
    <item>
      <title>MKL FFT on Iris Xe Graphics</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411382#M33581</link>
      <description>&lt;P&gt;Hi all.&lt;/P&gt;
&lt;P&gt;I'm using MKL (ver.&amp;nbsp;2019.4.245) programmatically to calculate FFT : by linking static .lib (mkl_core.lib, mkl_intel_lp64.lib, mkl_intel_thread.lib) into a VS 2019 C++&amp;nbsp; project.&lt;/P&gt;
&lt;P&gt;All worked fine comparing results with the FFT by Matlab on all PC with Intel processor (11th generation family) and Intel Graphics UHD Family.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Problem : running the same project on PC with Intel Iris Graphics Family, results are wrong: some output values are NaN (!) and only some values (the first) of original matrix columns are well processed.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;So that I moved to use last MKL : Intel oneAPI 2022.01 supposing new version supporting those Iris, but obtaining the same results as previous version of MKL.&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The C/C++ code is very simple:&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;void FourierTransform(_MKL_Complex8* l_pMklInputOutputData, // input vectors&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;int p_iNumberOfRow, // num rows&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;int p_iNumberOfCol) // num columns &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DFTI_DESCRIPTOR* l_pMklDftDescriptor=NULL;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DftiCreateDescriptor(&amp;amp;l_pMklDftDescriptor, DFTI_SINGLE, DFTI_COMPLEX, 1, (MKL_LONG)p_iNumberOfRow);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;float l_fRangeScaleFactor = (float)(1.0);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DftiSetValue(l_pMklDftDescriptor, DFTI_FORWARD_SCALE, l_fRangeScaleFactor);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DftiCommitDescriptor(l_pMklDftDescriptor);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;for(l_iCol = 0; l_iCol&amp;lt; p_iNumberOfCol;l_iCol++)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;_MKL_Complex8* l_pMklData = &amp;amp;l_pMklInputOutputData[l_iCol*p_iNumberOfRow];&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;// calculate FFT&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;l_ulResult = DftiComputeForward(l_pMklRangeDftDescriptor, l_pMklData, l_pMklData);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;... where&amp;nbsp;&lt;EM&gt;l_pMklInputOutputData is the input vector of complex data to manage, previously allocated and filled by FourierTransform caller.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Exiting from this method, the same vector will contain results of FFT by&amp;nbsp;DftiComputeForward one column at time.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;On all PC with Intel CPU the results are the same except on Hw with Intel Iris *** Graphics.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The question is : &lt;EM&gt;is FFT by MKL available on Intel Iris Graphics family too? If yes, what's the reason of those malformed output of FFT by the same project (MKL statically linked) on Intel Iris Graphics family with respect of all pc with different Intel Graphics card?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thanks in advance for the support and kindly responses.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 19:09:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411382#M33581</guid>
      <dc:creator>stemsc</dc:creator>
      <dc:date>2022-08-29T19:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT on Iris Xe Graphics</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411686#M33586</link>
      <description>&lt;P&gt;Update:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Found &lt;U&gt;working&lt;/U&gt; workaround is to separate input from output vector of FFT&lt;/STRONG&gt;, so that :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It works by changing :&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;l&lt;STRIKE&gt;_ulResult = DftiComputeForward(l_pMklRangeDftDescriptor, l_pMklData, &lt;STRONG&gt;l_pMklData&lt;/STRONG&gt;);&lt;/STRIKE&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;to :&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;EM class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;l_ulResult = DftiComputeForward(l_pMklRangeDftDescriptor, l_pMklData, &lt;STRONG&gt;l_pOutData&lt;/STRONG&gt;);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="sub_section_element_selectors"&gt;(where&amp;nbsp;&lt;EM&gt;l_pOutData&lt;/EM&gt; is a temporarely vector previously allocated like &lt;EM&gt;l_pMklData&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;That's change is needed only on PC with Intel Iris Graphics.&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;Maybe multithreading and parallel computation done by&amp;nbsp;DftiComputeForward is safe only if input and output vectors are differents? Maybe concurrency problems are present into&amp;nbsp;DftiComputeForward implementation running on PC with Intel Iris Gparhics?&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 15:11:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411686#M33586</guid>
      <dc:creator>stemsc</dc:creator>
      <dc:date>2022-08-30T15:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT on Iris Xe Graphics</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411715#M33587</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting on Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad to know that your issue is resolved and sharing the workaround with us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Shanmukh.SS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 05:07:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411715#M33587</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-09-01T05:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL FFT on Iris Xe Graphics</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411721#M33588</link>
      <description>&lt;P&gt;Thanks for your reply, but ....&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;My solution is proposed only as a workaround.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;I'm asking to Intel why that MKL API for FFT doesn't work on Intel Iris Graphics&lt;/U&gt;:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;is there an hidden advice to avoid using the same vector as input/output, advice not available on MKL specifications? or&lt;/LI&gt;
&lt;LI&gt;is a know bug of MKL FFT working on Intel Iris Graphics? or&lt;/LI&gt;
&lt;LI&gt;some particular configuration of MKL linking is required to use it on Intel Iris Graphics ?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My workaround don't fix an incorrect call of&amp;nbsp;&lt;EM class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;DftiComputeForward, &lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="sub_section_element_selectors"&gt;because any MKL specification disables capability to use the same vector as input/output.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:44:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-on-Iris-Xe-Graphics/m-p/1411721#M33588</guid>
      <dc:creator>stemsc</dc:creator>
      <dc:date>2022-08-30T17:44:34Z</dc:date>
    </item>
  </channel>
</rss>

