Graphics Processing Units (GPUs)
GPUs
From Wikipedia: A graphics processing unit or GPU (also occasionally called visual processing unit or VPU) is a specialized processor that offloads 3D graphics rendering from the microprocessor. It is used in embedded systems, mobile phones, personal computers, workstations, and game consoles. Modern GPUs are very efficient at manipulating computer graphics, and their highly parallel structure makes them more effective than general-purpose CPUs for a range of complex algorithms.
GPU Based Computing
GPU computing is the use of a GPU (graphics processing unit) to do general purpose scientific and engineering computing. The model for GPU computing is to use a CPU and GPU together in a heterogeneous computing model. The sequential part of the application runs on the CPU and the computationally-intensive part runs on the GPU. From the user's perspective, the application just runs faster because it is using the high-performance of the GPU to boost performance.
NVIDIA is foremost in developing such systems.
borg3.physics.drexel.edu
borg3.physics.drexel.edu is the system we will use in this course. See its configuration.
This system harbors two NVIDIA Tesla M1060 GPUs. These are the 1U version (no fan — they rely on the chassis fan) of the Tesla C1040. Check the specifications of this GPU.
CUDA
From Wikipedia: CUDA (an acronym for Compute Unified Device Architecture) is a parallel computing architecture developed by NVIDIA. CUDA is the computing engine in NVIDIA graphics processing units or GPUs that is accessible to software developers through industry standard programming languages. Programmers use 'C for CUDA' (C with NVIDIA extensions), compiled through a PathScale Open64 C compiler, to code algorithms for execution n on the GPU. CUDA architecture supports a range of computational interfaces including OpenCL and DirectCompute. Third party wrappers are also available for Python, Fortran, Java and Matlab.
Learning CUDA
- NVIDIA maintains numerous CUDA tutorials, references and language descriptions on its web site. Look in particular at Cuda Training.
- An interesting primer is that of Seland.
- Also look at
the CUDA
C Programming Guide and other documentation distributed in
the CUDA
toolkit. Because the toolkit is a critical part of a working
CUDA installation, it may already be installed on your system.
On
borg3
, look in/usr/local/cuda/
. - The CUDA SDK (download links on
the CUDA
toolkit page) contain lots of useful examples. Your sysadmin
may have installed it while setting up CUDA on your system.
On
borg3
look in/usr/local/cuda/doc/NVIDIA_GPU_Computing_SDK/
. - David Kirk, NVDIA, and Wen-Mei Hwua, ECE, U of Illinos, have written an excellent textbook on CUDA: Programming Massively Parallel Processors. Download an early draft.
- The book GPU Gems 3 contains great demonstration GPU codes.
Learning CUDA by example
Jason Sanders and Edward Kandrot's CUDA by Example contains a number of example problems. Here are solutions to some of the problems: