<?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:Should I reuse my CSR-format matrix handles? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357405#M32702</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;Could you please check if  there is significant performance difference in both cases mentioned by you.  We would recommend to try VTune Profiler analysis on your application and check if this is impacting the performance of your application and let us know if you notice any discrepancy.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You could refer to below link for help regarding VTune Profiler.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top.html&lt;/A&gt;&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>Fri, 04 Feb 2022 10:59:43 GMT</pubDate>
    <dc:creator>ShanmukhS_Intel</dc:creator>
    <dc:date>2022-02-04T10:59:43Z</dc:date>
    <item>
      <title>Should I reuse my CSR-format matrix handles?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357003#M32698</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How cheap is it to create/destroy a &lt;SPAN class="ph"&gt;handle for a CSR-format matrix? I am running an iterative code, and the same operation will be repeated many times on the same matrix (although its content will change over time). Should I call&amp;nbsp;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/matrix-manipulation-routines/mkl-sparse-create-csr.html" target="_self"&gt;mkl_sparse_?_create_csr&lt;/A&gt; once at the beginning, reuse the same handle every time, and eventually call &lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/matrix-manipulation-routines/mkl-sparse-destroy.html" target="_self"&gt;mkl_sparse_destroy&lt;/A&gt; at the end of the run, or is the cost of creating/destroying the handle negligible? (is the memory coming from a pre-allocated buffer?) It would sure be cleaner to create/destroy the handle every time for me, but I want to make sure I will not pay a stiff price for it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joachim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: I just discovered &lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/inspector-executor-sparse-blas-analysis-routines/mkl-sparse-optimize.html" target="_self"&gt;mkl_sparse_optimize&lt;/A&gt;. In my case, the content of the matrix will change, but not its sparse structure. Does it mean I should create a handle, perform the optimization and keep the handle alive?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 08:53:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357003#M32698</guid>
      <dc:creator>Hodara__Joachim1</dc:creator>
      <dc:date>2022-02-03T08:53:12Z</dc:date>
    </item>
    <item>
      <title>Re:Should I reuse my CSR-format matrix handles?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357405#M32702</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;Could you please check if  there is significant performance difference in both cases mentioned by you.  We would recommend to try VTune Profiler analysis on your application and check if this is impacting the performance of your application and let us know if you notice any discrepancy.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You could refer to below link for help regarding VTune Profiler.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top.html&lt;/A&gt;&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>Fri, 04 Feb 2022 10:59:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357405#M32702</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-02-04T10:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Should I reuse my CSR-format matrix handles?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357428#M32703</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you, but I'd rather know the answer before I spend many hours implementing both solutions. I just want to know if the matrix handle is some cheap construct like a std::string_view or if its construction/destruction requires memory allocations and other expensive operations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Joachim&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 12:31:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357428#M32703</guid>
      <dc:creator>Hodara__Joachim1</dc:creator>
      <dc:date>2022-02-04T12:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Should I reuse my CSR-format matrix handles?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357503#M32705</link>
      <description>&lt;P&gt;Hi Joachim,&lt;/P&gt;
&lt;P&gt;The answer to your question depends on whether you do any calls like mkl_sparse_set_&amp;lt;...&amp;gt;_hint + mkl_sparse_optimize() or not.&lt;/P&gt;
&lt;P&gt;If you don't, handle is a thin wrapper around the data you provided in create routine and the create-destroy is cheap.&lt;/P&gt;
&lt;P&gt;If you do, then MKL can internally take a decision to convert a matrix to some different format and will store all the optimized data inside the handle. In this case, create is cheap but optimize() can create a lot of extra data and destroy won't be cheap (at the very least doing create-optimize-destroy many times will cause a lot of memory allocation/deallocation).&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Kirill&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 18:15:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1357503#M32705</guid>
      <dc:creator>Kirill_V_Intel</dc:creator>
      <dc:date>2022-02-04T18:15:34Z</dc:date>
    </item>
    <item>
      <title>Re:Should I reuse my CSR-format matrix handles?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1359566#M32735</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 information provided helped? Kindly let us know if we could close this thread at 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;BR /&gt;</description>
      <pubDate>Fri, 11 Feb 2022 18:10:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1359566#M32735</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-02-11T18:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Should I reuse my CSR-format matrix handles?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1360062#M32741</link>
      <description>&lt;P&gt;Very helpful, I got the info I was looking for. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 11:43:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1360062#M32741</guid>
      <dc:creator>Hodara__Joachim1</dc:creator>
      <dc:date>2022-02-14T11:43:03Z</dc:date>
    </item>
    <item>
      <title>Re:Should I reuse my CSR-format matrix handles?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1360137#M32743</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved. If you need any additional information, please post a new question as this&amp;nbsp;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, 14 Feb 2022 16:46:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Should-I-reuse-my-CSR-format-matrix-handles/m-p/1360137#M32743</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-02-14T16:46:07Z</dc:date>
    </item>
  </channel>
</rss>

