[论文解读] HyPar: Towards Hybrid Parallelism for Deep Learning Accelerator Array
HyPar 提出一种分层动态规划方法,以优化 DNN 加速器阵列中的逐层混合并行,减少训练期间的跨处理器通信。在十个 DNN 模型上,其性能比默认的数据并行高出 3.39×,能效比高出 1.51×,优于模型并行和先前的‘一种奇怪技巧’启发式方法。
With the rise of artificial intelligence in recent years, Deep Neural Networks (DNNs) have been widely used in many domains. To achieve high performance and energy efficiency, hardware acceleration (especially inference) of DNNs is intensively studied both in academia and industry. However, we still face two challenges: large DNN models and datasets, which incur frequent off-chip memory accesses; and the training of DNNs, which is not well-explored in recent accelerator designs. To truly provide high throughput and energy efficient acceleration for the training of deep and large models, we inevitably need to use multiple accelerators to explore the coarse-grain parallelism, compared to the fine-grain parallelism inside a layer considered in most of the existing architectures. It poses the key research question to seek the best organization of computation and dataflow among accelerators. In this paper, inspired by recent work in machine learning systems, we propose a solution HyPar to determine layer-wise parallelism for deep neural network training with an array of DNN accelerators. HyPar partitions the feature map tensors (input and output), the kernel tensors, the gradient tensors, and the error tensors for the DNN accelerators. A partition constitutes the choice of parallelism for weighted layers. The optimization target is to search a partition that minimizes the total communication during training a complete DNN. To solve this problem, we propose a communication model to explain the source and amount of communications. Then, we use a hierarchical layer-wise dynamic programming method to search for the partition for each layer.
研究动机与目标
- 解决大型 DNN 训练中频繁访问片外内存导致的性能和能效瓶颈。
- 探索跨多个加速器的粗粒度并行,超越单个层内的细粒度并行。
- 确定在加速器之间对特征图、卷积核、梯度和误差张量进行最优的逐层划分,以最小化总通信量。
- 设计一种与拓扑无关、可扩展的混合并行解决方案,优于默认的数据并行或模型并行。
- 在从 LeNet 到 VGG 的多样化 DNN 架构上,于真实训练工作负载下评估该方法。
提出的方法
- HyPar 将并行配置问题建模为在 DNN 训练期间最小化总跨处理器通信量。
- 提出一种通信模型,基于张量大小和划分策略量化特征图、卷积核、梯度和误差张量的数据移动量。
- 采用分层的、逐层的动态规划算法,以线性时间复杂度搜索最优划分配置。
- 该方法支持数据并行(dp)和模型并行(mp),以及每层的混合组合(如 mp-dp、dp-mp)。
- 该方法与拓扑无关,可部署于 H-tree 和环形等不同互连结构,评估基于 HMC 架构。
- 使用分析指标如权重更新张量面积(A(ΔW))和前向特征张量面积(A(F))指导划分决策。
实验结果
研究问题
- RQ1在多加速器 DNN 训练中,何种逐层并行配置(数据并行、模型并行或混合)能最小化总通信量?
- RQ2与默认的数据并行或模型并行相比,混合并行在性能和能效比方面表现如何?
- RQ3一种与拓扑无关的通信模型与动态规划方法能否有效最小化跨多种 DNN 架构的处理器间数据移动?
- RQ4HyPar 的划分策略与 [107] 中的启发式方法(如‘一种奇怪技巧’)相比表现如何?
- RQ5该通信模型能否准确基于张量大小和依赖模式,预测每层的最佳并行选择?
主要发现
- 在十个 DNN 模型上,HyPar 平均实现 3.39× 的性能加速和 1.51× 的能效比提升,优于默认的数据并行。
- 混合并行优于默认的数据并行和模型并行,最佳配置因层和模型而异。
- 平均而言,HyPar 比 [107] 中的启发式‘一种奇怪技巧’快 1.62×,能效高 1.22×,在特定情况下最高达 2.40× 加速。
- H-tree 互连拓扑比环形拓扑快 2.23× 几何平均,但 HyPar 的拓扑独立性确保了在各种拓扑下的稳健性。
- 通信模型正确识别出 conv5 应采用模型并行(因 A(ΔW) < A(F)),与 [107] 中的启发式选择相反。
- 对于全连接层如 fc3,当 A(ΔW) = A(F) 时,层间通信分析证实数据并行更优,但该技巧错误地选择了模型并行。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。