arXiv:2410.06553cs.LGeess.IV2024-10

用自动学习方法在秒级找到神经网络加速器最优数据流。

DCP: Learning Accelerator Dataflow for Neural Network via Propagation

  • 将数据流配置转为可反向传播的代码表示,实现自动优化。
  • 训练神经预测器快速逼近低延迟与低功耗的数据流方案。
  • 无需额外训练即可适配新硬件,适合加速器设计者使用。

深度神经网络(DNN)硬件加速器在提升性能和能效方面已取得显著进展。其中,执行层的数据流设计——包括片上数据分块、计算并行度和调度策略——对延迟和能耗有重大影响。以往工作需大量工程师手动设计不同DNN对应的数据流,而本文提出一种高效的数据中心方法——数据流代码传播(DCP),可在数秒内自动寻找最优数据流,无需人工干预。首先,将硬件数据流配置映射到统一的数据流编码空间,支持梯度反向传播优化;其次,通过神经预测器高效更新数据流代码,以最小化延迟、功耗等目标;最后,可零样本或少量样本泛化至未见过的硬件配置。例如,在不使用额外训练数据的情况下,DCP超越了需数千样本全搜索的GAMMA方法。在MobileNet、ResNet和ViT等代表性模型上的实验表明,DCP在多种设置下均优于现有方法。

原文摘要 · Abstract (English)

Deep neural network (DNN) hardware (HW) accelerators have achieved great success in improving DNNs' performance and efficiency. One key reason is dataflow in executing a DNN layer, including on-chip data partitioning, computation parallelism, and scheduling policy, which have large impacts on latency and energy consumption. Unlike prior works that required considerable efforts from HW engineers to design suitable dataflows for different DNNs, this work proposes an efficient data-centric approach, named Dataflow Code Propagation (DCP), to automatically find the optimal dataflow for DNN layers in seconds without human effort. It has several attractive benefits that prior arts do not have. (i) We translate the HW dataflow configuration into a code representation in a unified dataflow coding space, which can be optimized by backpropagating gradients given a DNN layer or network. (ii) DCP learns a neural predictor to efficiently update the dataflow codes towards the desired gradient directions to minimize various optimization objectives e.g., latency and energy. (iii) It can be easily generalized to unseen HW configurations in a zero-shot or few-shot learning manner. For example, without using additional training data, DCP surpasses the GAMMA method that performs a full search using thousands of samples. Extensive experiments on several representative models such as MobileNet, ResNet, and ViT show that DCP outperforms its counterparts in various settings.

硬件加速数据流优化自动设计

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。