Using GPI-2 for Distributed Memory Paralleliziation of the Caffe Toolbox to Speed up Deep Neural Network Training

Martin Kuehn, Janis Keuper, Franz-Josef PfreundtarXiv 2017

Abstract: In 2017, training deep neural networks (DNNs) like GoogLeNet often required several days on a single GPU. This paper presents CaffeGPI, an extension of the Caffe framework designed for high-performance computing (HPC) environments. By integrating the Global Address Space Programming Interface (GPI-2), the authors enable asynchronous, one-sided communication that overlaps gradient transfers with backpropagation. Experimental results demonstrate that CaffeGPI achieves superior scaling factors compared to standard Caffe and MPI-based implementations like Intel™Caffe, effectively utilizing existing HPC clusters for accelerated deep learning.

Introduction

The rapid growth in DNN complexity has necessitated distributed training strategies to reduce time-to-convergence. While specialized AI hardware exists, traditional HPC clusters remain a viable but underutilized resource due to software limitations. The original Caffe framework was primarily limited to single-machine execution, and existing distributed variants often suffered from synchronization bottlenecks inherent in the Message Passing Interface (MPI). CaffeGPI addresses these issues by leveraging the asynchronous capabilities of GPI-2.

Methodology: Data Parallelism and GPI-2

CaffeGPI implements a data-parallel strategy where the model is replicated across all compute ranks, and the training batch is partitioned. The core innovation lies in using GPI-2 (Global Address Space Programming Interface) for gradient synchronization. Unlike MPI, which often requires global barriers that force processors to wait, GPI-2 allows for one-sided communication and fine-grained synchronization.

Overlapping communication and computation in CaffeGPI

As shown in Figure 2, CaffeGPI updates the model layer-by-layer. As soon as the backward pass computes gradients for a specific layer, those gradients are immediately transferred in the background while the GPU continues computing the next layer. This pipelining effectively hides communication latency behind computation, a process the authors refer to as distributed model accumulation.

Benchmarking and Performance

The framework was evaluated using three landmark architectures: AlexNet, GoogLeNet, and Inception V3. The primary metrics for evaluation were computational throughput (time per iteration) and scaling factors across multiple GPUs and nodes.

CaffeGPI demonstrated significant performance gains over baseline implementations. On a single node equipped with four NVIDIA K80 GPUs, CaffeGPI scaled much more effectively than the original Caffe toolbox.

Scaling performance comparison on a single node with multiple GPUs

As illustrated in Figure 3, the asynchronous nature of CaffeGPI reduces memory contention even on a single machine, leading to a higher scale factor. In distributed settings, CaffeGPI achieved a 2.4x speedup across four nodes and consistently outperformed Intel™Caffe, proving its resilience to network latency and its ability to handle distributed memory more effectively than MPI-based alternatives.

Conclusion and Future Work

By utilizing the GPI-2 library, CaffeGPI transforms standard HPC clusters into efficient deep learning platforms. The ability to overlap communication with computation is critical for scaling DNN training. The authors identify I/O (Input/Output) as the next major hurdle, as the speed of computation and communication now risks outpacing the rate at which images can be loaded from disk. Future work will focus on addressing these I/O bottlenecks and exploring asynchronous variants of Stochastic Gradient Descent (SGD) to further optimize performance.

Summary updated

BibTeX
@misc{kuehn2017using,
  author = {Martin Kuehn and Janis Keuper and Franz-Josef Pfreundt},
  title = {{Using GPI-2 for Distributed Memory Paralleliziation of the Caffe Toolbox to Speed up Deep Neural Network Training}},
  year = {2017},
  eprint = {1706.00095},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.00095},
}
Figure