<?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 Quote:Peter B. wrote: in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985701#M17716</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Peter B. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;(I've found that this question has been &lt;A href="http://software.intel.com/en-us/forums/topic/277217"&gt;asked before&lt;/A&gt;, but not answered.)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It has been answered here&amp;nbsp;http://software.intel.com/en-us/forums/topic/365430.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2013 08:26:28 GMT</pubDate>
    <dc:creator>asd__asdqwe</dc:creator>
    <dc:date>2013-08-30T08:26:28Z</dc:date>
    <item>
      <title>Does mkl_dcsrmm require row-major matrices?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985698#M17713</link>
      <description>&lt;P&gt;&lt;EM&gt;mkl_dcsrmm&lt;/EM&gt; multiplies a CSR sparse matrix by a dense matrix, storing the result in a dense matrix.&lt;/P&gt;
&lt;P&gt;From what I can tell, this function expects the B and C dense matrices to be in row-major order, as opposed to the column-major order used in most other BLAS routines. I've attached a test case which demonstrates that, given the same B and C inputs in the same format,&amp;nbsp;&lt;EM&gt;mkl_dcsrmm&lt;/EM&gt; produces completely different results than &lt;EM&gt;dgemm. dgemm&lt;/EM&gt; calculates C = alpha*A*B + beta*C (as expected), but&amp;nbsp;&lt;EM&gt;mkl_dcsrmm&lt;/EM&gt; appears to calculate C' = alpha*A*B' + beta*C' instead.&lt;/P&gt;
&lt;P&gt;This seems to make it very difficult to mix sparse functions with normal BLAS function. Must I transpose my matrices before and after using the sparse functions?&lt;/P&gt;
&lt;P&gt;I tried using&amp;nbsp;&lt;EM&gt;mkl_dcs&lt;STRONG&gt;c&lt;/STRONG&gt;mm&lt;/EM&gt; instead, but it seems to do the same thing. In fact, I think that&amp;nbsp;&lt;EM&gt;mkl_dcsrmm&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;mkl_dcscmm&lt;/EM&gt; are identical except that they invert the meaning of the &lt;EM&gt;transa&lt;/EM&gt; parameter.&lt;/P&gt;
&lt;P&gt;Do all of the sparse matrix-matrix multiply functions expect the dense parts to be row-major? If so, what is the best practise for using these beside &amp;nbsp;traditional column-major BLAS functions?&lt;/P&gt;
&lt;P&gt;(I've found that this question has been &lt;A href="http://software.intel.com/en-us/forums/topic/277217"&gt;asked before&lt;/A&gt;, but not answered.)&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 19:01:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985698#M17713</guid>
      <dc:creator>Peter_B_9</dc:creator>
      <dc:date>2013-08-28T19:01:38Z</dc:date>
    </item>
    <item>
      <title>Here's the test case.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985699#M17714</link>
      <description>&lt;P&gt;Here's the test case.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 19:41:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985699#M17714</guid>
      <dc:creator>Peter_B_9</dc:creator>
      <dc:date>2013-08-28T19:41:46Z</dc:date>
    </item>
    <item>
      <title>I'm going to answer my own</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985700#M17715</link>
      <description>&lt;P&gt;I'm going to answer my own question.&lt;/P&gt;
&lt;P&gt;There appears to some pretty important undocumented behavior in&amp;nbsp;&lt;EM&gt;mkl_dcsrmm. &lt;/EM&gt;(At least I can't find it documented anywhere!)&lt;/P&gt;
&lt;P&gt;If the sparse matrix uses zero-based indexing (as indicated by the&amp;nbsp;&lt;EM&gt;matdescra&lt;/EM&gt; array) then&amp;nbsp;&lt;EM&gt;mkl_dcsrmm&amp;nbsp;&lt;/EM&gt;assumes that the B and C matrices are row major. If the sparse matrix uses one-based indexing it assumes that the B and C matrices are column major.&lt;/P&gt;
&lt;P&gt;I can easily change my sparse matrices to be one-based so that&amp;nbsp;&lt;EM&gt;mkl_dcsrmm &lt;/EM&gt;will work with column-major inputs.&lt;/P&gt;
&lt;P&gt;The documentation at&amp;nbsp;http://software.intel.com/sites/products/documentation/hpc/mkl/mklman/GUID-78C55D9B-86FF-4A9F-B5D5-D2F61B9314FC.htm#GUID-78C55D9B-86FF-4A9F-B5D5-D2F61B9314FC really ought to explain this important detail. While you're fixing the doc, there are couple of places where it looks like "m-" has been replaced by an em dash (e.g.&lt;EM&gt;&amp;nbsp;pntre(—1)&lt;/EM&gt; should be&amp;nbsp;&lt;EM&gt;pntre(m-1)&lt;/EM&gt;). Also the description for 'c' is incorrect. It says "On entry, the leading..." but should say "On entry &lt;STRONG&gt;with&amp;nbsp;transa=&amp;nbsp;'N'&amp;nbsp;or&amp;nbsp;'n'&lt;/STRONG&gt;, the leading..."&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 22:34:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985700#M17715</guid>
      <dc:creator>Peter_B_9</dc:creator>
      <dc:date>2013-08-28T22:34:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Peter B. wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985701#M17716</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Peter B. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;(I've found that this question has been &lt;A href="http://software.intel.com/en-us/forums/topic/277217"&gt;asked before&lt;/A&gt;, but not answered.)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It has been answered here&amp;nbsp;http://software.intel.com/en-us/forums/topic/365430.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2013 08:26:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Does-mkl-dcsrmm-require-row-major-matrices/m-p/985701#M17716</guid>
      <dc:creator>asd__asdqwe</dc:creator>
      <dc:date>2013-08-30T08:26:28Z</dc:date>
    </item>
  </channel>
</rss>

