1 [[!meta title="General-purpose computing on graphics processing units"]]
3 [GPGPU][] utilizes the number crunching speed and massive
4 parallelization of your [graphics card][GPU] to accelerate
5 general-purpose tasks. When your algorithm is compatible with GPU
6 hardware, the speedup of running hundreds of concurrent threads can be
9 There are a number of ways to implement GPGPU, ranging from
10 multi-platform frameworks such as [OpenCL][] to single-company
11 frameworks such as [NVIDIA][]'s [CUDA][]. I've gotten to play around
12 with [CUDA][] while TAing the [[parallel computing]] class, and its
15 With NVIDIA (other vendors are probably similar, I'll update this as I
16 learn more), each GPU *device* has a block of global memory serving a
17 number of multi-processors, and each multi-processor contains several
18 cores which can execute concurrent threads.
20 Specs on NVIDIA's [GeForce GTX 580][]:
22 * 512 cores (16 (MP) ⋅ 32 (Cores/MP))
24 * 192.4 GB/sec memory bandwidth
25 * 1.54 GHz processor clock rate
26 * 1.58 TFLOPs per second
30 The FLOPs/s computaton is `cores⋅clock⋅2`, because (from [page 94][]
31 of the CUDA programming guide) each core can exectute a single
32 multiply-add operation (2 FLOPs) per cycle. Also take a look at the
33 graph of historical performance on [page 14], the table of device
34 capabilities that starts on [page 111][], and the description of
35 *warps* on [page 93][].
37 [GPGPU]: http://en.wikipedia.org/wiki/GPGPU
38 [OpenCL]: http://en.wikipedia.org/wiki/OpenCL
39 [GPU]: http://en.wikipedia.org/wiki/Graphics_processing_unit
40 [NVIDIA]: http://www.nvidia.com/
41 [CUDA]: http://en.wikipedia.org/wiki/CUDA
42 [GeForce GTX 580]: http://www.nvidia.com/object/product-geforce-gtx-580-us.html
43 [page 14]: http://developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/CUDA_C_Programming_Guide.pdf#page=14
44 [page 93]: http://developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/CUDA_C_Programming_Guide.pdf#page=93
45 [page 94]: http://developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/CUDA_C_Programming_Guide.pdf#page=94
46 [page 111]: http://developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/CUDA_C_Programming_Guide.pdf#page=111
48 [[!tag tags/hardware]]
49 [[!tag tags/programming]]