<?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 Re: Re:MKL’s vdsin is slower than the intrinsic sin? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1375094#M32979</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;Shanmukh.SS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The file is attached. &lt;/SPAN&gt;&lt;SPAN&gt;Please unzip it and open the sln file and build and run.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;there two functions, f uses the intrinsic sin function, f2 usues MKL's vdsin.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It seems function f is about 2X faster than vdsin, at least on my laptop Thinkpad P72 with Xeon-2186m.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If there are any news please let me know.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you very much indeed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rong&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 06:32:48 GMT</pubDate>
    <dc:creator>CRquantum</dc:creator>
    <dc:date>2022-04-07T06:32:48Z</dc:date>
    <item>
      <title>MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374155#M32964</link>
      <description>&lt;P&gt;I use Intel OneAPI 2022.0.3, linked with Intel MKL cluster library as below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CRquantum_0-1649096179193.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/28232i9921CF3E08551D26/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="CRquantum_0-1649096179193.png" alt="CRquantum_0-1649096179193.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a simple code as below,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;!include "_rms.fi"
program avx
implicit none
!include "mkl_vml.f90"
integer, parameter :: dp = kind(0.d0)
real(dp) :: t1, t2, r

call cpu_time(t1)
r = f(100000000)
call cpu_time(t2)

print *, "Time", t2-t1
print *, r

contains

    real(dp) function f(N) result(r)
    integer, intent(in) :: N
    integer :: i
    real(dp) :: j(N)   
    call vdsin(N,(dble([(i,i=1,N)])),j)  
    r = sum(j)   
    !r = sum(sin(dble([(i,i=1,N)])))
    return
    end function

end program&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I&amp;nbsp; found that using MKL's&amp;nbsp;vdsin is 2 times slower than simply using sin.&lt;/P&gt;
&lt;P&gt;I mean, if I do&lt;/P&gt;
&lt;PRE class="codeblock-buttons"&gt;&lt;CODE class="hljs sql"&gt;r &lt;SPAN class="hljs-operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;sum&lt;/SPAN&gt;(&lt;SPAN class="hljs-built_in"&gt;sin&lt;/SPAN&gt;(dble([(i,i&lt;SPAN class="hljs-operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;,N)])))
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it is two times faster than using MKL’s vdsin as below&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE class="codeblock-buttons"&gt;&lt;CODE class="hljs sql"&gt;    &lt;SPAN class="hljs-keyword"&gt;call&lt;/SPAN&gt; vdsin(N,(dble([(i,i&lt;SPAN class="hljs-operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;,N)])),j)
    r &lt;SPAN class="hljs-operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;sum&lt;/SPAN&gt;(j)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know why MKL's vdsin is slower than the intrinsic sin? Or how to correctly use MKL's vdsin or MKL in general?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks much in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS.&lt;/P&gt;
&lt;P&gt;A similar post is here below too,&lt;/P&gt;
&lt;P&gt;&lt;A href="https://fortran-lang.discourse.group/t/why-mkls-vdsin-is-slower-than-the-intrinsic-sin/3108/3" target="_blank" rel="noopener"&gt;https://fortran-lang.discourse.group/t/why-mkls-vdsin-is-slower-than-the-intrinsic-sin/3108/3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 18:25:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374155#M32964</guid>
      <dc:creator>CRquantum</dc:creator>
      <dc:date>2022-04-04T18:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374209#M32965</link>
      <description>&lt;P&gt;I'm moving this over to the MKL Forum. They will be able to help you better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 21:25:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374209#M32965</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2022-04-04T21:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374297#M32966</link>
      <description>&lt;P&gt;OK, thank you Barbara.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 04:24:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374297#M32966</guid>
      <dc:creator>CRquantum</dc:creator>
      <dc:date>2022-04-05T04:24:06Z</dc:date>
    </item>
    <item>
      <title>Re:MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374887#M32976</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting on Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;Does anyone know why MKL's vdsin is slower than the intrinsic sin?&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would like to recommend you to try compiling and running the code using oneAPI command prompt and check if issue persists. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In addition, We are facing unhandled exception while running the shared code (Attached the screenshot for your reference). Could you please share us the Visual Studio project file of the sample project code you are using, so that it would help us in analyzing the issue better.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Apr 2022 16:07:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1374887#M32976</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-04-06T16:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1375094#M32979</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;Shanmukh.SS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The file is attached. &lt;/SPAN&gt;&lt;SPAN&gt;Please unzip it and open the sln file and build and run.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;there two functions, f uses the intrinsic sin function, f2 usues MKL's vdsin.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It seems function f is about 2X faster than vdsin, at least on my laptop Thinkpad P72 with Xeon-2186m.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If there are any news please let me know.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you very much indeed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rong&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 06:32:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1375094#M32979</guid>
      <dc:creator>CRquantum</dc:creator>
      <dc:date>2022-04-07T06:32:48Z</dc:date>
    </item>
    <item>
      <title>Re:MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1377096#M33030</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for sharing the project file and necessary steps. We are working on your issue internally. We will get back to you soon with an update.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Apr 2022 12:00:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1377096#M33030</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-04-14T12:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1377770#M33042</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try running the code once again by turning off all optimizations and check if any performance improvement in vdsin, as we have seen performance increase in vdsin after disabling optimizations.&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;</description>
      <pubDate>Mon, 18 Apr 2022 11:25:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1377770#M33042</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-04-18T11:25:42Z</dc:date>
    </item>
    <item>
      <title>Re:MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1379516#M33069</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Reminder:&lt;/P&gt;&lt;P&gt;Has the solution provided helped? Is your issue resolved? Could you please let us know if we could close this thread at our end.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Apr 2022 13:08:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1379516#M33069</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-04-25T13:08:55Z</dc:date>
    </item>
    <item>
      <title>Re:MKL’s vdsin is slower than the intrinsic sin?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1381139#M33100</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We assume that your issue is resolved. 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;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 May 2022 07:01:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-s-vdsin-is-slower-than-the-intrinsic-sin/m-p/1381139#M33100</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-05-02T07:01:13Z</dc:date>
    </item>
  </channel>
</rss>

