Introduction to GPU Programming with OpenCL, May 25-26, 2011
This will be a 2-day hands-on introduction to many-core programming using OpenCL. The course structure is based on a Cuda course created by Prof. Mike Giles at the University of Oxford (Mike is the lead Cuda developer in the UK). It is assumed that you will have some proficiency with C/C++. No prior experience with parallel computing is required, though some familiarity with OpenMP or MPI may be an advantage.The course consists of a mix of lectures and practicals. The aim is that by the end of the course you will be able to write relatively simple OpenCL programs. You should also be in a position to continue learning through the OpenCL resources available on-line.
Venue
The course is being sponsored by HECToR and held at NAG's main Oxford office. See here for travel directions.Preliminary Reading
Please bring a printed copy of the Nvidia's OpenCL Programming Guide version 3.2 and read chapters 1 and 2. I'd also recommend printing out a colour copy of the OpenCL quick reference card. We'll be using v1.0 of OpenCL for which the reference card is here.OpenCL is an extension of C, so if you are a little rusty with C/C++ you should refresh your memory of it.
Additional References
- Using the HECToR GPU testbed
- Nvidia's OpenCL homepage
- Nvidia OpenCL examples
- Nvidia's Fermi Architecture White Paper
- Nvidia OpenCL Best Practices Guide version 3.2
- Nvidia visual profiler
- AMD OpenCL homepage
- AMD OpenCL introductory exercise and tutorials
- Intel OpenCL homepage
- IBM OpenCL homepage
- Apple OpenCL homepage
- OpenCL Wikipedia page -- quite a useful list of resources here
- Blog by Jem Davies, ARM's VP of technology in the Media Processing, about GPU computing and OpenCL
- Blog post by Tom Olson, ARM's Director of Graphics Research at ARM, on why OpenCL will be on every smartphone in 2014
-
Guide for porting Cuda code to OpenCL
- OpenCL v1.0 manual pages and OpenCL v1.1 manual pages
-
OpenCL v1.0, v1.1 specifications
-
Two OpenCL books are coming out in 2011: OpenCL Programming Guide by Aaftab Munshi (Apple), Benedict Gaster (AMD), Timothy Mattson (Intel), James Fung (Nvidia), Dan Ginsburg (Boston); and Heterogeneous Computing with OpenCL by Benedict Gaster, David Kaeli, Lee Howes, Perhaad Mistry and Dana Schaa
- Programming Massively Parallel Processors: a Hands-on Approach -- a recent book by David Kirk and Wen-mei Hwu
- The SHOC benchmark suite, an OpenCL/Cuda/OpenMP/MPI benchmark from Oak Ridge National Laboratory
Timetable
Wednesday the 25th:- 09:30 -- 10:00 Registration
- 10:00 -- 12:00 Lecture 1 - OpenCL introduction and background
- 12:00 -- 13:30 Practical 1 - getting started (prac1.tar.gz)
- 12:30 -- 13:30 Lunch break (in parallel with Practical 1)
- 13:30 -- 14:30 Lecture 2 - Exploring the OpenCL spec. through examples
- 14:30 -- 15:30 Practical 2 - modifying a simple vector add kernel (prac2.tar.gz)
- 15:30 -- 16:30 Lecture 3 - Optimising OpenCL performance
- 09:30 -- 10:30 Lecture 4 - Further optimisation considerations
- 10:30 -- 12:30 Practical 3 - optimising matrix multiply (prac3.tar.gz)
- 12:30 -- 13:30 Lunch break
- 13:30 -- 15:30 Lecture 5 - An OpenCL case study: molecular docking
- 15:30 -- 16:30 Practical 4 - OpenCL tools (profilers, debuggers)