<?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 have not tested the AVX2 in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130257#M6393</link>
    <description>&lt;P&gt;I have not tested the AVX2 gather instructions for main memory access. &amp;nbsp;For indices that have a large random component, it is typically better to run a loop with software prefetches, but these usually require some manual tuning. &amp;nbsp;None of the Intel processors have a native capability of transposing data across SIMD registers, but if the data is coming from main memory the overhead of transposing the data in registers may be tolerable. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 16:19:23 GMT</pubDate>
    <dc:creator>McCalpinJohn</dc:creator>
    <dc:date>2019-10-29T16:19:23Z</dc:date>
    <item>
      <title>Which AVX memory access pattern is better?</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130254#M6390</link>
      <description>&lt;P&gt;For example, there are an array A. it’s length is length_A.&amp;nbsp; Using AVX gather(_mm256_i32gather_i32) function to read array A. There are two memory access pattern.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;mm256 register = (A[0], A[1],….A[7])&lt;/P&gt;&lt;P&gt;mm256 register = (A[8], A[9],….A[15]),,,and so on&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;stride = length_a /8;&lt;/P&gt;&lt;P&gt;mm256 register = (A[0], A[stride+0],….A[7*stride+0])&lt;/P&gt;&lt;P&gt;mm256 register = (A[1], A[stride+1],….A[7*stride+1]),,,and so on&lt;/P&gt;&lt;P&gt;which is better when length_A is very large?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 16:42:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130254#M6390</guid>
      <dc:creator>sun__lei</dc:creator>
      <dc:date>2019-10-28T16:42:13Z</dc:date>
    </item>
    <item>
      <title>Pattern (1) looks like normal</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130255#M6391</link>
      <description>&lt;P&gt;Pattern (1) looks like normal contiguous storage, so it should not use gather instructions? &amp;nbsp;Ordinary loads should take 0.5 cycles each on AVX2-capable processors (assuming data in cache).&lt;/P&gt;&lt;P&gt;According to&amp;nbsp;https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=gather&amp;amp;expand=2980 the "__mm256_i32gather_epi32" instruction requires ~10 cycles on Haswell, ~6 cycles on Broadwell, and ~5 cycles on Skylake. &amp;nbsp;Those are presumably "best case" values for data in cache. &amp;nbsp; Agner Fog's instruction tables show similar values, with 12 cycles for Haswell, 7 cycles for Broadwell, and 5 cycles on Skylake (client or server).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 20:02:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130255#M6391</guid>
      <dc:creator>McCalpinJohn</dc:creator>
      <dc:date>2019-10-28T20:02:27Z</dc:date>
    </item>
    <item>
      <title>Quote:McCalpin, John</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130256#M6392</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;McCalpin, John (Blackbelt) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pattern (1) looks like normal contiguous storage, so it should not use gather instructions? &amp;nbsp;Ordinary loads should take 0.5 cycles each on AVX2-capable processors (assuming data in cache).&lt;/P&gt;&lt;P&gt;According to&amp;nbsp;&lt;A href="https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=gather&amp;amp;expand=2980"&gt;https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=gathe...&lt;/A&gt; the "__mm256_i32gather_epi32" instruction requires ~10 cycles on Haswell, ~6 cycles on Broadwell, and ~5 cycles on Skylake. &amp;nbsp;Those are presumably "best case" values for data in cache. &amp;nbsp; Agner Fog's instruction tables show similar values, with 12 cycles for Haswell, 7 cycles for Broadwell, and 5 cycles on Skylake (client or server).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I want to know the case when data is not in the&amp;nbsp;cache and data is in the memory. I want to know whether avx gather will improve the performance when &lt;STRONG&gt;randomly read memory&lt;/STRONG&gt;&amp;nbsp;compared to use normal scalar&amp;nbsp;memory read the same memory locations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 05:12:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130256#M6392</guid>
      <dc:creator>sun__lei</dc:creator>
      <dc:date>2019-10-29T05:12:08Z</dc:date>
    </item>
    <item>
      <title>I have not tested the AVX2</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130257#M6393</link>
      <description>&lt;P&gt;I have not tested the AVX2 gather instructions for main memory access. &amp;nbsp;For indices that have a large random component, it is typically better to run a loop with software prefetches, but these usually require some manual tuning. &amp;nbsp;None of the Intel processors have a native capability of transposing data across SIMD registers, but if the data is coming from main memory the overhead of transposing the data in registers may be tolerable. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 16:19:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Which-AVX-memory-access-pattern-is-better/m-p/1130257#M6393</guid>
      <dc:creator>McCalpinJohn</dc:creator>
      <dc:date>2019-10-29T16:19:23Z</dc:date>
    </item>
  </channel>
</rss>

