Skip to main content
QUICK REVIEW

[Paper Review] Nimble: Lightweight and Parallel GPU Task Scheduling for Deep Learning

Woosuk Kwon, Gyeong-In Yu|arXiv (Cornell University)|Dec 4, 2020
Advanced Neural Network ApplicationsComputer Science15 citations
TL;DR

Nimble is a lightweight, parallel GPU task scheduler for deep learning that eliminates scheduling overhead via ahead-of-time (AoT) scheduling and enables concurrent execution of independent GPU tasks using automatic multi-stream scheduling. It accelerates inference and training by up to 22.34× and 3.61× respectively, outperforming PyTorch, TensorRT, and TVM on various models.

ABSTRACT

Deep learning (DL) frameworks take advantage of GPUs to improve the speed of DL inference and training. Ideally, DL frameworks should be able to fully utilize the computation power of GPUs such that the running time depends on the amount of computation assigned to GPUs. Yet, we observe that in scheduling GPU tasks, existing DL frameworks suffer from inefficiencies such as large scheduling overhead and unnecessary serial execution. To this end, we propose Nimble, a DL execution engine that runs GPU tasks in parallel with minimal scheduling overhead. Nimble introduces a novel technique called ahead-of-time (AoT) scheduling. Here, the scheduling procedure finishes before executing the GPU kernel, thereby removing most of the scheduling overhead during run time. Furthermore, Nimble automatically parallelizes the execution of GPU tasks by exploiting multiple GPU streams in a single GPU. Evaluation on a variety of neural networks shows that compared to PyTorch, Nimble speeds up inference and training by up to 22.34$ imes$ and 3.61$ imes$, respectively. Moreover, Nimble outperforms state-of-the-art inference systems, TensorRT and TVM, by up to 2.81$ imes$ and 1.70$ imes$, respectively.

Motivation & Objective

  • To address high scheduling overhead in existing deep learning frameworks that dominates runtime for small GPU tasks.
  • To exploit inter-operator parallelism in modern neural networks, such as those from NAS and parallel-layer designs, which are underutilized in current frameworks.
  • To eliminate run-time scheduling overhead by pre-scheduling GPU tasks before execution.
  • To enable efficient, automatic parallel execution of GPU tasks using multiple CUDA streams within a single GPU.
  • To improve performance for both inference and training, especially with small-batch or low-resolution inputs where scheduling overhead is most impactful.

Proposed method

  • Introduces ahead-of-time (AoT) scheduling: GPU task scheduling is performed once before execution, decoupling it from run-time.
  • Generates a task schedule during pre-processing that encodes submission order, function arguments, and resource dependencies for all GPU tasks.
  • At run time, directly submits GPU tasks based on the pre-generated schedule, bypassing scheduling logic and reducing overhead.
  • Automatically assigns independent GPU tasks to multiple CUDA streams using a dependency-aware stream assignment algorithm.
  • Uses a trace-based analysis to identify and schedule independent operators for concurrent execution across streams.
  • Leverages static neural network architecture and input shape information to pre-compute optimal scheduling and stream mapping.

Experimental results

Research questions

  • RQ1Can ahead-of-time scheduling eliminate run-time scheduling overhead in deep learning frameworks?
  • RQ2To what extent can inter-operator parallelism be exploited to accelerate GPU task execution in modern neural networks?
  • RQ3How does parallel execution via multiple CUDA streams improve inference and training performance on modern GPUs?
  • RQ4What is the performance impact of scheduling overhead on small-batch and low-resolution training workloads?
  • RQ5Can a lightweight, automated scheduler outperform existing state-of-the-art inference and training systems?

Key findings

  • Nimble achieves up to 22.34× speedup in deep learning inference compared to PyTorch, especially on models with many small GPU tasks.
  • For training, Nimble delivers up to 3.61× speedup on small-batch and low-resolution inputs, such as those in CIFAR-10, where scheduling overhead is most pronounced.
  • Nimble outperforms TensorRT by up to 2.81× and TVM by up to 1.70× in inference workloads, demonstrating superior scheduling efficiency.
  • The AoT scheduling technique reduces scheduling overhead to near-zero, making it negligible even for short-duration GPU tasks.
  • Multi-stream execution enables effective parallelization of independent operators, particularly benefiting models with high inter-operator concurrency like NASNet-A and DARTS.
  • On large-batch training with ImageNet and BERT, performance gains are more modest, confirming that scheduling overhead is less dominant in such workloads.

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.