The one big challenge in distributed DNN training is determining how many GPUs or accelerators to use for a single training or inference job. If we assign too many GPUs to a single job, it may waste computational resources. If we assign too few GPUs to a particular job, it may lead to an insanely long training time. In addition, this choice of the number of GPUs is also highly relevant to choosing the corresponding hyperparameters (such as batch size and learning rate) during the whole DNN training session. How to choose the appropriate quantity of accelerators is the main topic we cover in this chapter. In addition, we will also explore hyperparameter tuning accordingly.
Before we discuss anything further, we want to list our assumptions, as follows:
- We assume you have an infinite number of GPUs or TPUs or other accelerators to use for DNN training and inference.
- We assume you use homogeneous GPUs or other kinds of accelerators...