<?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 I wonder the behaviour of mkl in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133938#M25843</link>
    <description>&lt;P&gt;I wonder the behaviour of mkl_sparse_convert_csr.&lt;/P&gt;&lt;P&gt;Is the result meet expectation?&lt;/P&gt;&lt;P&gt;I don't see anything about it in the document.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 12:29:00 GMT</pubDate>
    <dc:creator>yan__zixi</dc:creator>
    <dc:date>2019-01-16T12:29:00Z</dc:date>
    <item>
      <title>Use mkl_sparse_convert_csr to transpose doesn't change rows &amp; cols</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133937#M25842</link>
      <description>&lt;P&gt;Hello, I am using mkl_sparse_convert_csr to perform transpose function by calling with&amp;nbsp;SPARSE_OPERATION_TRANSPOSE option.&lt;/P&gt;&lt;P&gt;However, the values of the result matrix is transposed correctly with the row &amp;amp; col left unchanged.&lt;/P&gt;&lt;P&gt;Here is the code.&lt;/P&gt;&lt;P&gt;#include &amp;lt;bits/stdc++.h&amp;gt;&lt;BR /&gt;#include &amp;lt;mkl.h&amp;gt;&lt;BR /&gt;#include &amp;lt;omp.h&amp;gt;&lt;BR /&gt;using namespace std;&lt;/P&gt;&lt;P&gt;namespace {&lt;BR /&gt;// Output MKL sparse matrix in CSR format.&lt;BR /&gt;void Print(const sparse_matrix_t &amp;amp;mat) {&lt;BR /&gt;&amp;nbsp; sparse_index_base_t index_base;&lt;BR /&gt;&amp;nbsp; MKL_INT rows, cols;&lt;BR /&gt;&amp;nbsp; MKL_INT *rows_start, *rows_end, *col_idx;&lt;BR /&gt;&amp;nbsp; float *values;&lt;BR /&gt;&amp;nbsp; assert(mkl_sparse_s_export_csr(mat, &amp;amp;index_base, &amp;amp;rows, &amp;amp;cols, &amp;amp;rows_start,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;rows_end, &amp;amp;col_idx,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;values) == SPARSE_STATUS_SUCCESS);&lt;BR /&gt;&amp;nbsp; cout &amp;lt;&amp;lt; "IndexBase=" &amp;lt;&amp;lt; (index_base == SPARSE_INDEX_BASE_ZERO ? 0 : 1)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp; cout &amp;lt;&amp;lt; "Rows=" &amp;lt;&amp;lt; rows &amp;lt;&amp;lt; " Cols=" &amp;lt;&amp;lt; cols &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp; for (int i = 0; i &amp;lt; rows; ++i) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; "RowsKey=" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; ":";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for (int j = rows_start&lt;I&gt;; j &amp;lt; rows_end&lt;I&gt;; ++j) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; col_idx&lt;J&gt; &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; values&lt;J&gt; &amp;lt;&amp;lt; ")";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/J&gt;&lt;/J&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;} // namespace&lt;/P&gt;&lt;P&gt;int main() {&lt;BR /&gt;&amp;nbsp; // Auto log flush.&lt;BR /&gt;&amp;nbsp; cout.setf(std::ios::unitbuf);&lt;BR /&gt;&amp;nbsp; mkl_set_num_threads(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; const MKL_INT n = 4, m = 5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Create matrix a.&lt;BR /&gt;&amp;nbsp; vector&amp;lt;float&amp;gt; values = {1, 2, 2, 1};&lt;BR /&gt;&amp;nbsp; vector&amp;lt;MKL_INT&amp;gt; rows_start = {0, 0, 2, 3};&lt;BR /&gt;&amp;nbsp; vector&amp;lt;MKL_INT&amp;gt; rows_end = {0, 2, 3, 4};&lt;BR /&gt;&amp;nbsp; vector&amp;lt;MKL_INT&amp;gt; col_idx = {0, 2, 2, 3};&lt;/P&gt;&lt;P&gt;&amp;nbsp; sparse_matrix_t mat_a;&lt;BR /&gt;&amp;nbsp; assert(mkl_sparse_s_create_csr(&amp;amp;mat_a, SPARSE_INDEX_BASE_ZERO, n, m,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rows_start.data(), rows_end.data(),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;col_idx.data(),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;values.data()) == SPARSE_STATUS_SUCCESS);&lt;BR /&gt;&amp;nbsp; cout &amp;lt;&amp;lt; "Matrix A:" &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp; Print(mat_a);&lt;/P&gt;&lt;P&gt;&amp;nbsp; sparse_matrix_t mat_b;&lt;BR /&gt;&amp;nbsp; assert(mkl_sparse_convert_csr(mat_a, SPARSE_OPERATION_TRANSPOSE, &amp;amp;mat_b) ==&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SPARSE_STATUS_SUCCESS);&lt;BR /&gt;&amp;nbsp; cout &amp;lt;&amp;lt; "Matrix B:" &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp; Print(mat_b);&lt;/P&gt;&lt;P&gt;&amp;nbsp; mkl_sparse_destroy(mat_b);&lt;BR /&gt;&amp;nbsp; mkl_sparse_destroy(mat_a);&lt;BR /&gt;&amp;nbsp; return 0;&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is here:&lt;/P&gt;&lt;P&gt;Matrix A:&lt;BR /&gt;IndexBase=0&lt;BR /&gt;Rows=4 Cols=5&lt;BR /&gt;RowsKey=0:&lt;BR /&gt;RowsKey=1:(0,1)(2,2)&lt;BR /&gt;RowsKey=2:(2,2)&lt;BR /&gt;RowsKey=3:(3,1)&lt;BR /&gt;Matrix B:&lt;BR /&gt;IndexBase=0&lt;BR /&gt;Rows=4 Cols=5&lt;BR /&gt;RowsKey=0:(1,1)&lt;BR /&gt;RowsKey=1:&lt;BR /&gt;RowsKey=2:(1,2)(2,2)&lt;BR /&gt;RowsKey=3:(3,1)&lt;/P&gt;&lt;P&gt;As you can see, the rows=4 &amp;amp; cols=5 in the matrix B.&lt;/P&gt;&lt;P&gt;Any idea what the problem is? Is there any useful information?&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;Zixi&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 15:10:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133937#M25842</guid>
      <dc:creator>yan__zixi</dc:creator>
      <dc:date>2019-01-15T15:10:18Z</dc:date>
    </item>
    <item>
      <title>I wonder the behaviour of mkl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133938#M25843</link>
      <description>&lt;P&gt;I wonder the behaviour of mkl_sparse_convert_csr.&lt;/P&gt;&lt;P&gt;Is the result meet expectation?&lt;/P&gt;&lt;P&gt;I don't see anything about it in the document.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 12:29:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133938#M25843</guid>
      <dc:creator>yan__zixi</dc:creator>
      <dc:date>2019-01-16T12:29:00Z</dc:date>
    </item>
    <item>
      <title>Is it a bug in mkl_sparse</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133939#M25844</link>
      <description>&lt;P&gt;Is it a bug in mkl_sparse_convert_csr? Any progress?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 08:22:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133939#M25844</guid>
      <dc:creator>yan__zixi</dc:creator>
      <dc:date>2019-02-15T08:22:15Z</dc:date>
    </item>
    <item>
      <title>Yes, this is the bug with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133940#M25845</link>
      <description>&lt;P&gt;Yes, this is the bug with converter in the case of transpose and conjugate cases. The issue is escalated. We will update the status of this issue asap.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 03:32:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133940#M25845</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-02-18T03:32:56Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133941#M25846</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for your confirmation.&lt;/P&gt;&lt;P&gt;Now I use mkl_sparse_add to perform the transpose.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Zixi&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 03:42:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133941#M25846</guid>
      <dc:creator>yan__zixi</dc:creator>
      <dc:date>2019-02-18T03:42:19Z</dc:date>
    </item>
    <item>
      <title>The fix of the issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133942#M25847</link>
      <description>&lt;P&gt;The fix of the issue available in MKL 2019 u5 which we released the last week. You may check this update and let us know how this update will work on your side.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 04:51:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Use-mkl-sparse-convert-csr-to-transpose-doesn-t-change-rows-cols/m-p/1133942#M25847</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-09-16T04:51:47Z</dc:date>
    </item>
  </channel>
</rss>

