arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.17006cs.AR
收藏

做CIM还是做内存:面向CIM加速器的双模式感知DNN编译器

Be CIM or Be Memory: A Dual-mode-aware DNN Compiler for CIM Accelerators

Shixin Zhao, Yuming Li, Bing Li, Yintao He, Mengdi Wang, Yinhe Han, Ying Wang

AI总结:

针对现有CIM编译方法忽视存内计算架构计算/内存模式动态切换能力的问题,提出CMSwitch编译器,通过引入硬件抽象属性、动态规划与混合整数规划优化模式切换与资源分配,实现1.31×平均加速,提升DNN应用性能。

摘要:

存内计算(Computing-in-memory, CIM)架构展现出优于传统架构的性能。为释放CIM加速器的潜力,已有许多编译方法被提出,聚焦于CIM特有的应用调度优化。然而,现有编译方法往往忽视了CIM在计算模式与内存模式之间动态切换的能力,而这一能力对于适配真实深度神经网络架构(尤其是新兴的大语言模型)多样化的内存与计算需求至关重要。为填补这一空白,我们提出了CMSwitch——一种新型编译器,用于为具备自适应模式切换能力的CIM加速器优化资源分配,从而提升DNN应用的性能。具体而言,我们的方法通过引入一种新的硬件抽象属性,将计算-内存模式切换整合到CIM编译优化空间中。随后,我们提出了一种新颖的编译优化流程,利用动态规划和混合整数规划来识别最优网络分段及对应的模式资源分配。CMSwitch采用定制的元算子以通用化的方式表达编译结果。评估结果显示,与现有最优(SOTA)的CIM编译工作相比,CMSwitch实现了1.31×的平均加速比,凸显了CMSwitch在充分挖掘CIM处理器潜力、适配广泛真实DNN应用方面的有效性。

英文摘要:

Computing-in-memory (CIM) architectures demonstrate superior performance over traditional architectures. To unleash the potential of CIM accelerators, many compilation methods have been proposed, focusing on application scheduling optimization specific to CIM. However, existing compilation methods often overlook CIM's capability to switch dynamically between compute and memory modes, which is crucial for accommodating the diverse memory and computational needs of real-world deep neural network architectures, especially the emerging large language models. To fill this gap, we introduce CMSwitch, a novel compiler to optimize resource allocation for CIM accelerators with adaptive mode-switching capabilities, thereby enhancing the performance of DNN applications. Specifically, our approach integrates the compute-memory mode switch into the CIM compilation optimization space by introducing a new hardware abstraction attribute. Then, we propose a novel compilation optimization pass that identifies the optimal network segment and the corresponding mode resource allocations using dynamic programming and mixed-integer programming. CMSwitch uses the tailored meta-operator to express the compilation result in a generalized manner. Evaluation results demonstrate that CMSwitch achieves an average speedup of 1.31$\times$ compared to existing SOTA CIM compilation works, highlighting CMSwitch's effectiveness in fully exploiting the potential of CIM processors for a wide range of real-world DNN applications.

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

↑