CUDA Minicourse Fall 2012

From oldwiki.scinet.utoronto.ca
Jump to navigation Jump to search

This wiki page contains the course material for the joint CITA/SciNet CUDA mini course, Oct-Nov 2012.

GPU Minicourse Syllabus

Graphical Processing Units (GPUs) can perform certain computations tremendously faster than traditional CPU processors. This mini-course will introduce the students to the basics of GPU programming, with an emphasis on the practical knowledge of how to write, run, and optimize GPU-code.

Topics to be covered:

  • History of GPUs
  • NVIDIA GPU architecture
  • The CUDA programming language
  • Debugging
  • Profilers
  • Performance considerations & optimization
  • Introduction to OpenCL
  • Programming on multiple GPUs

Evaluation will be in the form of weekly programming exercises; a course-long GPU project is available as an alternative for those not seeking credit. The course will deal exclusively with NVIDIA GPUs, and focus on the CUDA programming language, although we will briefly discuss OpenCL. However, the basic concepts and techniques carry over to programming the GPUs of other vendors.

Prerequisites include a basic knowledge of numerical programming in C or C++ - how to compile a program, how to call functions, how to represent arrays and matrices with pointers.

For homeworks, temporary accounts will be made available on SciNet's ARC cluster, or students with existing SciNet accounts can request ARC access.

Classes - Topics, Slides, and Source Code

  • Oct 12 -- History of GPUs, NVIDIA GPU architecture, first CUDA example
  • Oct 19 -- Blocks, Grids, and Shared Memory
  • Oct 26 -- CUDA devel tools: SDK examples, debugger, libraries, profiler
  • Nov 2 -- Memory access & coalescing
  • Nov 9 -- Occupancy & latency
  • Nov 16 -- Using Multiple GPUs:
  • Nov 23 -- Other Programming Models - OpenCL, PyCUDA/PyOpenCL, OpenACC

Resources

The CUDA C Programming Guide is a succinct and useful description of programming in CUDA C, which will be the language of this course:

http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Programming_Guide.pdf

The NVIDIA CUDA Zone webpage

http://developer.nvidia.com/category/zone/cuda-zone

contains links to a number of useful resources - videos and slides of lectures from other institutions, papers describing CUDA porting of existing scientific codes, and documentation. Some relevant introductory material is linked to from here:

http://developer.nvidia.com/cuda/get-started-cuda-cc

Other useful webpages are GPUScience:

http://gpuscience.com/

which describes recent GPU-powered papers and algorithms, and GPGPU.org

http://gpgpu.org/

which lists the abstracts of recent papers and conference CFPs.

A users guide for the ARC cluster can be found on the SciNet wiki,

https://wiki.scinethpc.ca/wiki/index.php/GPU_Devel_Nodes


Assignments

Course evaluation will be based on weekly programming assignments, given out after each class, and each due the following Thursday afternoon to give the instructors time to address any uncovered issues with the presentation of the material covered the following class. Each assignment will be weighted equally in determining the following grade.

Those wishing to work on a project can instead work with the instructors each week after the class (or at other times by appointment) to make progress on a GPU programming project relevant to their research interests.