Welcome to the 2020/2021 module page for COM4521/COM6521 Parallel Computing with GPUs.
Accelerator architectures are discrete processing units which supplement a base processor with the objective of providing advanced performance at lower energy cost. Performance is gained by a design which favours a high number of parallel compute cores at the expense of imposing significant software challenges. This module looks at accelerated computing from multi-core CPUs to GPU accelerators with many TFlops of theoretical performance. The module will give insight into how to write high performance code with specific emphasis on GPU programming with NVIDIA CUDA GPUs. A key aspect of the module will be understanding what the implications of program code are on the underlying hardware so that it can be optimised.
The modules aims, objectives and assessment details are available on the modules public teaching page.
Software for the Module
The module programming exercises are designed to be completed on PCs in the Diamond compute labs. As the modules teaching is online these machines are available via virtual desktop. All Diamond compute lab machines have Visual Studio 2019 and CUDA 11.1 If you intend to use your own machine for programming exercises (on the CUDA part of the module) then you must install the latest Community version of Visual Studio 2019 before you install the CUDA 11.1 toolkit.
If you want to complete the exercises in Linux then example Makefiles will be provided with the lab starting code and solutions. It is not possible to build Linux CUDA programs on PCs in the Diamond compute labs.
Computers and Labs Available
As the module requires access to a machine with a GPU the following have been made available to you.
- Diamond Virtual Computer Lab 1 - This is reserved for exclusive access during the scheduled lab hours. You can access this lab by opening myTimetable and selecting the COM4521/COM6521 lab session which provides a link to the virtual room. The machines in this room are the same as the Diamond all in one machines and have a NVIDIA GTX1050 GPU.
- Diamond High Spec Lab Reservation - This is reserved for exclusive access during the scheduled lab hours. You can access this lab by opening myTimetable and selecting the COM4521/COM6521 lab session which provides a link to the virtual room. The machines in this room are the same as the Diamond High Spec lab and have an NVIDIA Quadro P4000.
- Diamond High Spec Lab - Computer Room 4 - This room can not be reserved but machines can be requested. These machines have slightly higher capability GPUs (Quadro P4000) but are limited in availability.
- Any other Diamond Computer Lab - These machines can be requested at any time and have GTX 1050s.
- Your own Windows/Linux machine - Follow the instructions under “software for this module”.
Course Attendance Monitoring
Lab attendance is recorded through Blackboard collaborate. You are expected to attend labs to get assistance form the module leader and course demonstrators. It is not possible to properly understand the course material without completing the labs and reviewing the solutions. If you do not complete the labs then you will find the assignment difficult.
Lab class Guide
Assistance with the course material is provided through online labs. Each week is designed to provide support for a particular set of lectures and lab material. You are however free to ask about any of the lab content or assignment help in any of the lab classes.
In response to student feedback the number of assignments has been reduced to a single assignment this year which reflects the reduced number of learning objectives for the module. The assignment will be released Monday the 1st March 2021 (week 4) and is due 17:00 on Monday 17th May (week 12). The assignment forms 80% of your mark. You are expected to ask for feedback on your assignment work during the scheduled lab classes.
The remaining 20% of the module mark is from two mole quizes which can be taken remotely only at the specified times
- Week 5 - During the first half of the lab (11:00-12:00 08/03/2021)
- Week 9 - During the first half of the lab (11:00-12:00 26/04/2021)
DDP students and Staff Candidates
PhD students and research/academic staff are not required to undertake assessment but DDP students are expected to attend labs as evidence of participation in the module.
Discussion, Announcements and Requests for Help
A Google group has been created for announcements, help and discussion. Any important announcements relating to the module will be made via this group. All students enrolled on the module on the 4th February 2021 have been added to this group already. If you have transferred via Add/Drop then you will need to manually join the group yourself. The group is monitored by the teaching staff (including lab assistants) as well as additional PhD students who can provide help. The purpose of the mailing list is to ask for general support and guidance with the course material (e.g. with concepts and ideas) rather than posting your own code. You should not post your assignment code on this forum. If you require personal assistance with your assignment code then you should request this during the lab hours. Any lab class can be used for assignment help in addition to the lab exercises which are set each week.
Course Material Material
Lectures are pre-recorded and are availble on the COM4521 Parallel Computing with Graphical Processing Units Kaltura Channel or as downloadable pdfs on Google Drive. Each weeks practical activities (the labs) follow the ideas presented in the lectures so it is important that you follow the lecture and lab timetable below.
Lecture 01 - Introduction
- Course Context (pdf, recording)
- Supercomputing and Software (pdf, recording)
- Module Details (pdf, recording)
Lecture 02 - Introduction to C
- Introducing C (pdf, recording)
- Functions and Scoping (pdf, recording)
- Arrays, Strings and IO (pdf, recording)
Lab 01 - Introduction to Visual Studio and C Programming
Lecture 03 - Memory
- Pointers (pdf, recording)
- Advanced use of Pointers (pdf, recording)
- Dynamically Managed Memory (pdf, recording)
- Structures and Binary Files (pdf, recording)
Lecture 04 - Optimisation
- Optimisation Overview (pdf, recording)
- Compute Bound Code (pdf, recording)
- Memory Bound Code (pdf, recording)
Lab 02 - Memory and Performance
Lecture 05 - OpenMP
- OpenMP Overview (pdf, recording)
- Loops and Critical Sections (pdf, recording)
- Scoping and Tasks (pdf, recording)
Lecture 06 - OpenMP Part II
- Parallel Reduction (pdf, recording)
- Scheduling (pdf, recording)
- Nesting and Summary (pdf, recording)
Lab 03 - OpenMP
Lecture 07 - GPU Architectures
- Introduction to GPUs (pdf, recording)
- Programming GPUs (pdf, recording)
- GPU Hardware (pdf, recording)
Lecture 08 - Introduction to CUDA
- The CUDA Programming Model (pdf, recording)
- CUDA Device Code (pdf, recording)
- CUDA Host Code and Memory Management (pdf, recording)
Lab 04 - Introduction to CUDA
Lecture 09 - CUDA Memory
- Memory Overview (pdf, recording)
- Global and Constant Memory (pdf, recording)
- Read Only and Texture Memory (pdf, recording)
Quiz BEFORE Lab 5
Lab 5 - CUDA Memory
Lecture 10 - CUDA Shared Memory
- Introduction to Shared Memory (pdf, recording)
- Shared Memory Bank Conflicts (pdf, recording)
- Boundary Conditions (pdf, recording)
- Shared Memory Bank Conflict Calculator (xlxs file)
Lecture 11 - CUDA Performance
Lab 6 - Shared Memory
Lecture 12 - Warp Level CUDA
- Scheduling and Divergence (pdf, recording)
- Advanced Divergence (pdf, recording)
- Atomic and Warp Operations (pdf, recording)
Lecture 13 - Parallel Patterns
Lab 07 - Atomics and Primitives
Lecture 14 and 15 - Performance Optimisation
Lab 08 - Profiling Example
Lecture 16 - Sorting and Libraries
- Sorting (Networks) (pdf, recording)
- Libraries and Thrust (pdf, recording)
- Applications of GPU Sort (pdf, recording)
Lecture 17 - CUDA Streams
- Synchronous and Asynchronous Execution (pdf, recording)
- CUDA Streams (pdf, recording)
- Synchronisation (pdf, recording)
- Multi GPU Programming (pdf, recording)
Lab 09 - Libraries and Streams
Quiz BEFORE Lab 9
Please Find below a list of previous invited lectures
Rearranged Lab for assignment help to be held mid week (due to bank holiday).
Assignment Help Lab
No Lectures or Labs
You can add this calendar to your University of Sheffield Google Calendar by searching for COM4521 and COM6521
The following are useful resources but not required reading.
- Edward Kandrot, Jason Sanders, “CUDA by Example: An Introduction to General-Purpose GPU Programming”, Addison Wesley 2010.
- Brian Kernighan, Dennis Ritchie, “The C Programming Language (2nd Edition)”, Prentice Hall 1988.
- NVIDIA, CUDA C Programming Guide