arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1810.08955cs.DCcs.LGstat.ML
收藏

面向高性能神经网络训练的并行并发控制与操作调度

Runtime Concurrency Control and Operation Scheduling for High Performance Neural Network Training

University of California, Merced(加州大学默塞德分校);Pacific Northwest National Laboratory(太平洋西北国家实验室);Oak Ridge National Laboratory(橡树岭国家实验室)

Jiawen Liu, Dong Li, Gokcen Kestor, Jeffrey Vetter

摘要:

训练神经网络通常使用TensorFlow和Caffe 2等机器学习框架。这些框架采用了一种神经网络模型,其中NN训练被建模为由一组节点组成的有向图。神经网络训练中的操作通常由框架实现为原语,并表示为图中的节点。在基于仿射神经网络的机器学习框架中训练NN模型涉及大量的细粒度操作。这些操作具有不同的存储器访问模式和计算强度。如何管理和调度这些操作具有挑战性,因为我们必须决定运行每个操作(并发控制)的线程数量,并调度这些操作以获得良好的硬件利用率和系统吞吐量。在本文中,我们扩展了现有的运行时系统(TensorFlow运行时),以实现自动并发控制和操作调度。我们探索性能建模来预测各种线程级并行操作的性能。我们的性能模型是高度精确和轻量级的。利用性能模型,我们的运行时系统采用了一组调度策略,共同运行的操作,以提高硬件利用率和系统吞吐量。我们的运行时系统展示了一个很大的性能优势。与在TensorFlow中使用推荐的并发控制和操作调度配置相比,我们的方法在三个神经网络模型中平均实现了33%的性能(执行时间)改进(高达49%),并且实现了接近用户手动获得的最佳性能的高性能。

英文摘要:

Training neural network often uses a machine learning framework such as TensorFlow and Caffe2. These frameworks employ a dataflow model where the NN training is modeled as a directed graph composed of a set of nodes. Operations in neural network training are typically implemented by the frameworks as primitives and represented as nodes in the dataflow graph. Training NN models in a dataflow-based machine learning framework involves a large number of fine-grained operations. Those operations have diverse memory access patterns and computation intensity. How to manage and schedule those operations is challenging, because we have to decide the number of threads to run each operation (concurrency control) and schedule those operations for good hardware utilization and system throughput. In this paper, we extend an existing runtime system (the TensorFlow runtime) to enable automatic concurrency control and scheduling of operations. We explore performance modeling to predict the performance of operations with various thread-level parallelism. Our performance model is highly accurate and lightweight. Leveraging the performance model, our runtime system employs a set of scheduling strategies that co-run operations to improve hardware utilization and system throughput. Our runtime system demonstrates a big performance benefit. Comparing with using the recommended configurations for concurrency control and operation scheduling in TensorFlow, our approach achieves 33% performance (execution time) improvement on average (up to 49%) for three neural network models, and achieves high performance closing to the optimal one manually obtained by the user.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