Exploring Existing GPU Models
Knowing how the GPU works is a fundamental part of employing it effectively in our projects. To help explore its hardware features and relate them to GPU programming concepts we’ve examined a variety of algorithms, and seen how our implementations of them can best exploit the GPU’s architecture. In particular we’ve seen how learning to add vectors and multiply matrices helps us to understand CUDA threads, blocks and grids. We’ve also learnt about optimizations and how to handle memory transfers and memory access more efficiently.
In this chapter we investigate several topics that can have an important bearing on our time to market and the reliability of our projects. The first of these topics is libraries for working with GPUs. We’ll first learn about existing libraries and then consider the conditions under which it is appropriate to write our own code. Then we discuss the idea that running sequential code on the...