CUDA by Example: An Introduction to General-Purpose GPU Programming Paperback – Jul 19 2010
|New from||Used from|
Frequently Bought Together
Customers Who Bought This Item Also Bought
No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
Getting the download link through email is temporarily not available. Please check back later.
To get the free app, enter your mobile phone number.
From the Back Cover
“This book is required reading for anyone working with accelerator-based computing systems.
-From the Foreword by Jack Dongarra, University of Tennessee and Oak Ridge National Laboratory
“This book is required reading for anyone working with accelerator-based computing systems.
CUDA is a computing architecture designed to facilitate the development of parallel programs. In conjunction with a comprehensive software platform, the CUDA Architecture enables programmers to draw on the immense power of graphics processing units (GPUs) when building high-performance applications. GPUs, of course, have long been available for demanding graphics and game applications. CUDA now brings this valuable resource to programmers working on applications in other domains, including science, engineering, and finance. No knowledge of graphics programming is required-just the ability to program in a modestly extended version of C.
CUDA by Example,written by two senior members of the CUDA software platform team, shows programmers how to employ this new technology. The authors introduce each area of CUDA development through working examples. After a concise introduction to the CUDA platform and architecture, as well as a quick-start guide to CUDA C, the book details the techniques and trade-offs associated with each key CUDA feature. You'll discover when to use each CUDA C extension and how to write CUDA software that delivers truly outstanding performance.
Major topics covered include
- Parallel programmingThread cooperationConstant memory and eventsTexture memoryGraphics interoperabilityAtomicsStreamsCUDA C on multiple GPUsAdvanced atomicsAdditional CUDA resources
All the CUDA software tools you'll need are freely available for download from NVIDIA.http://developer.nvidia.com/object/cuda-by-example.html
About the Author
Jason Sanders is a senior software engineer in the CUDA Platform group at NVIDIA. While at NVIDIA, he helped develop early releases of CUDA system software and contributed to the OpenCL 1.0 Specification, an industry standard for heterogeneous computing. Jason received his master’s degree in computer science from the University of California Berkeley where he published research in GPU computing, and he holds a bachelor’s degree in electrical engineering from Princeton University. Prior to joining NVIDIA, he previously held positions at ATI Technologies, Apple, and Novell. When he’s not writing books, Jason is typically working out, playing soccer, or shooting photos.
Edward Kandrot is a senior software engineer on the CUDA Algorithms team at NVIDIA. He has more than twenty years of industry experience focused on optimizing code and improving performance, including for Photoshop and Mozilla. Kandrot has worked for Adobe, Microsoft, and Google, and he has been a consultant at many companies, including Apple and Autodesk. When not coding, he can be found playing World of Warcraft or visiting Las Vegas for the amazing food.
What Other Items Do Customers Buy After Viewing This Item?
Top Customer Reviews
Most Helpful Customer Reviews on Amazon.com (beta)
The Good: it is not very common to find a technical book in this price range that is not simply in greyscale. Perhaps unsurprisingly for an NVIDIA book there's quite a bit of green, and this definitely enhances the reading experience. On a more substantive note: the authors really mean the "by example" part of "CUDA by example". From chapter 3 onward, all the main concepts are fleshed out by showing and dissecting lots of code -- probably more so than in Kirk & Hwu's text, which includes application case studies, but also more extensive treatments of the CUDA architecture. As with any example-based book, it is important to run and modify the programs while reading through the text. Right now there are a few hiccups with the files Sanders & Kandrot were kind enough to provide (e.g. as of this writing README.txt and license.txt do not have the appropriate permissions set), but I'm pretty sure these are just teething troubles which will disappear soon enough. The writing is cheerful (e.g. "For those readers who are more familiar with Star Trek than with weaving, a warp in this context has nothing to do with the speed of travel through space.", p. 106) and the explanations are for the most part clear, the language being pretty lucid -- once again, probably more so than in the Kirk & Hwu volume. This fact, along with the availability of lecture slides and lab materials for the latter book, points to the main difference between the two texts: Sanders & Kandrot are better-suited to a self-study of CUDA C, while the Kirk & Hwu book is more of a class textbook (and thus broader). Finally, I was pleased to see Sanders & Kandrot include a whole chapter (chapter 11) on working with multiple GPUs, a topic Kirk & Hwu relegate to a short section.
The Bad: having color is a welcome addition, but I could not understand why the authors chose to simply follow the text editor's default highlighting of keywords when they could have used color to highlight specific portions of the code. Similarly, a number of figures (e.g. Figs. 5.5 and 8.1) are described in the text as containing green, but they show up in greyscale. The book also contains quite a few minor typos, but that's normal; what's not normal is that every single section cross-reference outside the appendix is wrong (I counted 16 in total). Moving on to more consequential matters: Kirk & Hwu have a chapter on floating point topics; given that numerical computations are certainly part of general-purpose GPU programming, Sanders & Kandrot could have said more about them. On a different note, Kirk & Hwu have a chapter on the competing programming model OpenCL, while Sanders & Kandrot do not even have an index entry on it -- one might counter-argue here that they have knowingly put CUDA in the title. This brings me to my main gripe with this book: why didn't the authors just call it "CUDA C by example"? I believe the answer is connected to their ambivalence toward C++. An illustrative example: new and delete are used in host code only once in the entire volume (on p. 82 and p. 84, respectively), but when the code snippets are shown again (on pp. 86-87) new and delete have been silently replaced by malloc and free! In the case of device code, the authors do not discuss CUDA-supported C++ constructs like default parameters, namespaces, function templates, not to mention compute capability 2.0 things like function objects. (Structures with member functions do not beget C++). In a nutshell, the book contains too much C++ for people who only know C, and not enough C++ for those who actually use that language.
Despite these misgivings, I cannot ignore this book's low selling price (especially on the Kindle), its practical focus on a multitude of code listings, and the fact that its explanations are generally clear. Thus, I think it is an appropriate buy for those interested in learning about CUDA C.
The authors clearly explain the basic CUDA paradigm starting with very simple code and working up to progressively more complex examples. The authors spend a considerable amount of time discussing different memory types and memory access styles, motivating when each style is appropriate. The code snippets are clean, clear and concise, providing a minimal yet complete introduction to each new language feature.
The book does not provide an HTML pointer to the source code used in the book. Edward Kandrot writes: "The Kindle version shipped a week too soon, it was supposed to ship next week when the physical book ships. Because of this, the website at NVIDIA wasn't done yet. Jason just spent the day making the website happen!
[...] is where the source code is currently located. I hope this helps. I wrote the examples to be specific for what is being covered, putting extras in the header files so as not to distract from the topic at hand. Only really works if the reader has the header files as well..."
I would recommend this book to anyone who wants to get started using CUDA.
(Found the source code online, not sure what the other review is about.)
So, given the low price, it's a useful buy if you prefer a book instead of going through some online tutorials. But, if you want to write fast, efficient code, don't stop at this book.
Also, CUDA is by far a more professional and better groomed effort, and this book reflects that difference. A simple comparison of Nvidia's CUDA support pages with the Kronos' abysmal OpenCL web page will illustrate the point (with the latter's broken or incorrect links, a web design that look like a college freshman's HTML project from the mid 90s, and a handful of hodge-podge and unprofessional scribbles, and requiring a dozen or so clicks and reading incomplete wikis to realize that there is no OpenCL developer "package" from Kronos, except for what Nvidia and AMD are individually making available for their hardware -- so much for creating platform heterogeneity).
However, I am still determined to pursue OpenCL over CUDA, betting my time and effort on a completely open source (and hopefully, someday homogeneous) platform. Otherwise, OpenCL will join the graveyard of many other "nice idea, but half-baked" programming languages of the past.
Look for similar items by category
- Books > Computers & Technology > Graphic Design
- Books > Computers & Technology > Hardware > Design & Architecture
- Books > Computers & Technology > Hardware > Parallel Processing Computers
- Books > Computers & Technology > Programming > Introductory & Beginning
- Books > Computers & Technology > Programming > Parallel Programming
- Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Software Development
- Books > Textbooks > Computer Science & Information Systems > Programming Languages