<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>OpenCL on Wonderings of a SAT geek</title>
    <link>https://www.msoos.org/tags/opencl/</link>
    <description>Recent content in OpenCL on Wonderings of a SAT geek</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate>Fri, 16 May 2014 16:10:31 +0000</lastBuildDate>
    <atom:link href="https://www.msoos.org/tags/opencl/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Multi-threading and startup speed</title>
      <link>https://www.msoos.org/2014/05/multi-threading-and-startup-speed/</link>
      <pubDate>Fri, 16 May 2014 16:10:31 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=2521</guid> 
      <description>&lt;p&gt;When doing multi-threading, parsing the input and inserting it into the solver threads is actually one of the most tricky part. Of course one can simply do&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;void add_clause_to_all_threads(Clause clause) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  for(int i = 0; i &amp;lt; threads; i++) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    solver[i].add_clause(clause);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It works and my SAT solver entry to the competition used this method. However, if we have 12 threads, the startup time will be 12x more than usual since only one thread is adding the clauses to all the solvers. If startup used to be 3s, it&amp;rsquo;s suddenly more than half a minute.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A nifty way of saving time with OpenCL</title>
      <link>https://www.msoos.org/2012/01/a-nifty-way-of-saving-time-with-opencl/</link>
      <pubDate>Tue, 17 Jan 2012 21:14:17 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1128</guid> 
      <description>&lt;p&gt;In &lt;a href=&#34;http://en.wikipedia.org/wiki/OpenCL&#34;&gt;OpenCL&lt;/a&gt;, the platform for using the graphics card as a form of &lt;a href=&#34;http://en.wikipedia.org/wiki/GPGPU&#34;&gt;highly parallelised machine&lt;/a&gt;, reading and writing to the memory of the card is very expensive. For this reason, the OpenCL &lt;a href=&#34;http://www.khronos.org/registry/cl/specs/opencl-1.2.pdf&#34;&gt;standard&lt;/a&gt; offers a set of highly flexible ways of writing and reading data to- and from the OpenCL device. Using these flexible systems takes time to get used to, but seem to be necessary to get the most out of the graphics card.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AMD&#39;s OpenCL heaven and hell</title>
      <link>https://www.msoos.org/2012/01/amds-opencl-heaven-and-hell/</link>
      <pubDate>Thu, 05 Jan 2012 21:01:17 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1079</guid> 
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2012/01/OpenCL_Logo.png&#34;&gt;I have been using the AMD&amp;rsquo;s &lt;a href=&#34;http://en.wikipedia.org/wiki/OpenCL&#34;&gt;OpenCL&lt;/a&gt; platform for a while now, so I&amp;rsquo;ll try to write a little overview of what I think is good and bad about OpenCL in general and AMD&amp;rsquo;s OpenCL implementation in particular.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update:&lt;/strong&gt; AMD was working on the issues below, and temporarily fixed some of them. They are broken again, and I gave up trying to help them. They would need more engineers to fix these issues on a permanent basis.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
