We start a short series of reports from the SC11 conference (thanks to Will Sawyer of CSCS for sharing with us his experiences). The first episode is dedicated to an Introduction to OpenCL given by Benedict Gaster (AMD) and Tim Mattson (Intel).
General impressions: the architecture and programming model seems cleaner than CUDA, e.g., the architecture model hierarchy: compute devices -> compute units -> processing units, as well as the execution model of work groups which contain work items. As a paradigm, OpenCL seems to be sufficiently powerful to map programs to a non-trivial set of devices, i.e., multiple GPUs and multiple CPUs with multiple cores. But there are many steps to writing an OpenCL program, some of them complex. The presenters made it clear this is necessary to support such a wide range of processors, but claim it is mostly boilerplate and can be cut and pasted after the first implementation (and auto-generated at some later stage).
A key deficiency seems to be the decision to base OpenCL on the ISO C99 C language standard (with minor restrictions, e.g., no recursion and no variable length arrays), instead of C++. The other deficiency which both presenters admitted is the myth of portability: although OpenCL code can be run on both CPU and GPU, optimization choices made is several of the examples for GPUs caused the code not to run on CPUs. Besides the typical simple vector add and matrix multiplication
examples, they also presented a (non-trivial) parallel radix sort, which is allegedly the best performing sort algorithm on GPUs.
In the final question of the session, Tim and Ben were asked whether companies like Intel, AMD and NVIDIA playing both sides: supporting OpenCL on the one hand, Tim (in spite of his affiliation) made an emphatic statement: “industries will act stupidly if you [i.e., the users] allow them to. Every time you use CUDA you are damaging the community.”
The release schedule has a cadence of about 18 months: OpenCL 1.0 in Dec. 2008, 1.1 in Jun. 2010 and 1.2 expected around Dec. 2012.