IOS: Inter-Operator Scheduler for CNN Acceleration

Yaoyao Ding, Ligeng Zhu, Zhihao Jia, Gennady Pekhimenko, Song Han

TL;DR

IOS (Inter-Operator Scheduler) is a novel system that accelerates CNN inference by automatically scheduling multiple operators to execute in parallel. By moving beyond standard "intra-operator" optimizations and using a dynamic programming algorithm to manage "inter-operator" parallelism, IOS achieves a 1.1x to 1.5x speedup over state-of-the-art libraries like TensorRT and TVM.

What Problem Does This Paper Address?

Modern GPUs have become incredibly powerful, with peak performance increasing nearly 4x between 2013 and 2018. At the same time, there is a trend in neural network design toward "fragmented" architectures—models like Inception or NASNet that use many small, parallel branches instead of one giant chain of convolutions.

This creates a utilization gap. Standard deep learning frameworks focus on intra-operator parallelism (making a single convolution run as fast as possible). However, a single small convolution often isn't large enough to keep a massive modern GPU busy. The hardware sits idle, waiting for the next operation. While "greedy" scheduling (running everything available at once) seems like an obvious fix, it often leads to resource contention that actually slows things down. IOS aims to find the "Goldilocks" schedule that maximizes hardware utilization without causing traffic jams on the GPU.

Methods

The core of IOS is a Dynamic Programming (DP) algorithm designed to find a globally optimal execution schedule.

  1. Stage-Based Partitioning: IOS breaks a CNN's computation graph into sequential "stages." Within each stage, it chooses between two parallelization strategies:
  2. Operator Merge: Fusing multiple small, similar operators (like two 3x3 convolutions) into one larger operator to increase computational density.
  3. Concurrent Execution: Running different types of operators simultaneously using separate hardware streams (e.g., CUDA streams).
  4. The DP Algorithm: To avoid an exponential search space, IOS uses a recursive DP approach. It identifies "endings" of sub-graphs and builds the optimal schedule by combining the best schedules for these smaller pieces.
  5. Schedule Pruning: To keep search times practical, the authors introduce pruning rules that limit the maximum number of groups and operators per group that the scheduler considers.
  6. Hardware-In-The-Loop: The scheduler doesn't just guess performance; it directly measures the latency of different strategies on the target hardware to guide its decisions.

Datasets

The authors evaluated IOS on four modern CNN benchmarks known for their complex, multi-branch structures:

  • Inception-V3
  • RandWire
  • NasNet-A
  • SqueezeNet

These were tested across different hardware platforms, including the NVIDIA Tesla V100 (Volta), RTX 2080Ti (Turing), and Tesla K80 (Kepler).

Key Insights and Ideas

  • The "Utilization Gap" is Growing: As hardware gets faster and operators get smaller, the gap between peak and real performance widens. In NASNet, the average FLOPs per kernel is nearly 30x smaller than in the older VGG network.
  • Schedules Must Be Bespoke: An optimal schedule for a high-end V100 GPU is often terrible for a low-end K80. Similarly, a schedule optimized for a batch size of 1 might be 28% slower than the optimal schedule for a batch size of 32. IOS automates this customization.
  • DP vs. Greedy: Greedy schedulers are short-sighted. By using DP, IOS can "sacrifice" a bit of parallelism in an early stage to enable a much more efficient configuration later in the graph.
  • Orthogonality: Inter-operator parallelism is complementary to intra-operator tuning. You can use a tool like TVM to optimize the kernels themselves, and then use IOS to decide how to run those kernels together.

Key Results

  • Throughput Gains: IOS consistently outperformed TensorRT, TVM, and TASO, providing 1.1x to 1.5x speedups across the benchmarked models.
  • Hardware Efficiency: On a V100 GPU, the IOS schedule achieved 58% more active warps (a measure of hardware busy-ness) compared to standard sequential execution.
  • Search Efficiency: The DP algorithm is remarkably fast. It optimized all four benchmark networks in just 3 GPU hours, whereas TVM’s AutoTune required 208 hours to achieve its results.
  • Batch Size Scaling: IOS maintained its performance lead across a wide range of batch sizes (from 1 to 128), proving it is robust for both real-time edge inference and high-throughput cloud settings.

Limitations and Future Work

  • Linear Models: The paper acknowledges that models with a simple linear structure (like ResNet) offer very little opportunity for inter-operator parallelism, showing only negligible (2-5%) speedups.
  • Integration: Currently, IOS is a standalone scheduler. The authors suggest that integrating it directly into popular compilers like TVM or frameworks like TensorFlow/PyTorch would be a powerful next step.
  • Memory Bottlenecks: At very large batch sizes, the bottleneck often shifts from computation to memory bandwidth (activation tensors). The authors noted that in these cases, merging operators to reduce memory access becomes more important than simply running them concurrently.

Summary updated

BibTeX
@inproceedings{ding2021ios,
  author = {Yaoyao Ding and Ligeng Zhu and Zhihao Jia and Gennady Pekhimenko and Song Han},
  title = {{IOS: Inter-Operator Scheduler for CNN Acceleration}},
  booktitle = {MLSys},
  year = {2021},
  url = {https://openreview.net/forum?id=F9VbMwTGhBH},
}
Figure