For more information, join the team subscribe to the mailing list
at the bottom of the Launchpad page
http://launchpad.net/~hybrid-graphics-linux
Please join this team if you are new by clicking on the "Join
Team" link at the right of the Launchpad page. It's important to
have as many users in the community as possible to request for
appropriate support.

Friday, 11 December 2009

Linux CUDA/OpenCL for hybrid graphics laptops

Since the inception of the hybrid graphics laptop -- a laptop that has both an integrated stamina graphics chipset and a discrete high-speed graphics card, there has been a lot of buzz on the Internet about smart ways to harness the computational power of the powerful discrete GPU. In an ideal world, all apps would seamlessly use both the CPU and GPU computing power, and a hybrid graphics laptop would use one or both depending on the stamina/speed configuration.

Hybrid graphics laptops have been around for a while. In the Linux world, the first line of hybrid graphics laptops was the Sony Vaio SZ-series, introduced 4 years ago. This laptop allowed for a stamina/speed cold switch through the BIOS, with minor modifications required on the Linux configuration. Nowadays, we have reported successeses for cold and hot switching on/off the discrete graphics card in different laptop models, like the Sony Vaio Z-series, the Lenovo ThinkPad T500 or the Acer Aspire Timeline 4610TG.

And while CUDA is an exciting new technology, it's still Nvidia specific, and alternatives like the OpenCL are bound to reach mainstream in the near future.

Despite all efforts, the OpenCL Linux stack still needs some tender loving care from the community. That's why it's important that Linux users make their voice heard and ask for a good OpenCL Linux stack:

Efforts like the Linux OpenCL API Ubuntu Brainstorm would open a new field of possibilities for the Linux ecosystem, combining the openness of Linux development with the sexiness of Apple-backed OpenCL ecosystem.

We hope to be able to report more about Linux OpenCL in the future, but here are some concepts to keep you interested until then:

CUDA is a parallel computing architecture from Nvidia that allowsprogrammers to tap Nvidia GPUs processing power for general purposecomputations. CUDA is only available for Nvidia hardware and itprogramming requires specific knowledge of Nvidia GPU architectures.

On the other hand, OpenCL is a framework for writing programs thatexecute across heterogeneous platforms consisting of CPUs, GPUs, andother processors. It allows parallel code to be written and executedacross the different platforms in a computer -- usually the CPUs andthe GPU. The goal of OpenCL is to achieve code independence from thespecific architecture that will execute it, like Intel or AMD CPUs andNvidia or AMD/ATI GPUs. So if you write a computational code inOpenCL, ideally, you can compile the same code for any combination ofIntel, Nvidia or AMD/ATI processors.

The Nvidia Linux drivers introduced CUDA starting from version 190.42,but not OpenCL features.

These drivers contain, for example, the VDPAU libraries, to allowvideo programs to offload portions of the video decoding process andvideo post-processing to the GPU video-hardware. So if you install itin your nvidia hybrid graphics linux laptop, you will be able to runapplications that use VDPAU for video playback. Additionally, you canalso install cuda-sdk and cuda-toolkit, and experiment with them bywriting, compiling and executing you own CUDA code.

There are already packages in the Linux system that will make use of aCUDA-enabled system. Brandon Snider has made available commonly usedapplications like mplayer or xine-lib in the Nvidia Vdpau LaunchpadTeam:

This is ideal for a breed of hybrid graphics laptops like the SonyVaio Z-series, or the Asus UL30Vt/UL80Vt, that will seamlessly play HDvideos by enabling the computational power of the Nvidia GPUprocessor.