Will 2012 be the year when OpenCL adoption really takes off?

January 10th, 2012 | Categories: GPU, math software, OpenCL | Tags:

From where I sit it seems that the majority of scientific GPU work is being done with NVIDIA’s proprietary CUDA platform.  All the signs point to the possibility of this changing, however, and I wonder if 2012 will be the year when OpenCL comes of age.  Let’s look at some recent and near future events….

Hardware

  • AMD have recently released the AMD Radeon HD 7970, said to be the fastest single- GPU graphics card on the planet.  This new card supports both Microsoft’s DirectCompute along with OpenCL and is much faster than the previous generation of AMD card (see here for compute benchmarks) as well as being faster than NVIDIAs current top of the line GTX 580.
  • Intel will release their next generation of CPUs – Ivy Bridge – which will include an increased number of built in GPU cores which should be OpenCL compatible.  Although the current Sandy Bridge processors also contain GPU cores, it is not currently possible to target them with Intel’s OpenCL implementation (version 1.5 is strictly for the CPU cores).  I would be very surprised if Intel didn’t update their OpenCL implementation to be able to target the GPUs in Ivy Bridge this year.
  • AMDs latest Fusion processors also contain OpenCL compatible GPU cores directly integrated with the CPU which programmers can exploit using AMD’s Accelerated Parallel Processing (APP) SDK.

The practical upshot of the above is that if a software vendor uses OpenCL to accelerate their product then it could potentially benefit more of their customers than if they used CUDA.  Furthermore, if you want your code to run on the fastest GPU around then OpenCL is the way to go right now.

Software

Having the latest, fastest hardware is pointless if the software you run can’t take advantage of it.  Over the last 12 months I have had the opportunity to speak to developers of various commerical scientific and mathematical software products which support GPU acceleration.  With the exception of Wolfram’s Mathematica, all of them only supported CUDA.  When I asked why they don’t support OpenCL, the response of most of these developers could be paraphrased as ‘The mathematical libraries and vendor support for CUDA are far more developed than those of OpenCL so CUDA support is significantly easier to integerate into our product.‘  Despite this, however, OpenCL support is definitely growing in the world of mathematical and scientific software.

OpenCL in Mathematics software and libraries

  • ViennaCL, a GPU-accelerated C++ open-source linear algebra library, was updated to version 1.2.0 on December 31st (just missing the deadline for December’s Month of Math Software).  Roughly speaking, ViennaCL is a mixture of Boost.ublas (high-level interface) and MAGMA (GPU-support), yet based on OpenCL rather than CUDA.
  • AccelerEyes released a new major version of their GPU accelerated MATLAB toolbox, Jacket, in late December 2011.  The big news as far as this article is concerned is that it includes support for OpenCL; something that is currently missing from The Mathworks’ Parallel Computing Toolbox.
  • Not content with bringing OpenCL support to MATLAB, AccelerEyes also realesed ArrayFire— a free (for the basic version at least) library for C, C++, Fortran, and Python that includes support for both CUDA and OpenCL.
  • Although it’s not new news, it’s worth bearing in mind that Mathematica has supported OpenCL for a while now– since the relase of version 8 back in  November 2010.

Finite Element Modelling with Abaqus

  • Back in May 2011, Version 6.11 of the finite element modelling package, Abaqus, was released and it included support for NVIDIA cards (see here for NVIDIA’s page on it).  In September, GPU support in Abaqus was broadened to include AMD Hardware with an OpenCL compliant release (see here).

Other projects

  • In late December 2011, the first alpha version of FortranCL, an OpenCL interface for Fortran 90, was released.

