Last week, Steve Scott at NVIDIA <a href="http://blogs.nvidia.com/2012/04/no-free-lunch-for-intel-mic-or-gpus/">put up a viral post</a> entitled, "No Free Lunch for Intel MIC (or GPU’s)."  It was a great read and a big hit in technical computing circles.

The centrepiece of Scott's piece was to say that <strong>there are no magic compilers</strong>.  GPUs don't have them, and neither will MIC.  No compiler will be able to automatically recompile existing code and get great performance from MIC or GPUs.  Rather, it takes a good amount of elbow grease to write high-performance code.

We totally agree.  The problem Scott addresses is real.  Despite marketing spin to the contrary, developing code for GPUs requires work.

However, we don't agree with Scott's conclusion that compiler directives are a good solution. <strong>You can't fight magic compilers with more magic compilers</strong>. Directives are simply not a good option for most problems. A <a href="https://plus.google.com/113073392273431041299/posts/aAjqTtSSDUQ">Google+ post</a> by Derek Gerstmann sums this up well, saying that the fine tuning process with compiler directives quickly erodes the programmability advantages that were the point in the first place.

<a href="http://blog.accelereyes.com/blog/wp-content/uploads/2012/04/derek_gplus.png"><img class="aligncenter size-full wp-image-2539" title="derek_gplus" src="http://blog.accelereyes.com/blog/wp-content/uploads/2012/04/derek_gplus.png" alt="" width="512" height="276" /></a>

Fortunately, <a href="http://accelereyes.com/arrayfire">ArrayFire</a> offers a better way forward.  It is easier and more intuitive to use than directives, and it is full of hand-tuned CUDA code. Not just regular hand-tuned CUDA code; many man-years worth of elbow-greased CUDA code. <a href="http://accelereyes.com/arrayfire_tour">Download it</a> and you will smile.

There is no free lunch for any technology, including compiler directives. If you have experience with compiler directives for GPUs, let us know what you think.

&nbsp;

Related links:
<ul>
	<li><a href="http://www.hpcwire.com/hpcwire/2012-04-03/nvidia_pokes_holes_in_intel_s_manycore_story.html">HPCwire, "NVIDIA Pokes Holes in Intel's Manycore Story"</a></li>
	<li><a href="http://www.theregister.co.uk/2012/04/03/nvidia_scott_coprocessor_programming/">The Register, "Nvidia: No magic compilers for HPC coprocessors"</a></li>
</ul>