https://github.com/zhisbug/cavs
Cavs: An Efficient Runtime System for Dynamic Neural Networks
https://github.com/zhisbug/cavs
deep-learning gpu neural-network
Last synced: about 1 year ago
JSON representation
Cavs: An Efficient Runtime System for Dynamic Neural Networks
- Host: GitHub
- URL: https://github.com/zhisbug/cavs
- Owner: zhisbug
- License: apache-2.0
- Created: 2016-11-08T03:38:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-18T06:31:45.000Z (almost 6 years ago)
- Last Synced: 2025-03-25T14:51:20.949Z (over 1 year ago)
- Topics: deep-learning, gpu, neural-network
- Language: C++
- Homepage: https://github.com/zhisbug/Cavs
- Size: 839 KB
- Stars: 14
- Watchers: 9
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

This project is an implementation of the Cavs system presented in the paper: [Cavs: An Efficient Runtime System for Dynamic Neural Networks, ATC'18](https://www.usenix.org/system/files/conference/atc18/atc18-xu-shizhen.pdf), sponsored by [Petuum Inc](https://petuum.com/).
## Introduction
Recent deep learning (DL) models are moving more and more to dynamic neural network (NN) architectures, where the NN structure changes for every data sample.
However, existing DL programming models are inefficient in handling dynamic network architectures because of:
- substantial overhead caused by repeating dataflow graph construction and processing every example;
- difficulties in batched execution of multiple samples;
- inability to incorporate graph optimization techniques such as those used in static graphs.
In this paper, we present **Cavs**, a runtime system that overcomes these bottlenecks and achieves efficient training and inference of dynamic NNs.
Cavs represents a dynamic NN as a static vertex function
and a dynamic instance-specific graph
.
It avoids the overhead of repeated graph construction by only declaring and constructing
once, and allows for the use of static graph optimization techniques
on pre-defined operations in
.
Cavs performs training and inference by scheduling the execution of
following the dependencies in
, hence naturally exposing batched execution opportunities over different samples.
Experiments comparing Cavs to state-of-the-art frameworks for dynamic NNs ([TensorFlow Fold](https://github.com/tensorflow/fold), [PyTorch](https://github.com/pytorch/pytorch) and [DyNet](https://github.com/clab/dynet)) demonstrate the efficacy of our approach: Cavs achieves a near one order of magnitude speedup on training of dynamic NN architectures, and ablations verify the effectiveness of our proposed design and optimizations.
## How to cite
```
@inproceedings{xu2018cavs,
title={Cavs: An efficient runtime system for dynamic neural networks},
author={Xu, Shizhen and Zhang, Hao and Neubig, Graham and Dai, Wei and Kim, Jin Kyu and Deng, Zhijie and Ho, Qirong and Yang, Guangwen and Xing, Eric P},
booktitle={2018 $\{$USENIX$\}$ Annual Technical Conference ($\{$USENIX$\}$$\{$ATC$\}$ 18)},
pages={937--950},
year={2018}
}
```