by Jason Sanders

I've been an employee here at NVIDIA for just over 3 years now. I spent my first year at NVIDIA working on the CUDA driver and helped develop some of the early CUDA releases, mostly in the CUDA 1.1 to CUDA 2.2 timeframe. After that, I joined Edward (my co-author) on the CUDA Platform Team and started to write a significant amount of CUDA C code for the first time (all of the code I wrote in the driver was standard C).

One of the first things I realized is that even though CUDA C can be very intuitive to learn, there was no step-by-step, “getting started” guide to learn the language.  Edward and I proposed writing an introductory CUDA C book that would make it easy for anyone with a basic programming background to get started with CUDA C. After some discussions with our managers and with our publisher, Addison-Wesley, the book CUDA by Example was born.

The book was designed to address the very needs that Edward and I had. Specifically, we were C and C++ programmers who needed a quick and easy way to get started programming in CUDA C. How is it different from standard C? What kinds of problems are well suited to GPU computing? What GPU features are available to me and why might I want to use them? These are some of the questions we set out to answer.

After reading this book, you will have a basic working knowledge of how to use nearly every CUDA C feature: shared memory, constant memory, events, textures, atomics, streams, graphics interoperability, and the multi-GPU APIs. We even close the book with a collection of other useful resources that'll help you continue growing as a CUDA developer.

When the book launched, we asked NVIDIA Facebook fans if they had any questions aboug CUDA By Example. Here are answers to some of the most commonly asked questions:

Where can I get a copy of CUDA by Example?

  • We heard from some folks at SIGGRAPH 2010 in Los Angeles that the book had sold out very early in the conference. To all of you, I can only offer huge apologies! Now, the easiest place to get the latest information on the book is at NVIDIA’s Developer Zone website, where you’ll find  a sample chapter, table of contents, errata, and a link to buy the book from Amazon.com

Does CUDA by Example deal with NVIDIA’s new Fermi architecture GPUs?

  • Unfortunately for people looking for information on Fermi, there is nothing specifically about the Fermi architecture in the book. CUDA by Example is an introduction to the CUDA C programming language, so it spends very few pages discussing hardware details because the basics of the CUDA C language are not specific to one particular generation of GPU architecture. I would love to publish a book on optimization strategies for the various CUDA architectures, but obviously this level of material is beyond an introductory text.  In the mean time, check out the Fermi Tuning Guide (also available in the CUDA Toolkit)

Has there been a book titled, "Woulda, Shoulda, CUDA" yet?

  • We would love to have called our book Woulda, Shoulda, CUDA but NVIDIA already gave out a truck-load of pins at the 2009 GPU Technology Conference with “CUDA, WOO-DA, SHOO-DA!” written on them. Rather than risk looking scandalously prone to thievery, we went with the less cheeky, CUDA by Example.

And speaking of the GPU Technology Conference (shameless plug approaching…) I’ll be doing a 90-minute tutorial at the 2010 GPU Technology Conference in downtown San Jose on Monday, September 20.  The course, “Introduction to CUDA C,” will cover the same material as the first few chapters of the book. So if you want to learn CUDA, but really don’t want to read your copy of CUDA by Example, sign up to attend GTC and watch CUDA by Example: Live on Stage.