應用於物件偵測之抗變異三元電阻式記憶體內運算巨集單元設計
Variation-Tolerant Ternary RRAM-based In-memory Computing Macro Design for Object Detection
摘要
隨著人工智慧的蓬勃發展,許多有關於人工智慧的應用相繼出現,例如圖形辨識、語音辨識、物件偵測等等都與人工智慧有關。而這些應用皆是以神經網路的形式實現,在神經網路中須以大量特徵及權重值進行的乘加運算,並在多次訓練的過程中漸漸找出最佳解。但由於傳統的馮·諾伊曼架構中,運算單元及記憶單元是分開的,這使得在處理大量神經網路數據的過程中,在運算單元及記憶單元來回搬運資料的過程消耗了大量的時間及能量,我們稱之為馮·諾伊曼瓶頸,因此記憶體內運算的架構被提出,使用記憶體進行運算可以減少搬運大量數據所消耗的能量及時間。
我們使用電阻式隨機存取記憶體來儲存神經網路的權重,因電阻式記憶體為非揮發式記憶體,可在關閉電源時仍可保持其權重,且架構簡單、面積小、讀取速度快,上述皆為我們選用電阻式記憶體的原因。然而記憶體內運算架構中仍面臨許多挑戰,例如電阻值的變異、周邊電路的變異性及非線性問題,使得記憶體內運算結果不準確進而影響到其應用之表現。
本篇論文首先根據前版本晶片之量測結果找出問題,並在架構上進行優化,例如使用三元權重值取代二元權重值以對抗電阻值變異性造成的影響,並簡化周邊電路,以減少其變異性。此外,與演算法團隊合作,在訓練及推理過程中考慮各種非理想效應於模型中以達到更好的效果,並完成巨集單元設計。考量各種非理想效應後,物件偵測模型之平均精準度為61.56。此外,此巨集單元可達到444.064 TOPS/W的能量效率與24.943 TOPS/mm2的面積效率。最後,我們將電阻式記憶體巨集單元與數位電路進行系統單晶片整合並完成晶片下線。
我們使用電阻式隨機存取記憶體來儲存神經網路的權重,因電阻式記憶體為非揮發式記憶體,可在關閉電源時仍可保持其權重,且架構簡單、面積小、讀取速度快,上述皆為我們選用電阻式記憶體的原因。然而記憶體內運算架構中仍面臨許多挑戰,例如電阻值的變異、周邊電路的變異性及非線性問題,使得記憶體內運算結果不準確進而影響到其應用之表現。
本篇論文首先根據前版本晶片之量測結果找出問題,並在架構上進行優化,例如使用三元權重值取代二元權重值以對抗電阻值變異性造成的影響,並簡化周邊電路,以減少其變異性。此外,與演算法團隊合作,在訓練及推理過程中考慮各種非理想效應於模型中以達到更好的效果,並完成巨集單元設計。考量各種非理想效應後,物件偵測模型之平均精準度為61.56。此外,此巨集單元可達到444.064 TOPS/W的能量效率與24.943 TOPS/mm2的面積效率。最後,我們將電阻式記憶體巨集單元與數位電路進行系統單晶片整合並完成晶片下線。
With the vigorous development of artificial intelligence, many applications related to artificial intelligence have appeared one after another, such as pattern recognition, speech recognition, object detection, etc. These applications are all implemented in the form of neural networks. In the neural network, multiplication and accumulation operations are performed using a large number of features and weights, and the optimal solution is gradually found in the training process. However, in the traditional von Neumann architecture, the computing unit and the memory unit are separated. The process of transferring data back and forth between the computing unit and the memory unit consumes a lot of time and energy when processing a large amount of neural network data. We call it the von Neumann bottleneck. As a result, the architecture of in-memory computing is proposed by using memory for computing to reduce the energy and time consumed by data transfer.
We use resistive random-access memory (RRAM) to store the weights of the neural network. Because RRAM is a nonvolatile memory, it can keep its weights even when the power is turned off. Besides, it has a simple structure, small area, and high reading speed. These are the reasons why we choose RRAM. However, there are still many challenges in the in-memory computing architecture using RRAM, such as RRAM cell variation, peripheral circuit variability, and nonlinear problems, which make in-memory computing results inaccurate and affect the accuracy of neural networks.
This thesis first identify the problems of a previously designed chip based on the measurement results, and optimizes the chip architecture, such as using a ternary weight value instead of a binary weight value to reduce the influence of resistance value variability, and simplifying the peripheral circuit to reduce its variability. In addition, we collaborate with the algorithm team to consider all nonideal effects in hardware into the neural network model during training and inference to achieve improved results, and complete the macro design. After considering various nonideal effects, the mAP of the object detection model achieves as high as 61.56 percent. In addition, this macro design achieves an energy efficiency of 444.064 TOPS/W and an area efficiency of 24.943 TOPS/mm2. Finally, we complete SoC integration of RRAM macros and digital circuits and tape out the chip.
We use resistive random-access memory (RRAM) to store the weights of the neural network. Because RRAM is a nonvolatile memory, it can keep its weights even when the power is turned off. Besides, it has a simple structure, small area, and high reading speed. These are the reasons why we choose RRAM. However, there are still many challenges in the in-memory computing architecture using RRAM, such as RRAM cell variation, peripheral circuit variability, and nonlinear problems, which make in-memory computing results inaccurate and affect the accuracy of neural networks.
This thesis first identify the problems of a previously designed chip based on the measurement results, and optimizes the chip architecture, such as using a ternary weight value instead of a binary weight value to reduce the influence of resistance value variability, and simplifying the peripheral circuit to reduce its variability. In addition, we collaborate with the algorithm team to consider all nonideal effects in hardware into the neural network model during training and inference to achieve improved results, and complete the macro design. After considering various nonideal effects, the mAP of the object detection model achieves as high as 61.56 percent. In addition, this macro design achieves an energy efficiency of 444.064 TOPS/W and an area efficiency of 24.943 TOPS/mm2. Finally, we complete SoC integration of RRAM macros and digital circuits and tape out the chip.