Abstract
Modern Deep Neural Network (DNN) optimization often relies on aggressive operator fusion to minimize memory bandwidth overhead. However, on high-performance GPUs, this approach can inadvertently serialize independent operations, destroying inter-operator parallelism. AutoGraph is a unified framework that optimizes DNN computation graphs specifically for parallel execution. By balancing operator fusion with multi-stream parallelism and utilizing real-world runtime feedback, it achieves up to a 1.26× speedup over state-of-the-art parallel frameworks and up to 3.47× over traditional graph optimization methods.
The Challenge of Parallel GPU Execution
Modern GPUs, such as the NVIDIA A100, possess massive computational power that traditional deep learning frameworks often struggle to fully utilize. Most existing optimizations focus on intra-operator parallelism (optimizing a single convolution) or operator fusion (combining multiple operations into one).
Aggressive fusion is a double-edged sword: in complex models with many parallel branches, such as those discovered via Neural Architecture Search (NAS), fusing operators can collapse these branches into a single, massive sequential kernel. This destroys the potential for inter-operator parallelism—the ability to run independent parts of the network simultaneously on different GPU streams. Existing tools often optimize in the wrong direction because they rely on naive cost models that fail to account for how the GPU schedules multiple kernels in parallel.
The AutoGraph Methodology
AutoGraph introduces a multi-stage approach to find the optimal balance between operator fusion and parallel execution. The framework moves beyond static cost models by integrating hardware-in-the-loop verification.
Key Components:
- Mixed Critical Path Cost: Instead of simply summing the execution time of every node, AutoGraph utilizes a cost function that calculates the "critical path" (the longest sequence of dependent operations) and combines it with the total cost of all operators. This provides a more accurate proxy for actual parallel scheduler performance.
- Flow-Based Graph Partitioning: To handle large-scale modern networks, AutoGraph uses a "min-cut" algorithm to split the computation graph into manageable subgraphs. This partitioning preserves areas where beneficial substitutions are likely, ensuring the search space remains productive.
- DP + Backtracking Search: The framework employs a novel Dynamic Programming (DP) algorithm to find the optimal sequence of graph substitutions, using backtracking to explore local optimizations while the DP manages the global structure.
- On-Board Verification: AutoGraph takes the top-k candidate graphs and measures their actual performance on hardware using CUDA Graphs and Multi-Stream execution. This runtime feedback guides the final optimization stages, bridging the gap between theoretical graph theory and practical systems engineering.
Evaluation and Results
The authors evaluated AutoGraph using seven diverse DNN architectures, including CNNs (Inception-v3, ResNet-50, NasNet-A), RNNs (RNNTC-SRU), and Transformers (BERT). Testing was conducted on an NVIDIA GeForce RTX 2080Ti against industry standards like PyTorch-JIT and specialized optimizers like TASO and Nimble.
AutoGraph consistently outperformed all baselines, achieving speedups of 1.06× to 1.26× over state-of-the-art parallel frameworks like Nimble and IOS. A notable result occurred with NasNet-A, where AutoGraph achieved a latency of 5.850 ms, significantly faster than the 13.086 ms recorded for TASO+Nimble. This disparity highlights how TASO's aggressive fusion can break a model's inherent parallelism, whereas AutoGraph preserves it.
Conclusion
AutoGraph demonstrates that traditional "more is better" heuristics for kernel fusion are insufficient for modern parallel hardware. By weighting the critical path and closing the loop with hardware-level verification, AutoGraph unlocks significant performance gains across a wide variety of model architectures. Future work will look toward extending these optimizations to multi-GPU scaling and heterogeneous environments.
Summary updated