Skip to main content
QUICK REVIEW

[Paper Review] CoSA: Scheduling by Constrained Optimization for Spatial Accelerators

Qijing Huang, Minwoo Kang|arXiv (Cornell University)|May 5, 2021
Advanced Neural Network ApplicationsComputer Science65 references5 citations
TL;DR

CoSA is a constrained-optimization framework that formulates DNN accelerator scheduling as a mixed-integer programming problem to jointly optimize tiling, loop ordering, and spatial mapping in a single deterministic solve. It achieves up to 2.5× speedup over state-of-the-art schedulers and 90× faster time-to-solution by eliminating iterative search, leveraging algorithmic and architectural regularities for high-performance, one-shot scheduling.

ABSTRACT

Recent advances in Deep Neural Networks (DNNs) have led to active development of specialized DNN accelerators, many of which feature a large number of processing elements laid out spatially, together with a multi-level memory hierarchy and flexible interconnect. While DNN accelerators can take advantage of data reuse and achieve high peak throughput, they also expose a large number of runtime parameters to the programmers who need to explicitly manage how computation is scheduled both spatially and temporally. In fact, different scheduling choices can lead to wide variations in performance and efficiency, motivating the need for a fast and efficient search strategy to navigate the vast scheduling space. To address this challenge, we present CoSA, a constrained-optimization-based approach for scheduling DNN accelerators. As opposed to existing approaches that either rely on designers' heuristics or iterative methods to navigate the search space, CoSA expresses scheduling decisions as a constrained-optimization problem that can be deterministically solved using mathematical optimization techniques. Specifically, CoSA leverages the regularities in DNN operators and hardware to formulate the DNN scheduling space into a mixed-integer programming (MIP) problem with algorithmic and architectural constraints, which can be solved to automatically generate a highly efficient schedule in one shot. We demonstrate that CoSA-generated schedules significantly outperform state-of-the-art approaches by a geometric mean of up to 2.5x across a wide range of DNN networks while improving the time-to-solution by 90x.

Motivation & Objective

  • To address the challenge of navigating the vast, high-dimensional scheduling space in spatial DNN accelerators, which is infeasible with brute-force or iterative feedback-driven methods.
  • To eliminate the need for expensive iterative search or large-scale simulations by formulating scheduling as a deterministic constrained-optimization problem.
  • To simultaneously optimize tiling, loop permutation, and spatial mapping using a unified mathematical formulation grounded in hardware and algorithmic constraints.
  • To improve performance and energy efficiency across diverse DNN workloads and accelerator architectures, including GPUs and custom spatial accelerators.
  • To enable rapid, scalable, and portable scheduling across new or evolving hardware without retraining or extensive simulation.

Proposed method

  • CoSA formulates DNN scheduling as a mixed-integer programming (MIP) problem with constraints derived from DNN layer dimensions and hardware parameters such as memory hierarchy and network-on-chip (NoC) topology.
  • It models tiling sizes across memory levels, loop orderings for data reuse, and spatial mapping of computation to processing elements as decision variables in the MIP formulation.
  • The framework incorporates architectural constraints such as shared memory limits, register usage, and thread block size limits on GPUs, ensuring only valid schedules are generated.
  • It uses a communication-oriented objective function that explicitly models data movement costs across on-chip memory and NoC, reducing communication overhead.
  • The objective function combines compute utilization, memory reuse, and communication cost, with weights tuned via micro-benchmarks to balance trade-offs.
  • The MIP problem is solved in one shot using standard mathematical optimization solvers, avoiding iterative search or reinforcement learning.

Experimental results

Research questions

  • RQ1Can DNN accelerator scheduling be formulated as a single, deterministic constrained-optimization problem that avoids iterative search or expensive training?
  • RQ2How effective is a unified MIP formulation in jointly optimizing tiling, loop ordering, and spatial mapping for diverse DNN workloads?
  • RQ3To what extent does CoSA outperform state-of-the-art schedulers in terms of performance, energy efficiency, and time-to-solution across different hardware platforms?
  • RQ4How well does CoSA generalize to new or evolving accelerator architectures without requiring retraining or simulation?
  • RQ5Does a communication-aware objective function in CoSA lead to better performance than models that ignore network traffic costs?

Key findings

  • CoSA-generated schedules achieve a geometric mean speedup of up to 2.5× over state-of-the-art schedulers like Timeloop Hybrid and Random search across multiple DNN networks.
  • The time-to-solution for CoSA is 90× faster than iterative methods, with a one-shot solution taking only 0.02 seconds per layer on average.
  • On a NoC simulator, CoSA achieves up to 3.3× speedup over the best Random search solutions and 2.5× over Timeloop Hybrid, particularly excelling in convolutional layers with high communication costs.
  • On the K80 GPU, CoSA-generated schedules achieve a 1.10× geometric mean speedup over TVM with XGBoost tuner, while reducing time-to-solution by 2,500× (0.02s vs. 50s per layer).
  • CoSA improves energy efficiency by 22% compared to baseline schedulers, demonstrating its effectiveness in reducing both computation and communication overhead.
  • The framework consistently produces high-quality schedules across diverse workloads, including ResNet-50, DeepBench, and fully connected layers, with no performance degradation on memory-bound layers.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.