Earlier this month, the OpenCL specification was released by the Khronos group. Khronos is a group made up of representatives from companies in the computing industry. The group focuses on creating and managing standards for graphics, multimedia and parallel computing on everything from mobile devices to desktop and workstation computers. Part of Khronos' charge is OpenGL and all it's relatives with the Open- prefix, so naming also makes sense.

 

 

The goal of OpenCL is to make certain types of parallel programming easier and to provide vendor agnostic hardware accelerated parallel execution of code. That's a bit of a mouth full, but the bottom line is that OpenCL will give developers a common set of easy to use tools to use to take advantage of any device with an OpenCL driver (processors, graphics cards, ect.) for the processing of parallel code.

While there are already tools available that enable parallel processing, these tools are largely dedicated to task parallel models. The task parallel model is built around the idea that parallelism can be extracted by constructing threads that each have their own goal or task to complete. While most parallel programming is task parallel, there is another form of parallelism that can greatly benefit from a different model.

In contrast to the task parallel model, data parallel programming runs the same block of code on hundreds (or thousands or millions or ...) of data points. Whereas my video game may have threads for handling AI, physics, audio, game state, rendering, and possibly more finely grained tasks if I'm up to the challenge, a data parallel program to do something like image processing may spawn millions of threads to do the processing on each pixel. The way these threads are actually grouped and handled will depend on both the way the program is written and the hardware the program is running on.

 

 

As we've said many times in the past, graphics is almost infinitely parallelizable. Millions of pixels on the screen can all act (mostly) independently of each other. Light weight threads handle the calculation of everything that has to do with a particular pixel. As pixels get smaller and we pack more on screens, there is more opportunity for parallel work. Graphics cards are currently the best data parallel processing engines we have available. And once OpenCL drivers are available, developers will have access to all that horsepower for any other data parallel tasks they see fit.

Now, it won't make sense to run a word processor on your graphics card, as there just isn't enough happening at once to take advantage of the hardware. Single threaded performance on a GPU isn't that great, especially compared to a general purpose CPU, and trying to run code that isn't massively parallel just isn't going to be a great idea. But there are plenty of things that can benefit from the GPU. Basically any multimedia processing can benefit, from video and audio decoding, editing, and encoding, to image manipulation, to helping speed up your math homework (brute force computation ala Maple, Matlab, and Mathematica could certainly benefit from the GPU). There could be some interesting encryption and/or compression techniques that are born out of the data parallel approach as well.

The best applications of data parallel computing have likely not been seriously considered at this point, as it takes time to get from the availability of tools to the finished product, let alone the conception of ideas that have heretofore been precluded by the realities of parallel programming. But OpenCL isn't a miracle that will make everything speed up. Rather it is a vehicle by which developers will be able to make a small subset of tasks orders of magnitude faster using hardware that is already in most people's computers. Which is certainly nice. But let's take a closer look.

Parallel Computing: Why We Need OpenCL
POST A COMMENT

37 Comments

