<?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 Anyone there? in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932520#M1629</link>
    <description>&lt;P&gt;Anyone there?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2013 12:36:12 GMT</pubDate>
    <dc:creator>krishnaraj</dc:creator>
    <dc:date>2013-12-16T12:36:12Z</dc:date>
    <item>
      <title>unknown optimization on x64</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932518#M1627</link>
      <description>&lt;P&gt;I have written a benchmarking application for opencl &lt;A href="https://github.com/krrishnarraj/clpeak"&gt;https://github.com/krrishnarraj/clpeak&lt;/A&gt;&amp;nbsp;. One of the tests include measuring compute capacity(gflops) of the device. When run on windows 32, it gives expected results on sandybridge as&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;Platform: Intel(R) OpenCL&lt;BR /&gt;
		&amp;nbsp; Device: &amp;nbsp; &amp;nbsp; &amp;nbsp; Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; Driver version: 1.2 (Win32)&lt;/P&gt;

	&lt;P&gt;&amp;nbsp; &amp;nbsp; Single-precision compute (GFLOPS)&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float &amp;nbsp; : 25.19&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float2 &amp;nbsp;: 50.48&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float4 &amp;nbsp;: 50.37&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float8 &amp;nbsp;: 51.75&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float16 : 51.85&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Theoratical peak of this device is 76.8 gflops&lt;/P&gt;

&lt;P&gt;But when same code runs on 64 bit, it gives a different result&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;Platform: Intel(R) OpenCL&lt;BR /&gt;
		&amp;nbsp; Device: &amp;nbsp; &amp;nbsp; &amp;nbsp; Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; Driver version: 1.2 (Win64)&lt;/P&gt;

	&lt;P&gt;&amp;nbsp; &amp;nbsp; Single-precision compute (GFLOPS)&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float &amp;nbsp; : 25.15&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float2 &amp;nbsp;: 99.25&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float4 &amp;nbsp;: 172.25&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float8 &amp;nbsp;: 80.07&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; float16 : 96.42&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Looks like vector code(float2, float4) has been optimized out to float or some out-of-order optimization has happend. Not sure what is happening!!&lt;/P&gt;

&lt;P&gt;ASM output from kernel-analyzer has properly generated all fmad &amp;amp; fmul. Is there any optimization that is specific to x64? anything advanced?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2013 13:50:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932518#M1627</guid>
      <dc:creator>krishnaraj</dc:creator>
      <dc:date>2013-12-09T13:50:04Z</dc:date>
    </item>
    <item>
      <title>float4 kernel is at https:/</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932519#M1628</link>
      <description>&lt;P&gt;float4 kernel is at&amp;nbsp;&lt;A href="https://github.com/krrishnarraj/clpeak/blob/master/src/kernels/compute_sp_kernels.cl#L54"&gt;https://github.com/krrishnarraj/clpeak/blob/master/src/kernels/compute_sp_kernels.cl#L54&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2013 03:23:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932519#M1628</guid>
      <dc:creator>krishnaraj</dc:creator>
      <dc:date>2013-12-10T03:23:33Z</dc:date>
    </item>
    <item>
      <title>Anyone there?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932520#M1629</link>
      <description>&lt;P&gt;Anyone there?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 12:36:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932520#M1629</guid>
      <dc:creator>krishnaraj</dc:creator>
      <dc:date>2013-12-16T12:36:12Z</dc:date>
    </item>
    <item>
      <title>Hello Krishnaraj,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932521#M1630</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Krishnaraj,&lt;/P&gt;

&lt;P&gt;Please note that the OpenCL compiler implicitly vectorizes the kernel for you. It does that along the dimension zero of workgroup work-items. Along this vectorization process, user explicit vectors (e.g. float2, float4) are broken to scalars and then re-vectorized along the work-items space.&lt;/P&gt;

&lt;P&gt;With the above in mind, at the vector assembly level, in the &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;compute_sp_v1 kernel, each instruction is data dependent on the previous one. On the other kernels (using vector type), after breaking the operations to scalars, we get two separated dependency chains. This allows the compiler to schedule&amp;nbsp;independent instructions&amp;nbsp;nearby and benefit from the processor instruction level parallelism. &amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;Having said that, for 64 bit mode, our compiler manages to expose this parallelism, while for 32 bit mode, the compiler doesn't. I assume that this difference is due to fewer registers in 32 bit mode. This explains the higher performance that you observed with the 64 bit mode.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;The theoretical peak GFLOPS of your CPU is higher than 150.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;Arik&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2013 11:03:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932521#M1630</guid>
      <dc:creator>Arik_N_Intel</dc:creator>
      <dc:date>2013-12-18T11:03:12Z</dc:date>
    </item>
    <item>
      <title>Thank you for the reply</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932522#M1631</link>
      <description>&lt;P&gt;Thank you for the reply&lt;/P&gt;

&lt;P&gt;Few questions:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://download.intel.com/support/processors/corei7/sb/core_i7-3600_m.pdf" target="_blank"&gt;http://download.intel.com/support/processors/corei7/sb/core_i7-3600_m.pdf&lt;/A&gt; says that max cpu flops of 3630QM is 76GFLOPS. Confused!&lt;/P&gt;

&lt;P&gt;flops = 4 cores * 8 avx * 2.4 GHz * 1 mul/add per clock = 76.8 GFLOPS&lt;/P&gt;

&lt;P&gt;parallelism in this context means pipeline right? because in float8 kernel, you already have avx instructions(ilp exploited). Only when pipeline is busy you get max throughput. Right?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2013 16:59:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932522#M1631</guid>
      <dc:creator>krishnaraj</dc:creator>
      <dc:date>2013-12-18T16:59:04Z</dc:date>
    </item>
    <item>
      <title>Hello Krishnaraj,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932523#M1632</link>
      <description>&lt;P&gt;Hello Krishnaraj,&lt;/P&gt;

&lt;P&gt;Sorry for the delay,&lt;/P&gt;

&lt;P&gt;Unfortunately, there is amistake in that document.&lt;/P&gt;

&lt;P&gt;The correct peak GFLOPS calculation is:&amp;nbsp; 4 cores *&lt;STRONG&gt; 2 AVX ALUs &lt;/STRONG&gt;* 8 avx * 2.4 GHz * 1 mul/add per clock = 153.6 GFLOPS&lt;/P&gt;

&lt;P&gt;The actual frequency might be higher with turbo. (But I cannot calculate it as it depends on too many factors).&lt;/P&gt;

&lt;P&gt;Parallelism in this context is about using both of the AVX ALUs.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Arik&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2013 09:42:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932523#M1632</guid>
      <dc:creator>Arik_N_Intel</dc:creator>
      <dc:date>2013-12-25T09:42:57Z</dc:date>
    </item>
    <item>
      <title>Thanks Arik. I know its x'mas</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932524#M1633</link>
      <description>&lt;P&gt;Thanks Arik. I know its x'mas eve&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; well that explains everything. So 172 GFLOPS is the effect of turbo mode&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2013 04:04:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/unknown-optimization-on-x64/m-p/932524#M1633</guid>
      <dc:creator>krishnaraj</dc:creator>
      <dc:date>2013-12-26T04:04:47Z</dc:date>
    </item>
  </channel>
</rss>

