AI Hardware & Software Stack

In pipeline parallelism, where a model's layers are split across GPUs in sequence, why is a batch divided into micro-batches?

  1. AMicro-batches reduce the number of computations
  2. BTo reduce the idle time (bubble) in which later GPUs wait for earlier ones, keeping several GPUs busy at once
  3. CMicro-batches eliminate inter-GPU communication
Show answer and explanation

Answer: B. To reduce the idle time (bubble) in which later GPUs wait for earlier ones, keeping several GPUs busy at once

If a whole batch flows through at once, while the first GPU computes, the second and later GPUs can do nothing but wait. Splitting the batch into micro-batches lets the second GPU compute micro-batch 1 while the first computes micro-batch 2, and so on, overlapping the work. Some waiting (the bubble) remains at the start and end, so the number of micro-batches is made large enough.

  • A. The computation count is unchanged.
  • B. Correct. It is like an assembly line.
  • C. Communication between stages is still needed.
Practice this topic Back to topic

More AI Hardware & Software Stack questions

  1. What does the all-reduce communication used in distributed training do?
  2. Which describes gradient checkpointing (activation recomputation) used in training?
  3. What is the main reason systolic arrays in AI accelerators compute matrix products efficiently?
  4. Why do some AI accelerators include large on-chip SRAM (tens to hundreds of MB)?
  5. Which describes the "weight-stationary" dataflow used in AI accelerators?