[论文解读] Scheduling Computation Graphs of Deep Learning Models on Manycore CPUs
本文提出 Graphi,一种高性能执行引擎,通过最小化资源干扰、利用性能分析确定最佳并行度,并应用关键路径优先调度策略,优化多核 CPU 上深度学习计算图的调度。在 68 核英特尔至强融核处理器上,Graphi 在四个神经网络上的训练速度比 TensorFlow 快 2.1× 至 9.5×。
For a deep learning model, efficient execution of its computation graph is key to achieving high performance. Previous work has focused on improving the performance for individual nodes of the computation graph, while ignoring the parallelization of the graph as a whole. However, we observe that running multiple operations simultaneously without interference is critical to efficiently perform parallelizable small operations. The attempt of executing the computation graph in parallel in deep learning frameworks usually involves much resource contention among concurrent operations, leading to inferior performance on manycore CPUs. To address these issues, in this paper, we propose Graphi, a generic and high-performance execution engine to efficiently execute a computation graph in parallel on manycore CPUs. Specifically, Graphi minimizes the interference on both software/hardware resources, discovers the best parallel setting with a profiler, and further optimizes graph execution with the critical-path first scheduling. Our experiments show that the parallel execution consistently outperforms the sequential one. The training times on four different neural networks with Graphi are 2.1x to 9.5x faster than those with TensorFlow on a 68-core Intel Xeon Phi processor.
研究动机与目标
- 解决深度学习工作负载在多核 CPU 上因调度不佳和线程干扰导致的资源利用率低下问题。
- 克服现有框架(如 TensorFlow)在多核 CPU 上采用顺序执行或简单并行化时的局限性。
- 设计一种通用执行引擎,可动态优化多种深度学习计算图的并行度与调度策略。
- 最小化并发操作间软件与硬件资源的竞争,以最大化 CPU 利用率。
- 证明智能调度与性能分析可显著提升现代多核架构的性能。
提出的方法
- 通过性能分析计算图,确定调度器与执行器的最佳并行度设置与资源分配。
- 实现集中式调度器,采用关键路径优先调度策略,优先处理高依赖性操作,减少空闲时间。
- 采用资源隔离技术,通过分配不重叠的 CPU 与内存资源,最小化线程间的干扰。
- 采用多智能体架构,配备专用执行器与中央调度器,协调执行流程,降低资源竞争。
- 利用英特尔至强融核(68 核,MIC 架构)的硬件特性,通过性能分析与调度调优提升性能。
- 通过设计通用接口,与现有深度学习框架集成,支持多种神经网络结构,无需特定模型优化。
实验结果
研究问题
- RQ1如何优化多核 CPU 上的计算图调度,以减少线程干扰与资源竞争?
- RQ2在多核 CPU 上,深度学习计算图中小型独立操作的最佳并行度是多少?
- RQ3集中式智能调度器在吞吐量与延迟方面是否能优于简单或顺序执行?
- RQ4性能分析与动态配置在不同深度学习模型上能多大程度提升性能?
- RQ5通用执行引擎是否能在无需针对特定模型调优的情况下,实现对不同神经网络架构的高性能?
主要发现
- 在 68 核英特尔至强融核处理器上,Graphi 在四个不同神经网络上的训练速度比 TensorFlow 快 2.1× 至 9.5×。
- 无干扰的并行执行相比顺序执行,性能最高提升 3.4×。
- 关键路径优先调度策略相比简单调度方法,性能提升 8% 至 19%。
- 矩阵乘法与逐元素计算等操作在至强融核上于 8 或 16 核时达到饱和,表明超过此规模后资源竞争带来的损失超过性能增益。
- Graphi 可自动恢复并匹配手写并行化方案(如 cuDNN 中针对 LSTM 网络的优化)的性能。
- 该框架具备良好的泛化能力,在现代多核 CPU(如英特尔至强铂金 8180)上也实现了显著加速,证实其在多种平台上的广泛适用性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。