What do you think?  Will OpenCL start to take the lead in scientific and mathematical software applications this year or will CUDA continue to dominate?  Are there any new OpenCL projects that I’ve missed?

  1. MySchizoBuddy
    January 10th, 2012 at 15:07
    Reply | Quote | #1

    Intel will also be releasing it’s 1TF in DP Knights Corner Co-Processor. It too will support OpenCL.
    http://www.eetimes.com/electronics-news/4230654/Intel-unveils-1-TFLOP-s-Knight-s-Corner

    Btw Nvidia has opensourced CUDA that will allow other manufacturers to add CUDA support specially ARM chips. Who knows even Intel might implement CUDA?

    “A Comprehensive Performance Comparison of CUDA and OpenCL” http://www.pds.ewi.tudelft.nl/pubs/papers/icpp2011a.pdf

    Have you already talked about Multicoreaware Inc
    http://www.multicorewareinc.com/index.php?option=com_content&view=article&id=26&Itemid=64

  2. MySchizoBuddy
    January 10th, 2012 at 15:13
    Reply | Quote | #2

    Oh Oh OH. Another new one Altera has added OpenCL support in their FPGA toolkit. Now you can have a custom chip specially programmed for your specific problems. Must read this paper
    http://www.altera.com/literature/wp/wp-01173-opencl.pdf?f=hp&k=gh

  3. January 10th, 2012 at 15:17
    Reply | Quote | #3

    @MySchizoBuddy One way of targeting Intel chips with CUDA code would be to use PGI’s Accelerator Compilers. http://www.pgroup.com/resources/cuda-x86.htm My employer has a couple of network licenses so I have access to it but have never found the time to play (with that part of it at least).

  4. January 10th, 2012 at 15:21
    Reply | Quote | #4

    As for the open-sourced CUDA..it’s an interesting development. ARM have already pledged support for OpenCL (see http://semiaccurate.com/2011/04/26/arm-jumps-in-to-opencl-with-both-cpu-and-gpus/ and http://blogs.arm.com/multimedia/263-why-opencl-will-be-on-every-smartphone-in-2014/) so it’ll be interesting if they support CUDA too.

    There is the Tegra 3 platform of course which has ARM CPUs with NVIDIA GPUs but I don’t think that supports OpenCL or CUDA at the moment.

  5. MySchizoBuddy
    January 10th, 2012 at 23:16
    Reply | Quote | #5

    Altera is broadcasting a webinar titled “Implementing FPGA Design with OpenCL – A Future Look”
    http://www.altera.com/b/opencl.html

  6. Ohad
    January 11th, 2012 at 13:53
    Reply | Quote | #6

    As Mark pointed out, newer smartphones/tablets already come equipped with OpenCL-supporting ARM processors.
    http://www.engadget.com/2012/01/10/powervr-series6-g6200-and-6400/
    http://www.extremetech.com/computing/112319-creative-announces-100-core-system-on-a-chip

    Will we be able to do away with our home desktop soon, and do simple calculations on our MATLAB-running smartphone with a Webtop-like interface?

  7. January 11th, 2012 at 15:53
    Reply | Quote | #7

    Hi Ohad

    An ARM port of MATLAB would be a large undertaking and I don’t think we’ll be seeing anything in the next year or two (if at all!). At the moment, the best MATLAB clones on Android phones (which mostly use ARM) are Addi and Mathmatiz (discussed at http://www.walkingrandomly.com/?p=3908 )

    The Mathworks’ have released MATLAB Mobile but that’s little more than an interface to a full instance of MATLAB running on a desktop.

    Cheers,
    Mike

  8. January 11th, 2012 at 18:03
    Reply | Quote | #8

    Mike,

    I like the idea of openCL, but that’s about all I like about it. If my advisor decided one day to make me port all of my codes from CUDA to openCL, he would have to beat me with a stick. Hard.

    CUDA is simple to learn and write – especially for “simple” problems (read: easy to parallelize with data sets small enough to fit on a single machine) on simple machines (read: your desktop workstation). NVIDIA’s freely available library support is, as the vendors you quote point out, a tremendous asset. I think the rapid – almost frenzied – adoption of CUDA is the best testament to this simplicity. (Ok, and maybe some pretty aggressive marketing by NVIDIA, but that’s not exactly a crime.) Of course for “harder” problems (read: hard to parallelize with large data-sets) on complicated machines (read: multiple CPUs and GPUs over multiple nodes with, possibly, tricky interconnnect topologies), CUDA gets combined with other parallel programming models and standards and that makes it pretty complicated too – but not complicated in a way that scientific programmers are unfamiliar with.

    OpenCL seems to be hard and unfamiliar even for the simple problems. Maybe one attraction might be that it doesn’t get much more difficult on larger machines, but even putting together a “Hello World” type program on my desktop makes openCL seem maliciously obscure and complicated. But I’m sure I’m biased.

    For what my opinion is worth, I see openCL being “adopted” when the majority of GPU-accelerated code gets written by application programmers only in the form of compiler directives. At that point, these programmers will not be very concerned about how the compiler vendors implement this acceleration be it openCL, CUDA or some other language or language-extension; we will only see “#pragma-this” or some other “!OMP-that” directive in C/C++ or FORTRAN. When these directives get really good, maybe raw CUDA and openCL code will be regarded by application programmers as the moral equivalent of assembly language. But that’s just my opinion.

    Either way, I’m excited to see it all unfold.

    Regards,

    Stu