應用動態稀疏更新的記憶體高效卷積神經網路終端訓練加速器

On-Device Memory-Efficient CNN Training Accelerator with Dynamic Sparse Update

檔案

日期

2024

類型

語言

英文

摘要

隨著即時處理需求和個性化深度學習應用的增加,終端訓練的重要性顯著提高。與 主要涉及模型前向傳播的推理不同,終端訓練不僅需要前向計算,還需要反向傳播以 更新模型的權重。這種反向計算需要存儲和訪問大量的中間值、梯度和額外的計算。 因此,訓練過程中的 記憶體和計算需求遠高於推理過程。 為了解決這些挑戰,我們提出了動態稀疏更新方法,該方法僅選擇性地更新重要的 參數,例如後面層部分通道的簡單隨機通道策略,而非以往研究中的複雜評估。這種 簡單的方法擴大了參數更新的範圍並提升了性能。此外,我們將批次正規化層(BN) 替換為群組正規化層(GN),以實現終端設備上的單批次大小訓練。通過將所提的動態 稀疏更新方法與激活剪枝結合,我們成功地消除了不必要的梯度計算,從而將存儲激 活值所需的記憶體減少到僅原來的3.4%。 在硬體設計方面,我們開發了一種融合前向數據流,以高效地同時處理GN 和卷積 運算,適用於早期層的更新跳過。這得益於模型中GN 和卷積的計算順序調整。這種併 行性顯著縮短了整體訓練時間,將計算時間減少到原來順序方法的約45%。 此外,針對零值的計算以行方式進行組織,使得處理單元(PE)的計算得以規律進 行,簡化了零跳過操作的實現,進一步降低了功耗。 我們的硬體設計採用了台積電28nm 技術,運行在FP8 精度下,時鐘頻率為800 MHz,達到了257-272 mW 的功耗和0.54 mm² 的面積。在這一配置下,系統提供了8 TOPS 的峰值吞吐量,31.13 TOPS/W 的能效,以及14.8 TOPS/mm² 的面積效率,尤其 是在輸入和激活稀疏度達到90% 的情況下。這些結果強調了我們設計在處理高稀疏度 時的有效性,使其成為節能的終端訓練解決方案。
The increasing demand for real-time processing and personalized deep learning applications has significantly heightened the importance of on-device training. Unlike inference, which primarily involves forward passes through a model, on-device training requires not only forward calculations but also backward passes to update the model's weights. This backward computation necessitates the storage and access of a much larger amount of intermediate values, gradients, and additional computations. As a result, the memory and computational demands during training are substantially higher than during inference. To address these challenges, we propose dynamic sparse update that selectively updates the important parameters only like in the partial channels of the later layers with a simple random channel strategy instead of complex evaluations in previous works. This simple approach broadens the scope of parameter updates and improves performance. In addition, we replace batch normalization (BN) with group normalization (GN) for single batch size training on the edge devices. By combining the proposed dynamic sparse update method with activation pruning, we successfully eliminated unnecessary gradient computations, thereby reducing the memory required for storing activations to just 3.4% of the original amount. For the hardware design, we developed a fused forward data flow to efficiently handle GN and convolution operations simultaneously for early layers with update skipping. This was possible due to computation reordering of GN and convolution in the model. This concurrency significantly reduced the overall training time, cutting the computation time to about 45% of what it would have been with the original sequential approach. Additionally, computation with zero values are organized in a row-wise fashion, which allows regular processing element (PE) computations, simplifying the implementation of zero-skipping operations and leading to further reductions in power usage. Our hardware design, implemented using TSMC's 28nm technology and operating at FP8 precision with a clock frequency of 800 MHz, achieved a power consumption of 257-272 mW and an area of 0.54 mm². This configuration delivered a peak throughput of 8 TOPS, an energy efficiency of 31.13 TOPS/W, and an area efficiency of 14.8 TOPS/mm², particularly when input and activation sparsity reached 90%. These results underscore the effectiveness of our design in managing high levels of sparsity, making it a viable solution for power-efficient on-device training.

所屬典藏

電子研究所
顯示完整詮釋資料 統計資料

引用此條目

Li, I.-H. (2024). On-Device Memory-Efficient CNN Training Accelerator with Dynamic Sparse Update. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/3974

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/3974