[Paper Review] Purine: A bi-graph based deep learning framework
Purine is a bi-graph based deep learning framework that models neural networks as directed acyclic bipartite graphs composed of operators and data tensors, enabling efficient, event-driven execution with automatic overlap of memory transfers and computation. It achieves near-linear speedup across multiple GPUs by uniformly supporting data and model parallelism through a universal task dispatcher and graph composition, demonstrating 12x acceleration with 12 GPUs on GoogLeNet using a batch size of 128 per GPU.
In this paper, we introduce a novel deep learning framework, termed Purine. In Purine, a deep network is expressed as a bipartite graph (bi-graph), which is composed of interconnected operators and data tensors. With the bi-graph abstraction, networks are easily solvable with event-driven task dispatcher. We then demonstrate that different parallelism schemes over GPUs and/or CPUs on single or multiple PCs can be universally implemented by graph composition. This eases researchers from coding for various parallelization schemes, and the same dispatcher can be used for solving variant graphs. Scheduled by the task dispatcher, memory transfers are fully overlapped with other computations, which greatly reduce the communication overhead and help us achieve approximate linear acceleration.
Motivation & Objective
- To simplify the implementation of diverse parallelization schemes (data, model, hybrid) across multi-GPU and multi-machine setups in deep learning.
- To reduce communication overhead in distributed training by overlapping memory transfers with computation using an event-driven task dispatcher.
- To provide a unified, extensible framework that abstracts deep networks as bi-graphs, decoupling algorithm design from low-level parallelization logic.
- To enable efficient execution of iterative training processes like SGD by graph iteration, avoiding cyclic dependencies in the computation graph.
Proposed method
- Represent deep neural networks as directed acyclic bipartite graphs (bi-graphs) with two vertex types: operators (functions) and tensors (data).
- Use an event-driven task dispatcher that triggers operator execution only when all input tensors are ready, enabling automatic scheduling and dependency resolution.
- Assign a 'location' property (hostname and device ID) to tensors and operators to specify GPU or CPU allocation, enabling transparent multi-device and multi-machine execution.
- Introduce a 'Copy' operator to transfer data across device boundaries, enabling cross-GPU and cross-machine communication.
- Implement parallelism schemes (data, model, hybrid) via graph composition and reuse the same dispatcher, eliminating the need for custom code per configuration.
- Overlap communication with computation by scheduling data transfers during idle computation phases, minimizing idle time and improving efficiency.
Experimental results
Research questions
- RQ1Can a unified bi-graph abstraction simplify the implementation of diverse parallelization strategies in deep learning frameworks?
- RQ2How effectively can communication overhead be hidden in distributed training using event-driven task scheduling?
- RQ3To what extent can data parallelism be efficiently applied to fully connected layers, traditionally considered communication bottlenecks?
- RQ4Can near-linear speedup be achieved across multiple GPUs and machines using a single dispatcher and graph composition?
Key findings
- Purine achieved 1383.7 images per second on GoogLeNet using 12 GPUs, demonstrating 12x acceleration with a batch size of 128 per GPU.
- The framework achieved near-linear scaling across 12 GPUs, even over 10 GbE networks, due to effective overlap of memory transfers with computation.
- With a batch size of 32 per GPU, Purine still achieved 9.53x acceleration on 12 GPUs, indicating robust performance at smaller batch sizes.
- Profiling confirmed that memory copies between CPU and GPU were fully overlapped with backward pass computations, with only the first convolution layer causing a minor bottleneck.
- The framework successfully implemented SGD via graph iteration, avoiding cyclic dependencies by splitting parameter updates into separate graphs.
- The use of a universal task dispatcher enabled seamless support for data, model, and hybrid parallelism without re-architecting the framework.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.