Strata Gems: Use GPUs to speed up calculation

GPUs bring massively parallel computing into reach

We’re publishing a new Strata Gem each day all the way through to December 24. Yesterday’s Gem: The emerging marketplace for social data. Early-bird pricing on Strata closes December 14: don’t forget to register!

Strata 2011 The release in November of Amazon Web Services’ Cluster GPU instances highlights the move to the mainstream of Graphics Processing Units (GPUs) for general purpose calculation. Graphical applications require very fast matrix transformations, for which GPUs are optimized. Boards such as the NVIDIA Tesla offer hundreds of processor cores all able to work in parallel.

While debate is ongoing about the exact range of performance boost available by using GPUs, reports indicate that speedups over CPUs from 2.5 to 15x can be obtained for calculation-heavy applications.

NVIDIA has led the trend for general purpose computing on GPUs with the Compute Unified Device Architecture (CUDA). By using extensions to the C programming language, developers can write code that executes on the GPU, mixed in with code running on the CPU.

NVIDIA’s Tesla M2050 GPU Computing Module

While CUDA is NVIDIA-only, OpenCL (Open Computing Language) is a standard for cross-platform general parallel programming. Originated by Apple, and heavily influenced by CUDA, it is now developed with cross industry participation. ATI and NVIDIA are among those who offer OpenCL support for their products.

Now with Amazon’s support for GPU clusters, it’s easier than ever to start accessing the power of GPUs for data analysis. OpenCL and CUDA bindings exist for many popular programming languages, including Java, Python and C++, and the R+GPU project gives GPU access for the R statistical package.

To get a quick impression of what GPU code looks like, check out this example from the Python OpenCL bindings. The code to execute on the GPU is called out in bold text.

Amazon’s Werner Vogels will be among the keynote speakers at Strata.

tags: , , , ,