|Page (1) of 1 - 09/21/11||email article||print page|
The Importance of Being Open: Adam Lake on OpenCL
Adam Lake, software architect and rep for the architecture review board of OpenCL, talks to Arti Gupta about heterogeneous computing and open coding.
Arti Gupta: Tell us a little bit about heterogeneous computing. What is OpenCL?
Adam Lake: When we say heterogeneous computing, what we basically mean is the ability to take advantage of all of the computer resources. You know -- there’s different instruction sets, there’s different memory models, there’s different performance and power constraints between the CPU and GPU. So being able to program for both of those devices is what we mean by heterogeneous computing, in the short term.
But in the long term, you can imagine other devices -- maybe there’re fixed function components, or maybe there’s some graphics processing capability. We want to be able to exploit all of those features and we want to be able to do it with a single program model and a single API.
That is where OpenCL comes in. What that does is it allows the programmer to write their workload with OpenCL -- and, more specifically, OpenCL C, which is just like C with a few extra bells and whistles -- to enable heterogeneous computing.
A.G.: Why do you think OpenCL would be relevant to game developers?
A.L.: This is what I feel most strongly about for the industry and why I care more about OpenCL than about other things I’ve seen in the past.
I see a transition, and in the early form it’s going to be where you can, say, do a bunch of work as a graphics architect in OpenGL -- most of my rendering engine is in OpenGL or whatever it may be. Then we can do what is called surface sharing, so you can have information or results from your OpenGL pipeline shared with OpenCL. So they can kind of work together on the same platform.
I see that as an early phase transition for the industry that is going to take many years -- five to 10 years -- to transition from just using OpenCL and OpenGL side by side to maybe just having an OpenCL-only implementation. And it wouldn’t surprise me if future console solutions talk about a future version of OpenCL being the basis for the underlying hardware architecture.
In the short term, you can take advantage of OpenCL in the studio today, for example to do global illumination solvers. The artist might work on an environment and run a solution in the evening and then come back to see how all the light balances around the room. Those are baked into what we call light maps, and they are used at render time.
A.G.: Are there advantages to writing OpenCL code for CPUs?
A.L.: There are a couple of use cases for OpenCL on the CPU. The one case is where there isn’t a discrete card in your device, so you need to be able to write your code and take advantage of the CPU, which you know is in your machine.
The second time is when you have a compute-intensive workload where, in your performance-optimization phase of developing, your code bottlenecks because it can’t get any more performance.
This is a great thing about having the OpenCL C implementation on the CPU. You can take the same OpenCL C code and basically create a device on the CPU that you then compile and schedule more work. So your workload won’t just run on the GPU; it will also run on the CPU, and you can take advantage of what may have been idle cycles. Now you are taking advantage of the CPU and getting your workload done quicker.
A.G.: So how does OpenCL compare with DirectX or similar systems?
A.L.: The biggest difference is the cross-vendor open standard. It runs across multiple vendors and multiple operating systems. That’s the key difference.
Copyright (c) 2011 Studio One Networks. All rights reserved.>
Related Keywords:Game Development, Programmer, Artist, Workstation/CPU, Computer Science, Other,