<?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: Simple vs CBLAS Matrix-Matrix Multiplication in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870985#M8478</link>
    <description>&lt;P&gt;It's not clear to me what you mean by "error". Certainly one way to measure the error would be to convert the single precision array to a double precision array and run dgemm, and then check the results of MKL sgemm against the double precision values. Since MKL BLAS functions are tested with the standard xBLATn tests, and pass those, I would be surprised if the test I just suggested would show anything surprising. In xBLATn, x is the precision (in this case S) and n is the level of the BLAS, in this case 3.&lt;/P&gt;
&lt;P&gt;Please clarify how you measured the error. Using the "simple" case is not an adequate test since you do not know its properties.&lt;/P&gt;
&lt;P&gt;Bruce&lt;/P&gt;</description>
    <pubDate>Wed, 23 May 2007 23:50:30 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2007-05-23T23:50:30Z</dc:date>
    <item>
      <title>Simple vs CBLAS Matrix-Matrix Multiplication</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870982#M8475</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;using the evaluation version of the MKL, i have tested the accuracy of the matrix - matrix multiplication results of the sgemmby comparing them with the "simple" matrix - matrix multiplication. Simple here means:&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;float&lt;/FONT&gt; sum;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;for&lt;/FONT&gt; (&lt;FONT color="#0000ff"&gt;unsigned&lt;/FONT&gt; &lt;FONT color="#0000ff"&gt;int&lt;/FONT&gt; i = 0; i &amp;lt; hA; ++i){&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;for&lt;/FONT&gt; (&lt;FONT color="#0000ff"&gt;unsigned&lt;/FONT&gt; &lt;FONT color="#0000ff"&gt;int&lt;/FONT&gt; j = 0; j &amp;lt; wB; ++j) {&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt; sum = 0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt; for&lt;/FONT&gt; (&lt;FONT color="#0000ff"&gt;unsigned&lt;/FONT&gt; &lt;FONT color="#0000ff"&gt;int&lt;/FONT&gt; k = 0; k &amp;lt; wA; ++k) {&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;sum += A[i * wA + k] * B[k * wB + j];&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt; }&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;C[i * wB + j] = sum;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;}&lt;/FONT&gt; &lt;BR /&gt;&lt;FONT size="2"&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Comparing the results of the simple version and the MKL sgemm version, the failure percentage of sgemm lies in the range of 80% to 95 % with an average error of ca. 0.8 *10e-3 with randomly generated matrices uing the rand function from the stdlib.h and the matrix dimension 4096x4096. &lt;/P&gt;
&lt;P&gt;Does someone know why the error precentage and the average error is that high ? &lt;/P&gt;
&lt;P&gt;thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2007 16:04:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870982#M8475</guid>
      <dc:creator>sicb0161</dc:creator>
      <dc:date>2007-04-11T16:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vs CBLAS Matrix-Matrix Multiplication</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870983#M8476</link>
      <description>&lt;P&gt;If you are using compiler options which effectively force your C source to use K&amp;amp;R style double evaluation, you should get much better accuracy than you would get by optimizing for speed.&lt;/P&gt;
&lt;P&gt;You would optimize for speed by using default int counters, and Intel compiler vectorizing options such as -xN. Then, you could regain accuracy at some cost in performance, by explicitly promoting to double, declaring &lt;/P&gt;
&lt;P&gt;double sum&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;A[]* (double) B[]&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2007 18:39:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870983#M8476</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-04-11T18:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vs CBLAS Matrix-Matrix Multiplication</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870984#M8477</link>
      <description>Maybe I don'T get your point, but my problem is not that the simple matrix-matrix multiplication method is producing errors but the much faster version sgemm using the Math Kernel Library from Intel. &lt;BR /&gt;&lt;BR /&gt;So, I would like to know how to determine the accuracy of the already implemented sgemm MKL methods.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Apr 2007 21:13:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870984#M8477</guid>
      <dc:creator>sicb0161</dc:creator>
      <dc:date>2007-04-11T21:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple vs CBLAS Matrix-Matrix Multiplication</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870985#M8478</link>
      <description>&lt;P&gt;It's not clear to me what you mean by "error". Certainly one way to measure the error would be to convert the single precision array to a double precision array and run dgemm, and then check the results of MKL sgemm against the double precision values. Since MKL BLAS functions are tested with the standard xBLATn tests, and pass those, I would be surprised if the test I just suggested would show anything surprising. In xBLATn, x is the precision (in this case S) and n is the level of the BLAS, in this case 3.&lt;/P&gt;
&lt;P&gt;Please clarify how you measured the error. Using the "simple" case is not an adequate test since you do not know its properties.&lt;/P&gt;
&lt;P&gt;Bruce&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2007 23:50:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-vs-CBLAS-Matrix-Matrix-Multiplication/m-p/870985#M8478</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2007-05-23T23:50:30Z</dc:date>
    </item>
  </channel>
</rss>

