Welcome to the GPU assignment of 5kk70 Platform-based Design! The purpose of this assignment is to get familiar with the modern GPU architecture and its programming model. Considering the availability of hardware and documentation, the NVIDIA GeForce/Quadro GPU will be used in this assignment. The NVIDIA GPU can be programmed using CUDA or OpenCL. The programming models of CUDA and OpenCL are similar. Due to the availability of documentation and example, CUDA will be used in this assignment.

If you are new to CUDA, go to preparation page and see how to get started.
Note: You can get the account for using the CUDA PC we provide at the secretary's office (PT 9.24).

Some learning materials are available here. After learning these materials, you should understand the essentials of GPU programming using CUDA be able to write some GPU programs.

When porting the serial code to GPU, you may find that the performance is not as good as you expected. That's because the architecture and programming model of the GPU is very different from common CPU and it requires extra effort to write a good GPU program. The example page contains examples that show you several important optimization techniques for GPU programming. Please read it carefully.

  • Please convert your report into PDF format before sending it. And please specify the configuration of your benchmarking environment, especially when it is not the server.  
  • Deadline extended to Dec 18.
  • The execution time measurement might be inaccurate in some cases, description and solution are given on the known issues page.
  • A lot of people seem to have different kinds of problems with creating a CUDA project in windows, now a simple tutorial written by Zhenjie is available(click to download). It is based on Visual C++ 2008 Express Edition and CUDA 2.2. And if you want to run emulation, this file tells you how to do that.
  • If you are trying to deveope CUDA program in windows, you can take a look this file, which contains a sample project, a wizard and a slide that gives a good tutorial for CUDA programming (Thanks to Zhenjie!).
  • There are reports about the normal windows display is affected or even system crashes when running CUDA program on the laptop. It can be caused by several reasons:
  1. Not enough memory on the device (See the known issues page). In this case you should get an error when you try to allocate device memory if you use cutilSafeCall()
  2. Some web pages suggest that it can be the problem of some run away pointers, check your code carefully
  3. Some people experience a black screen and GPU reset when the GPU is overloaded (and probably overheated)
  4. The notebook driver for CUDA 2.3 is a beta version, it might be unstable and could cause some problems. There are already some reports about problem with using CUDA 2.3 on laptops, and it seems that CUDA 2.2 is more stable. The server uses CUDA 2.3, but the code written in CUDA 2.2 can run on the server without any problem.

Guidelines for the assignment

This assignment is an individal assignment,
  1. Set up the CUDA environment, and try some examples to get familiar with the programming model.
  2. Learn the CUDA learning materials carefully and read the example page, and try it yourself to understand how to write an efficient GPU application.
  3. Finish the assignment on the  assignment page, and hand in a small report.
The deadline for this assignment is Dec 14.

If you have any question, please feel free to contact Dongrui She, at PT 9.19, email: d.she _at_