SIGCSE 2011 - The 42nd ACM Technical Symposium on Computer Science Education
March 9-12, 2011, Dallas, Texas, USA

Workshop 9: General purpose computing using GPUs: Developing a handson
undergraduate course on CUDA programming

Wednesday  March 9, 2011, 7:00 pm - 10:00 pm, Room City View 3
Barry Wilkinson
University of North Carolina Charlotte
Yaohang  Li,
Old Dominion University

Agenda
Materials
7:00 pm - 7:15 pm

Welcome and opening remarks: GPUs and CUDA programming. Remote server configurations, workshop accounts, sample programs with graphics.
Introduction
7:15 pm - 8:25 pm

Session 1: Basic CUDA programming.
    a) Presenters: Kernel calls, data movement, predefined variables, thread organization, code examples (Approx. 35 minutes)
    b) Participants: Guided hands-on experience using remote GPU server. Vector/matrix addition and matrix multiplication, timing (Approx 35 minutes). 

Session 1 presentation


Session 1 Hands-on notes
8:25 pm - 8:35 pm
Break -- Demos

8:35 pm - 9:35 pm

Session 2: Further features and performance of CUDA programs
    a) Presenters: Further aspects of CUDA- Improving performance (approx. 30 minutes)
        Memory coalescing, using shared memory, atomics.
    b) Participants: Guided hands-on experience (approx. 30 minutes)

Session 2 presentation

Session 2 Hands-on notes

9:35 pm - 10:00 pm

Discussion of general-purpose GPU programming at undergraduate level
    a) Software, hardware requirements, use of labs and servers.
    b) Review of available textbooks and their use in the classroom
    c) Discussion on where/how to introduce general-purpose GPU programming/CUDA. prerequisites.
Discussion notes
Sample CUDA course syllabus

Sample par. prog. course syllabus with CUDA introduced
Workshop flyer

Software needed for hands-on sessions for remote access to servers
(Windows systems, Macs/Linux systems require no additional software)

PuTTY
For making an ssh connection from a Windows system
WinSCP
(Optional) Convenient for accessing and editing  remote files. Also comes with its own a terminal console window and a link to open PuTTY.
CUDA programs
CUDA programs provided on coit-grid06.uncc.edu for workshop hands-on sessions. Listed here for reference.

Additional Resources
NVIDIA
CUDA Toolkit
CUDA Library Doc.
CUDA C Prog. Guide

CUDA Toolkit 3.2 (January 2011)
Useful descriptions of CUDA API
MS Visual Studio
VS-CUDA configuration
Instructions on configurating Microsoft Visual Studio 2008 for CUDA (Windows XP and Windows 7) -- for compiling and running CUDA programs on a Windows system.  Assumes NVIDIA software and GPU installed.
CUDA Programs
Simple sample CUDA programs
Illustrates various aspects of CUDA and also using X11 graphics, with make files, suitable for the classroom. More complex code found on NVIDIA site, http://www.nvidia.com/object/cuda_get_samples.html.
Teaching CUDA at UNCC
ITCS 4145/5145
ITCS 6010/8010
Illustrates how CUDA can be introduced into a regular parallel programming class.
Illustrates how CUDA can be introduced as a stand-alone course.
Currently needs a password to access. To be provided to participants.
X-11 servers
Xming
Cygwin/Cygwin-X
If you want to display X11 graphics from remote servers locally or from local CUDA X11 programs.
Xming is a X windows server, a very small package.
Cygwin/Cygwin-X provides complete Linux-like environment and includes an X-server and xterm - a very large package.

Additional topics suitable as class assignments
Monte Carlo pi Monte Carlo pi notes
N-body calc. with graphics N-Body code notes
Heat distribution with graphics
Heat distribution with graphics class assignment

Modified Oct 24, 2012, abw