Introduction to GPU Programming
École d'ingénieurs du College of Computing, Université Mohammed VI Polytechnique, 2025
The Graphics Processing Unit (GPU) has become a mainstream component in Scientific Computing. For a relatively low cost, it provides supercomputer-level performance. However, additional work is required to adapt a standard sequential program for execution on a GPU. One of the most important tools for GPU computing is CUDA (Compute Unified Device Architecture). CUDA is essentially an extension of the C programming language that enables easy GPU programming. In this course, you will learn the fundamental principles of GPU programming and practice through numerous examples. By the end of the course, you should be able to write simple CUDA programs and run them on a GPU.
Course Contents
The course covers three main topics:
GPU Architecture
The computational and memory architectures of various commercial GPUs will be introduced. A comparison with conventional CPUs will be provided, along with an overview of emerging GPU technologies.GPU Programming with CUDA
The core concepts of CUDA and its application in developing GPU programs will be explored. Examples will be drawn from different fields, such as image processing and scientific computing. Additionally, development tools such as debuggers and performance monitoring tools will be presented.GPU Programming with Libraries and Frameworks
High-productivity computing frameworks, including OpenACC, will be introduced.
Prerequisites
The course uses C/C++. Since CUDA is an extension of the C programming language, it is essential to refresh your C skills before starting the CUDA module.
Many online tutorials cover C programming. Ensure you know how to compile a C program from the command line (e.g., using GCC) and can write basic C programs.
Recommended Reading
- CUDA for Engineers by Duane Storti and Mete Yurtoglu.
- Programming Massively Parallel Processors by David Kirk and Wen-mei W. Hwu.