Good Tips for Performance Optimization
April 01, 2014
In “The CUDA Handbook”, Nicholas Wilt proves himself to be very competent and keen to experiment with kernel optimization. Advanced readers will find this book very beneficial.
This book is aimed at advanced CUDA programmers and focuses on the performance optimization of kernels. To this end, the technical background is described and many approaches for optimization are demonstrated. In some cases, the author even delves down into SASS machine code.
One disadvantage of the book is that the author also designed it as a “comprehensive reference.” As a result, there are some very large tables in the book (p. 93ff, p. 259). The CUDA documentation, on the other hand, is available as HTML and PDF, so a developer can find the information they are looking for much faster on the web than by searching through a book; see, for example, docs.nvidia.com. Another disadvantage is that APIs and command-line options can change.
At the time the book was written, CUDA 5.0 was likely current. Since then, CUDA 5.5 has been released, and version 6.0 is just around the corner (released as a release candidate).
I was also bothered by the fact that error checking with the CUDART_CHECK macro was always printed in the example code. Using cudaGetLastError(), this could be executed after the call and the macro placed at the end of the line, so that you don’t have to constantly read over it.
The book could easily be an estimated 50 pages thinner if the author had managed the space better. In my opinion, the section on Amazon Web Services is also not relevant for a book about CUDA.
Conclusion: Anyone who wants to optimize CUDA kernels and is looking for ideas on how to do so will find what they need in this book. Although it reflects the status of early 2013, the basics are well explained, and you can find the latest information on CUDA 6.0 and Maxwell on the web.
- Nicholas Wilt
- The CUDA Handbook
- Addison Wesley
- 2013
See also the review on Amazon.