Chapter 8. Basic Optimization Techniques with Case Studies

In this chapter we will discuss a few optimization techniques and finally illustrate some of them using a simple example of matrix multiplication. In a step-by-step process we combine multiple optimization strategies one by one to get gradual performance improvement. The main advantages of matrix multiplication over many other simpler algorithms , is that its easy to understand the data parallel work load and it demonstrates well the advantage of private memory, local memory, vectors and the problem of bank conflicts.

We start this chapter with a discussion of various ways to find performance bottleneck. First we discuss event-based timing information collection using clWaitForEvent API. ...

Get OpenCL Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.