<?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 Interesting. But shouldn't in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150162#M27062</link>
    <description>&lt;P&gt;Interesting. Shouldn't the small matrices fit in the per-core L1 caches (though I suppose that is more related to latency)?&amp;nbsp;Why would the memory bandwidth be insufficient to supply all the cores?&amp;nbsp;Are there any tricks I can use (e.g., alignment, prefetching, thread affinity) to improve the achieved bandwidth?&lt;/P&gt;</description>
    <pubDate>Sat, 25 May 2019 05:13:00 GMT</pubDate>
    <dc:creator>Palmer__David</dc:creator>
    <dc:date>2019-05-25T05:13:00Z</dc:date>
    <item>
      <title>Batched dgemm performance plateaus?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150160#M27060</link>
      <description>&lt;P&gt;I have a problem where I need to compute many (1e4 - 1e6)&amp;nbsp;small matrix-matrix and matrix-vector products (matrix dimensions around&amp;nbsp;~15 -&amp;nbsp;35). This problem seems "embarrassingly parallel" to me, and so I am confused as to why I am seeing the following performance issue:&amp;nbsp;on a Google Cloud compute server&amp;nbsp;with 48 physical cores (96 logical cores), performance plateaus at 10-16 threads. Adding additional threads does not reduce computation time. I have tried several different approaches: (1)&amp;nbsp;cblas_dgemm_batch; (2)&amp;nbsp;calling&amp;nbsp;cblas_dgemm&amp;nbsp;within a tbb::parallel_for, with both sequential and TBB-threaded MKL;&amp;nbsp;(3) JIT-compiled problem-specific dgemm kernel (created with&amp;nbsp;mkl_jit_create_dgemm)&amp;nbsp;within a parallel_for; (4) mkl_dgemm_compact (along with mkl_dgepack and mkl_dgeunpack).&lt;/P&gt;&lt;P&gt;All of these yield roughly comparable performance (except for the compact functions--there, packing and unpacking time completely dominates computation time), but none of them seems to yield performance that&amp;nbsp;scales linearly with the number of threads I specify, as I would expect. The maximum performance I see is around 50 GFLOPS&amp;nbsp;on a system capable of around 1-2 TFLOPS. (Indeed, multiplying two large matrices achieves performance in the teraflop range.)&amp;nbsp;Is this the best I can expect? Why do I not see performance&amp;nbsp;scaling linearly with thread count on this embarrassingly parallel problem?&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 20:24:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150160#M27060</guid>
      <dc:creator>Palmer__David</dc:creator>
      <dc:date>2019-05-20T20:24:19Z</dc:date>
    </item>
    <item>
      <title>You are likely limited by</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150161#M27061</link>
      <description>&lt;P&gt;You are likely limited by memory bandwidth?&amp;nbsp; This is common for small matrix operations, where the ratio of FLOPS to memory transfers is much lower than for large matrix multiplication.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 06:29:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150161#M27061</guid>
      <dc:creator>Hinds__David</dc:creator>
      <dc:date>2019-05-24T06:29:36Z</dc:date>
    </item>
    <item>
      <title>Interesting. But shouldn't</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150162#M27062</link>
      <description>&lt;P&gt;Interesting. Shouldn't the small matrices fit in the per-core L1 caches (though I suppose that is more related to latency)?&amp;nbsp;Why would the memory bandwidth be insufficient to supply all the cores?&amp;nbsp;Are there any tricks I can use (e.g., alignment, prefetching, thread affinity) to improve the achieved bandwidth?&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 05:13:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150162#M27062</guid>
      <dc:creator>Palmer__David</dc:creator>
      <dc:date>2019-05-25T05:13:00Z</dc:date>
    </item>
    <item>
      <title>The matrices will fit in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150163#M27063</link>
      <description>&lt;P&gt;The matrices will fit in cache but it is expensive to get them there.&lt;/P&gt;&lt;P&gt;Is there any re-use of the small matrices and vectors, or re-use of the results,&amp;nbsp;that you can take advantage of?&amp;nbsp; After one of these is used , it will be in&amp;nbsp;cache and subsequent uses on that core will be much faster.&amp;nbsp; You might need to reorganize your algorithm to exploit this -- i.e. when you compute a result, use it immediately, don't compute a bunch of results and then move to the next step where you consume them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 17:43:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Batched-dgemm-performance-plateaus/m-p/1150163#M27063</guid>
      <dc:creator>Hinds__David</dc:creator>
      <dc:date>2019-05-26T17:43:25Z</dc:date>
    </item>
  </channel>
</rss>

