|
Using GPUs for Parallel Processing
The GPUs inside graphics cards have tremendous parallel processing capabilities and research is on to use this capability for non-graphics applications
Sujay V Sarma
Saturday, March 10, 2007
Thought graphics cards could do only graphics? Think again! If you look at
the action in the x86 graphics processing arena over the past six months or so,
you would notice they are talking about something called 'Stream Computing.' To
be truthful, stream computing by itself is nothing new. It is taking a process
with multiple threads that can be executed independently of each other, and
executing them in one go using multiple processors in parallel. How is this
related to graphics processors? We will get into the details shortly, but
consider this: a modern graphics processor (GPU) consists of up to 128 parallel
processing units called 'pixel shaders.' Now these pixel shaders cannot do
fantastic things by themselves individually. But take a bunch of them and run
parallel threads through them and you will get much better computer performance.
This has value in applications that have a large pool of data and
the same instruction needs to be applied to all of it. Some applications that
require this sort of computing are used for protein sequences analysis and
geographical data mapping from satellites. So how does stream computing on
graphics processors affect you? Until now, stream computing involved special
stream computing machines (much like super computers) and were restricted to
high-budget research institutions. But now, as graphics cards have this spare
computing capacity within them, they can be harnessed for the same effect at a
much lower cost. And, vendors of such cards (like AMD/ATi and NVIDIA) have come
up with mechanisms to let software developers produce stream computing
applications that can run on an off-the-shelf workstation with nothing more
powerful than a modern graphics card. So maybe your next payroll processing
engine will need the latest high-end gaming card instead of the latest in server
clusters to do their job faster.
|
Direct Hit! |
|
Applies To: IT managers
USP: Learn about GPUs and how they are harnessed for other
computing applications
Primary Link: www.gpgpu.org
Google Keywords: gpgpu/ stream computing |
|
Inside a modern GPU
Inside a GPU on any modern graphics card you pickup, there are specialized
processors (let's call them 'cores' instead) called 'vertex' and 'fragment'
shaders. A vertex shader operates on a vertex of any polygon being considered
for rendering. For instance, such a processor would determine the position and
color of the vertex. A fragment shader works on sets of pixels and generates
lighting effects (for example) on these pixels. Different shader models that
have evolved in-step with successive DirectX specifications have increased the
capabilities of what GPUs can do. For instance, higher floating point precision
called double-precision, involving 64-bit values instead of traditional 16 or 32
bit ones has enabled a lighting effects paradigm called HDR (High Dynamic Range)
that allows for more realistic shadows and effects.
Consider a GPU with 8 layers of 8 fragment shaders. This makes up 64 cores.
This group can render 64 fragments simultaneously. This sort of processing is of
course called SIMD (Single Instruction Multiple Data) that we discussed in an
earlier part of this series. To sum up, SIMD is an operation where you apply a
single instruction (or transformation) on multiple data elements. For example
increasing the light on a set of rendered pixels is an example of SIMD. Let's
take SIMD a step further.
|
 |
|
A GPU can be used to
perform non-graphics tasks by sending those threads of a multi-threaded
application that can be executed independently of each other to pixel-shader
cores in the GPU, using a special instruction helper framework |
Page(s) 1 2
|