GPU Programming

Professor Libby Shoop, Macalester College
Yu Zhao, Macalester College

Summary

As modern Graphics Processing Unit (GPU) harnessed more and more horsepower, programmers began to use GPU for General Purpose computation, instead of just for graphics rendering. NVIDIA® Corporation developed CUDA, a parallel computing platform and programming model, to improve computing performance for parallel computation problems. In this module, we will learn how to solve parallel problems more efficiently by writing programs in CUDA C Programming Language and then executes them on GPUs based on CUDA architecture.

This module uses the CUDA parallel computing platform; developer's SDK and toolkit can be found on NVIDIA's website.

Module Characteristics

Languages Supported: C
Relevant Parallel Computing Concepts: Data Parallelism
Operating System Supported: Mac OS, Linux, Windows
Possible Course Use: Programming Languages, Hardware Design, Parallel Computing Systems
Recommended Teaching Level: intermediate, Advanced


Learning Goals

  • Students should be able to grasp the basic ideas behind GPU Programming and CUDA computing platform
  • Students should be able to write CUDA programs independently that perform basic mathematical computations
  • Students should be able to design CUDA programs that can process data in parallel manner

Context for Use

  • This module can be taught in a C Programming Language based course or in a course in which students have had prior C Programming Language experience. Student with little or no knowledge of C Programming Language will find materials inside this module difficult to apprehend, and therefore adequate of C Programming Language background is mandatory.
  • It is designed for use as a lab.
  • Depending on curriculum, this module could be considered to be at an "intermediate" or "advanced" level.

Description and Teaching Materials

You can visit the module in your browser:

GPU Programming

or you can download the module in either PDF format or latex format.

PDF Format: GPUProgramming.pdf.
Latex Format: GPUProgramming.tar.gz.
Word Format: GPUProgramming.docx.

Teaching Notes and Tips

  • If you are interested in using NVIDIA®'s CUDA parallel computing platform, you must have a qualified NVIDIA GPU installed on your computer. To find out whether your GPU card is qualified, visit CUDA GPUs Page.
  • For this version of the module using CUDA C Programming Language, the machines in your computer lab must have a standard C compiler (GNC's gcc compiler is fine.)
  • You will also need an NVIDIA device driver, which is available at Driver Page.
  • You will also need a CUDA development toolkit, which is not currently available.
  • Note: This module is written in the form of progressive mode. To be more specific, every following chapter is more complicated and difficult than the previous chapter. We design this module like this so that instructors can decide how many chapters to include into their own schedule. Based on our estimates, If instructor have two or three course periods, we advice you to proceed only the first 3 chapters. If instructor have more than a week, we advice you to finish all the chapters.

Assessment


References and Resources




Comment? Start the discussion about GPU Programming