arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.01775cs.ARcs.LG
收藏

Torch2Chip:面向原型硬件加速器设计的端到端可定制深度神经网络压缩与部署工具包

Torch2Chip: An End-to-end Customizable Deep Neural Network Compression and Deployment Toolkit for Prototype Hardware Accelerator Design

Cornell University(康奈尔大学)

Jian Meng, Yuan Liao, Anupreetham Anupreetham, Ahmed Hasssan, Shixing Yu, Han-sok Suh, Xiaofeng Hu, Jae-sun Seo

AI总结:

针对现有深度学习框架量化定制性不足、整数参数提取困难及工具包自由度受限等问题,本文提出开源可定制的Torch2Chip工具包,支持用户自定义压缩并自动完成模型融合与参数提取,直接生成面向CNN和ViT原型芯片验证的可部署格式。

摘要:

模型压缩的发展持续受到各种基于ASIC或FPGA的神经网络加速器演进的推动。在算法层面,量化或剪枝的最终目标是在低功耗硬件上加速昂贵的深度神经网络计算。然而,这种“设计-部署”工作流在当前硬件-算法协同设计社区中面临尚未充分探索的挑战。首先,尽管最先进的量化算法能够以可忽略的精度损失实现低精度,但最新的深度学习框架(如PyTorch)仅支持不可定制的8位精度、数据格式和参数提取。其次,量化的目标是实现低精度数据计算,但当前最先进的算法将量化后的整数视为中间结果,而量化器的最终输出是“离散化”的浮点值,忽视了实际需求,并给硬件设计人员增加了整数参数提取和层融合的额外工作量。最后,工业界设计的压缩工具包受限于其内部产品或少数算法。当前工具包中有限的自由度以及尚未充分探索的定制化能力阻碍了基于ASIC或FPGA的原型加速器设计。为解决这些挑战,我们提出了Torch2Chip,一个开源、完全可定制且高性能的工具包,支持用户设计的压缩,并随后进行自动模型融合和参数提取。Torch2Chip融合了分层设计工作流,用户定制的压缩算法将被直接打包为可部署格式,用于基于CNN或视觉Transformer(ViT)的原型芯片验证。代码可在https://github.com/SeoLabCornell/torch2chip获取。

英文摘要:

The development of model compression is continuously motivated by the evolution of various neural network accelerators with ASIC or FPGA. On the algorithm side, the ultimate goal of quantization or pruning is accelerating the expensive DNN computations on low-power hardware. However, such a "design-and-deploy" workflow faces under-explored challenges in the current hardware-algorithm co-design community. First, although the state-of-the-art quantization algorithm can achieve low precision with negligible degradation of accuracy, the latest deep learning framework (e.g., PyTorch) can only support non-customizable 8-bit precision, data format, and parameter extraction. Secondly, the objective of quantization is to enable the computation with low-precision data. However, the current SoTA algorithm treats the quantized integer as an intermediate result, while the final output of the quantizer is the "discretized" floating-point values, ignoring the practical needs and adding additional workload to hardware designers for integer parameter extraction and layer fusion. Finally, the compression toolkits designed by the industry are constrained to their in-house product or a handful of algorithms. The limited degree of freedom in the current toolkit and the under-explored customization hinder the prototype ASIC or FPGA-based accelerator design. To resolve these challenges, we propose Torch2Chip, an open-sourced, fully customizable, and high-performance toolkit that supports user-designed compression followed by automatic model fusion and parameter extraction. Torch2Chip incorporates the hierarchical design workflow, and the user-customized compression algorithm will be directly packed into the deployment-ready format for prototype chip verification with either CNN or vision transformer (ViT). The code is available at https://github.com/SeoLabCornell/torch2chip.

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

↑