A non-transitory computer-readable medium whose contents, when executed by a computing system, cause the computing system to perform operations for operating a Graphics Processing Unit (GPU), the operations comprising:
- accessing specified training parameters used to train a Deep Neural Network (DNN) using a GPU with a local GPU memory, the specified training parameters including at least a specified batch size of samples configured to train the DNN;
- defining a sub-batch size of the samples that is less than or equal to the specified batch size of samples in response to determining that an available size of the local GPU memory is insufficient to store all data associated with training the DNN using one batch of the samples;
- and
- generating instructions configured to train the DNN using the sub-batch size so that an accuracy of the DNN trained using the sub-batch size is equal to an accuracy of the DNN trained using the specified batch size of the samples, the operations further comprising:
- prior to training the DNN, determining a static schedule of off-loading data to a host and data prefetching from the host for tasks to be used during training of the DNN based on a simulation of training the DNN;
- and
- applying the static schedule of data off-loading and data prefetching during the training of the DNN.