Pipeline input
In this section, we will explain how pipeline parallelism works. At a high level, pipeline parallelism breaks each batch of training input into smaller micro-batches and conducts data pipelining over these micro-batches. To illustrate it more clearly, let's first describe how normal batch training works.
We will use the three-layer model example depicted in Figure 6.1. We will also maintain the GPU setup depicted in Figure 6.2.
Now assume that each training batch contains three input items: input 1, input 2, and input 3. We use this batch to feed in the model. We draw the forward propagation workflow as shown in Figure 6.7. It works as follows:
- After GPU1 receives the training batch of inputs 1, 2, and 3, GPU1 conducts forward propagation as F1i (forward propagation on input i on GPU1), which is, F11, F12, and F13.
- After GPU1 finishes the forward propagation of inputs 1, 2, and 3, it passes its layer output of F11, F12, F13 to GPU2. Based on GPU1...