View All Comments

  • melgross - Thursday, January 01, 2009 - link

    It's interesting that while ATI and Nvidia are heavily mentioned with their rapidly depreciating standards, Apple, which after all, developed OpenCL isn't mentioned even once, though it will also likely be the first to implement OpenCL in 10.6 later this year, possibly by March. Even their Logo isn't shown. Very strange! Reply
  • Wwhat - Monday, January 05, 2009 - link

    By march they might (should) not be the first but graphicscard makers should have updated their drivers to support it already, after all they were well aware of OpenCL long before and already announced they would support it, and nvidia said that porting to it would be easy, plus both ATI and nvidia have no problem at all releasing unstable software/drivers, none at all, as we all experienced.
    Oh and nvidia had an OpenGL3 driver out in like 2 days after final specs and ATI a in a few weeks, so that makes you think they can put some steam behind their efforts if they want to.
    Reply
  • dvinnen - Thursday, January 01, 2009 - link

    The logo picture was taken from their site Reply
  • rdbrown - Friday, January 02, 2009 - link

    On the the Khronos website right above the "Logos" Apple is the one who initially proposed the working group, Apple is also mentioned in the list of companies. They must not of posted Apple's logo knowing that everyone who knows anything about Open CL knows that it is Apple's technology, Heck Apple even owns the trademark rights. Reply
  • melgross - Thursday, January 01, 2009 - link

    At least they should have been mentioned in the article. Reply
  • yyrkoon - Thursday, January 01, 2009 - link

    And to say what ? That Apple feeling left out in the cold has made efforts to take the next obvious step and standardize GPU processing( very late in the game )? That is, assuming what you're saying is true.

    Gee, how very innovative of them.
    Reply
  • hakime - Saturday, January 03, 2009 - link

    Shut up you are trolling!! You don't know what you are talking about, period.

    The fact that there is not reference of Apple in the article is a serious drawback. Apple invented and designed Open CL as mush as SGI invented and designed Open GL, ignoring it is simply wrong. Credit to who is deserved for, and Apple deserved the credit for inventing Open CL, you have to admit it either you like Apple or not.

    Apple has taken the industry of HPC upside down with Open CL, for the first time there is one single state of the art API and environment for high performance, multi-core and GPU programing, which is also OS and hardware independent. Open CL goes well beyond Direct X, as the latter is not only limited to what you can do for GPGPU, but also it is only designed for GPU (Microsoft is very late in the world of GPGPU, Apple has been targeting the GPU for high performance processing for a while now with Core Image and Core Video).

    Open CL offers an unique interface for both CPU and GPU, which in other words means that it brings together different technologies like Open MP or CUDA, this is unique in the industry, Apple deserves the credit for having created this single interface.

    Open CL is designed to target a large set of devices like CPU, GPU, Cell chips, DSPs, Direct X can't do that. Open CL targets small factor devices like the iPhone, Direct X does not and can not.

    Not only the author of the article fails to recognize this unique aspect of Open CL, but he also fails to comment on the effort made by Apple in creating Open CL. Again you like Apple or not, that does not matter, give the credit to who it is deserved for and get the facts right.

    Please correct the article and make it more interesting on what Open CL is really for, not the general bla, bla which is written.

    Thanks.
    Reply
  • ltcommanderdata - Thursday, January 01, 2009 - link

    Which part isn't true? That Apple developed OpenCL and then submitted to Khronos? Since even Khronos admits that is true.

    http://www.khronos.org/news/press/releases/khronos...">http://www.khronos.org/news/press/relea...es_heter...

    "Apple has proposed the Open Computing Language (OpenCL) specification to enable any application to tap into the vast gigaflops of GPU and CPU resources through an approachable C-based language."

    Apple's Aaftab Munshi was also the chairman of the OpenCL working group.

    And how is OpenCL late in the game? I'm pretty sure that DirectX 11 is the only standardized GPGPU implementation across multiple vendors, but it's still in beta. In comparison OpenCL has been ratified, in record time compared to OpenGL 3.0, probably due to Apple's pressure to get it ready for Snow Leopard. And nVidia has already released OpenCL drivers for Windows and Linux.

    http://developer.nvidia.com/object/opengl_3_driver...">http://developer.nvidia.com/object/opengl_3_driver...
    Reply
  • yyrkoon - Thursday, January 01, 2009 - link

    Oh, and sorry, my original point was something like this. While the true innovative companies are squabbling about whose product is superior, Apple sneaks up behind them, and claims to have invented the internet. In other words, whether Apple participated or not, an open standard would have been made. Reply
  • melgross - Friday, January 02, 2009 - link

    You're not very knowledgeable. You ARE very anti-Apple apparently.

    And why do gamers have to be the most beneficial parties? What's so great about gaming? Besides, OpenCL will benefit them, as well as parties that won't be benefitted by DirectX. Is that a bad thing? To you, it seems to be.

    If MS had developed this, you would be jumping up and down, and claiming that it was the next step beyond the now old DirectX methodology, and far more useful.

    Like it or not, this IS a major innovation, otherwise, so many companies of note wouldn't be signing on so quickly.

    Whether Windows users benefit from this, or are left out of it is up to MS, who seems only interested in destroying standards that don't result in MS's increasing dominance. Too bad for them! That doesn't work too well anymore.

    You know nothing about innovation at all. That's sad. Just go on being blinded by your prejudices, we all see it for what it is.
    Reply

Log in

Don't have an account? Sign up now