OpenCL 2.0 brings new graphics-chip power to software

A new version of the interface makes software running on graphics chips more self-reliant and better at sharing data with conventional software running on CPUs.

OpenCL, a standardized interface that lets general-purpose software run on increasingly powerful graphics chips, has become a foundation for several computing projects.
OpenCL, a standardized interface that lets general-purpose software run on increasingly powerful graphics chips, has become a foundation for several computing projects. Khronos Group

The Khronos Group announced OpenCL 2.0 on Monday, an update designed to give graphics chips more independence and therefore power when running general-purpose software.

OpenCL provides a standard mechanism for software to tap into the computational power of graphics chips, and the Khronos Group standardizes it. It announced a provisional 2.0 specification the Siggraph 2013 conference this week, planning to make it final after a six-month feedback period.

Graphics processing units (GPUs) are geared for graphics chores, of course, but they're also becoming steadily more capable of handling jobs ordinarily assigned to the general-purpose central processing unit (CPU). That's in part because GPUs are designed to do many tasks in parallel, which is can be useful for mathematical calculations such as for simulating splashing liquids or rustling curtains in video games.

One of the chief difficulties of using the GPU for general-purpose software -- an approach called GPGPU -- is that programmers must write software that runs on both the GPU and CPU. The CPU's software is ultimately in charge, but programmers still have to figure out how to coordinate the two software components and to use data in memory.

OpenCL 2.0 offers improvements in both these domains.

It lets programmers share complex data structures in memory rather than rely on the slower and more laborious method of transferring data from one component to another.

And OpenCL 2.0 also can take control of more of its own destiny, scheduling new computing tasks on its own rather than rely on -- and wait for -- the CPU.

"It eliminates bottlenecking on the host and enables flexible programming techniques," said Neil Trevett, who is the OpenCL chairman, the vice president of mobile content at graphics chipmaker Nvidia, and the Khronos Group's president.

OpenCL logo

OpenCL provides an abstraction layer that lets programmers perform these tasks without knowing the particulars of the GPU itself. A graphics chipmaker writes driver software that maps the OpenCL commands into native commands for a particular chip. It's the same approach that Khronos uses for its more widely used interface, OpenGL, which is geared for graphics tasks.

OpenGL has been around for years, but in the video game world, its use paled in comparison to Microsoft's own DirectX technologies built into Windows. The balance of power has changed, though: Apple's OS X uses OpenGL, and Android and iOS use a stripped-down version called OpenGL ES.

OpenGL ES also has another ally in the computing realm, WebGL. This standard provides an interface that lets Web apps tap into hardware-accelerated 3D graphics. Google, Opera, and Mozilla endorsed it, and with the forthcoming IE11 Microsoft reversed its earlier opposition to WebGL.

The Web variation of OpenCL, though, called WebCL, faces more difficulties. Although Nokia maintains a plug-in that brings WebCL support to Firefox, the patch for native WebCL support in Firefox is dormant. And security concerns mean Google so far has decided against supporting WebCL.

Work to improve WebCL security through OpenCL changes and an WebCL Kernel Validator could help resolve at least some concerns.

"WebCL is following the same 'design first for security' approach" that WebGL followed, Trevett said. "The WebCL specification is not even complete yet, so it is early days."

Featured Video

Outcry over iPhone 'Error 53' and bad USB Type-C cables

Be careful when replacing parts. Poorly made cables can fry a laptop, and iPhones will stop working if the Touch ID button is repaired outside of Apple. It's a lesson some are learning the hard way.

by Bridget Carey