<?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: Optimizing the backward solve for a sparse lower triangular linear system in Mobile and Desktop Processors</title>
    <link>https://community.intel.com/t5/Mobile-and-Desktop-Processors/Optimizing-the-backward-solve-for-a-sparse-lower-triangular/m-p/658105#M38476</link>
    <description>&lt;P&gt;Wrong forum.  You want to be [somewhere] here: &lt;A href="https://software.intel.com/en-us/forum"&gt;https://software.intel.com/en-us/forum&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 16 Feb 2020 08:18:36 GMT</pubDate>
    <dc:creator>AlHill</dc:creator>
    <dc:date>2020-02-16T08:18:36Z</dc:date>
    <item>
      <title>Optimizing the backward solve for a sparse lower triangular linear system</title>
      <link>https://community.intel.com/t5/Mobile-and-Desktop-Processors/Optimizing-the-backward-solve-for-a-sparse-lower-triangular/m-p/658104#M38475</link>
      <description>&lt;P&gt;I have a routine for the back solve as follows:&lt;/P&gt;&lt;CODE&gt;void backsolve(const int*__restrict__ Lp,
               const int*__restrict__ Li,
               const double*__restrict__ Lx,
               const int n,
               double*__restrict__ x) {
  for (int i=n-1; i&amp;gt;=0; --i) {
      for (int j=Lp[i]; j&amp;lt;Lp[i+1]; ++j) {
          x[i] -= Lx[j] * x[Li[j]];
      }
  }
}&lt;/CODE&gt;&lt;P&gt;compiling with gcc-8.3 -mfma -mavx -mavx512 results in&lt;/P&gt;&lt;CODE&gt;backsolve(int const*, int const*, double const*, int, double*):
        lea     eax, [rcx-1]
        movsx   r11, eax
        lea     r9, [r8+r11*8]
        test    eax, eax
        js      .L9
.L5:
        movsx   rax, DWORD PTR [rdi+r11*4]
        mov     r10d, DWORD PTR [rdi+4+r11*4]
        cmp     eax, r10d
        jge     .L6
        vmovsd  xmm0, QWORD PTR [r9]
.L7:
        movsx   rcx, DWORD PTR [rsi+rax*4]
        vmovsd  xmm1, QWORD PTR [rdx+rax*8]
        add     rax, 1
        vfnmadd231sd    xmm0, xmm1, QWORD PTR [r8+rcx*8]
        vmovsd  QWORD PTR [r9], xmm0
        cmp     r10d, eax
        jg      .L7
.L6:
        sub     r11, 1
        sub     r9, 8
        test    r11d, r11d
        jns     .L5
        ret
.L9:
        ret&lt;/CODE&gt;&lt;P&gt;Vtune says the line &lt;/P&gt;&lt;CODE&gt;vmovsd  QWORD PTR [r9], xmm0&lt;/CODE&gt;&lt;P&gt;is taking the bulk of the time here. I asked on stackoverflow (&lt;A href="https://stackoverflow.com/questions/60232977/optimizing-the-backward-solve-for-a-sparse-lower-triangular-linear-system" target="_self" alt="https://stackoverflow.com/questions/60232977/optimizing-the-backward-solve-for-a-sparse-lower-triangular-linear-system"&gt;&lt;/A&gt;&lt;A href="https://stackoverflow.com/questions/60232977/optimizing-the-backward-solve-for-a-sparse-lower-triangular-linear-system"&gt;https://stackoverflow.com/questions/60232977/optimizing-the-backward-solve-for-a-sparse-lower-triangular-linear-system&lt;/A&gt;), and the answers I got seem to suggest that there is not much I can do to speed up the function. Using MKL for the solve was also much slower.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System: Xeon Skylake&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any insight or suggestions!&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 08:14:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Mobile-and-Desktop-Processors/Optimizing-the-backward-solve-for-a-sparse-lower-triangular/m-p/658104#M38475</guid>
      <dc:creator>watch_the_crab</dc:creator>
      <dc:date>2020-02-16T08:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Optimizing the backward solve for a sparse lower triangular linear system</title>
      <link>https://community.intel.com/t5/Mobile-and-Desktop-Processors/Optimizing-the-backward-solve-for-a-sparse-lower-triangular/m-p/658105#M38476</link>
      <description>&lt;P&gt;Wrong forum.  You want to be [somewhere] here: &lt;A href="https://software.intel.com/en-us/forum"&gt;https://software.intel.com/en-us/forum&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 08:18:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Mobile-and-Desktop-Processors/Optimizing-the-backward-solve-for-a-sparse-lower-triangular/m-p/658105#M38476</guid>
      <dc:creator>AlHill</dc:creator>
      <dc:date>2020-02-16T08:18:36Z</dc:date>
    </item>
  </channel>
</rss>

