Introduction
Modern GPUs possess immense parallel processing power, yet they are frequently underutilized during Deep Neural Network (DNN) inference. Mainstream deep learning frameworks, such as PyTorch and TensorFlow, typically execute operators—the fundamental building blocks of models like convolutions or additions—sequentially. This sequential execution, combined with inadequate operator launch ordering, leads to resource fragmentation and performance interference. Opara is a novel scheduling framework designed to address these bottlenecks by intelligently exploiting operator parallelism.
System Architecture
Opara is a resource- and interference-aware scheduling framework that integrates seamlessly with existing PyTorch models without requiring manual code modifications. The system comprises four key components:
- Stream Allocator: This component analyzes the model's Directed Acyclic Graph (DAG) to identify independent operators that can execute in parallel. It assigns these operators to multiple CUDA streams while minimizing synchronization overhead.
- Model Profiler: A lightweight tool that performs a single pass of the model to measure the specific resource requirements (e.g., threads, shared memory, and registers) for each operator.
- Operator Launcher: Acting as the system's "brain," the launcher uses a heuristic algorithm to prioritize operator execution. It moves away from simple topological sorting to a strategy that optimizes resource utilization.
- Graph Capturer: This module uses CUDA Graphs to "bake" the optimized schedule into a single executable unit, significantly reducing the CPU overhead associated with launching individual kernels.
Key Insights: The "Small First" Strategy
A core innovation of Opara is its counter-intuitive "Small First" strategy. In traditional scheduling, large, resource-heavy operators often block the GPU, preventing smaller, independent operators from running even when resources are available. Opara prioritizes operators with smaller resource footprints, filling the "gaps" in GPU utilization.
Additionally, Opara strategically overlaps compute-intensive tasks (like complex convolutions) with memory-intensive tasks (like simple additions). This ensures that different hardware components of the GPU, such as math units and memory controllers, are active simultaneously, further driving up efficiency.
Evaluation and Results
The researchers evaluated Opara using six representative models, including GoogLeNet, Inception-v3, BERT, and T5, across high-end (NVIDIA A100) and mid-range (RTX 2080 Super) GPUs.
- Performance Gains: Opara achieved up to a 10.97× speedup over standard sequential PyTorch execution and up to a 1.68× speedup over standard CUDA Graph implementations. It also outperformed the state-of-the-art research baseline, Nimble, by up to 1.29×.
- Hardware Efficiency: On the A100 GPU, Opara increased the Streaming Multiprocessor (SM) efficiency of models like NASNet by approximately 48% compared to standard CUDA Graphs.
- Low Overhead: The scheduling algorithm is highly efficient, completing in just a few milliseconds—orders of magnitude faster than previous academic approaches.
Conclusion and Future Work
Opara demonstrates that intelligent operator parallelism can significantly unlock the latent performance of modern GPUs for DNN inference. While the current framework shows impressive results, future work will focus on developing more formal analytical models for operator interference and scaling the system to support massive Large Language Models (LLMs) like GPT-3 and LLaMA.
Summary updated