一句话:提出 CMSwitch 编译器,将 CIM 的计算/内存模式切换纳入编译优化空间,自动完成网络分段与资源分配。
计算存内(CIM)架构在性能上优于传统架构,但现有 CIM 编译方法大多只针对特定 CIM 做调度优化,忽略了 CIM 可在计算模式与内存模式之间动态切换这一关键能力,因而难以适应真实深度神经网络(尤其是新兴大语言模型)多样化的计算与内存需求。为此,本文提出 CMSwitch:通过引入新的硬件抽象属性,把计算-内存模式切换纳入 CIM 编译优化空间;并提出新的编译优化 pass,利用动态规划与混合整数规划识别最优网络分段及其对应的模式资源分配,同时用定制元算子以通用方式表达编译结果。评估显示,CMSwitch 相比现有最先进的 CIM 编译工作平均取得 1.31 倍加速,表明其能充分挖掘 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.31x 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.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2502-17006,
title = {Be CIM or Be Memory: A Dual-mode-aware DNN Compiler for CIM Accelerators},
author = {Shixin Zhao and Yuming Li and Bing Li and Yintao He and Mengdi Wang and Yinhe Han and Ying Wang},
booktitle = {ASPLOS},
year = {2025},
doi = {10.1145/3676641.3716248}
}