MLSYS ENGINEERING

6.3. Compute-bound

Similar to being memory-bound, there is also the opposite case known as being compute-bound. The following figure shows an example where the compute step takes twice as long as the read and write steps. The processors are busy all the time doing all the compute. However, the load and store units are idle most of the time waiting for the compute step to complete.

Op1: R Compute W Op2: R Compute W Op3: R Compute W Time Load unit: Processors: Busy Store unit:
Figure 18. Compute-bound example.

In this case, optimizing the memory access will not help improve the overall performance much. However, if we can optimize the computation, we can significantly improve the overall performance.

Now, we know what memory-bound and compute-bound mean. Let's take a look back at the pipelining technique and what its role is in all of this.

Without pipelining, if we execute everything sequentially, the total time is the sum of the read, compute, and write times of all ops. Optimizing anything, either memory access or computation, will improve the overall performance. There is no single bottleneck, so the term "bound" does not apply.

With pipelining, the total time is determined by the slowest step. Only optimizing that slowest step can significantly improve the overall performance. This is why pipelining is a requirement for an op to be memory-bound or compute-bound: it is what turns a slow step into a bottleneck.