Where is OpenCL?

skaertus

macrumors 68040
Original poster
Feb 23, 2009
3,328
449
Brazil
OpenCL was released with Snow Leopard, four years ago, and promised revolutionary GPGPU. But I don't see many apps actually using it. Is it indeed a failure?
 

printz

macrumors regular
Dec 23, 2012
216
0
Is it still preinstalled and at good maintenance on OSX 10.8? I imagine I can use it in my own programs which use parallel processing. Isn't it just a tool, and a free one at that?
 

maflynn

Moderator
Staff member
May 3, 2009
64,985
30,917
Boston
How would you know if developers where using it? I mean if they opted to leverage OpenCL in their code, how would you notice?
 

skaertus

macrumors 68040
Original poster
Feb 23, 2009
3,328
449
Brazil
How would you know if developers where using it? I mean if they opted to leverage OpenCL in their code, how would you notice?
Look here: http://openclnews.com/apps

The list of apps is pretty small, despite the fact that OpenCL has been available for 4 years.

Apple never hid the fact that OpenCL was difficult to implement in apps. Any company that took the effort to use OpenCL would almost certainly market it extensively. But just a few did.
 

Moriarty

macrumors 6502
Feb 3, 2008
417
127
You need to understand what OpenCL (and GPU computing in general) is good for, and what CPUs are good for, to understand why it hasn't been implemented a lot more (and also why it's not necessarily faster).

GPUs are very good at one thing: performing long calculations on large arrays of data. That is, processing video, scientific data, etc. On a consumer-level laptop or desktop GPU with well-optimised code your speedup is typically less than an order of magnitude. Often you'll find your CPU is actually faster and that you need a Tesla card to see real benefits.

There is a significant bottleneck in transferring data between your main RAM memory and the GPU's memory - the data needs to be transferred to the GPU, operated on, then transferred back. This is why your typical applications such as email, iTunes (and so on) do not use the GPU. They don't operate on large arrays of data and so if you did try to use the GPU, you would actually slow things down.

Basically, OpenCL and CUDA are nice. Just don't fall for Apple's marketing speak, instead try to understand what the technologies actually do and you'll realise that most people won't see any significant benefit for a few years yet.