Open Access System for Information Sharing

Login Library

 

Thesis
Cited 0 time in webofscience Cited 0 time in scopus
Metadata Downloads

Sparse Matrix Formats and Architecture for Efficient Fully-Connected Neural Network Inference Accelerators

Title
Sparse Matrix Formats and Architecture for Efficient Fully-Connected Neural Network Inference Accelerators
Authors
박준기
Date Issued
2020
Publisher
포항공과대학교
Abstract
LSTM 및 Transformer는 음성인식, 기계번역 및 언어 모넬링과 같은 시계열 데이터를 모넬링하고 분석하는데 널리 활용된다. LSTM과 Transformer는 fully- connected 기반의 뉴럴네트워크이며 연산의 대부분은 매트릭스와 벡터의 곱(MxV) 이다. 웨이트 데이터를 재사용할 수 있는 CNN과 달리 LSTM과 Transformer에서 는 FC연산을 기반으로 하기 때문에 웨이트 데이터를 재사용할 수 없다. 그래서 메모리 bandwidth에 따라서 외부 메모리로 부터 가속기 내부의 벼퍼로 웨이트 데 이터를 로드하는 것이 성능의 bottleneck이된다. 이 문제는 뉴럴네트워크 압축에 널리 사용되는 pruning을 통해서 데이터 로드에 대한 부담과 저장용량을 줄일 수 있다. 그러나 pruning을 수행하면 웨이트 매트릭스는 sparse해지고 기존의 MxV연 산은 sparse MxV (spMxV)연산으로 바뀌게된다. sparse 매트릭스는 ’0’을 로드하는 사이클을 줄이기 위해 sparse 매트릭스 포뱃 (가령 CSC,CSR 포뱃)으로 저장되게 된다. 기존의 sparse 매트릭스 포뱃으로 저장된 웨이트 데이터와 압력 데이터의 곱 셈 (spMxV)이 수행될때 크게 두가지 문제가 발생한다. 첫번째 문제는 각각의 PE 에 할당되는 계산 로드가 다르다는 것이다. PE에 계산 로드가 불균일하게 할당되면 PE마다 연산을 완료하는 시간의 차이가 커지게 된다. 가장 늦게 연산을 끝내는 PE 가 전체 시스템 latency의 bottleneck이 되어 성능을 제한된다. PE에서 spMxV을 수행하기 위해서는 웨이트 데이터와 이 데이터에 해당하는 압력 데이터가 필요하 다. 이때 웨이트 데이터가 sparse하기 때문에 곱셈에 필요한 압력 데이터 요소도 불규칙한 순서로 메모리에 요청된다. 만약 요청되는 압력 데이터 요소가 PE내부의 로컬 벼퍼에 미리 로드 되어있지 않다면 PE는 적절한 데이터가 준비될때 까지 스 톨된다. 이 두가지 문제들은 PE의 활용도를 낮추게 되고 결국 이로 인해 latency와 파워소모는 증가하게된다. 이 논문에서는 이러한 문제를 완화할 수 있는 세가지 종류의 sparse 매트릭스 포뱃 과 그 포뱃에 맞는 아키텍처를 함께 제안한다. 첫번째로 우리는 LSTM 추론과정을 가속화 하기위한 Compressed and Balanced Sparse Row (CBSR) 포뱃을 제안한다. 이 포뱃은 PE간의 계산 로드의 불균형을 최소화 하는데 초점을 맞춘다. 또한 포뱃 생성 과정 중 웨이트 매트릭스의 가로행 순서를 바꾸게 되면서 발생하는 오벼헤드 를 간단한 네트워크 변환을 제안하여 없앤다. 결과적으로 CBSR 포뱃은 기존의 CSR/CSC 포뱃에 비해 가속기의 처리량을 16∼38% 향상시키고, 에너지를 9∼22% 줄인다. 두번째로 우리는 CBSR 포뱃을 더욱 발전시킨 Rearranged Compressed Sparse Column (RCSC) 포뱃을 제안한다. 기존 포뱃은 로드 불균형 문제만 완화한 반면에 이 포뱃은 압력 데이터 로드 미스 문제와 로드 불균형 문제를 통시에 해결한 다. sparse 매트릭스 포뱃이 압력 요소가 요청되는 메모리 주소의 spatial locallity 를 높이지만 완전히 압력 요소의 스톨을 막을 수는 없다. 그래서 포뱃으로 커벼하지 못하는 스톨은 새로운 계층적 벼퍼구조의 아키텍처를 제안함으로써 최소화 한다. 이 아키텍처는 로컬 벼퍼의 hit rate을 높이기 위해서 적은 사이클 동안 최대한 넓은 범위의 메모리 주소를 접근 할 수 있는 구조를 가진다. 결과적으로 제안된 포뱃과 아키텍처는 로컬 벼퍼의 hit rate과 속도를 각각 30∼230%, 27∼84% 향상 시킨다. 앞서 제시한 두 sparse 매트릭스 포뱃은 오직 LSTM에 적용되는 한계가 있다. 세번 째로 논문에서 제시하는 것은 기계번역에 널리 사용되는 Transformer 네트워크를 위한 sparse 매트릭스 포뱃과 아키텍처이다. Set-Associative RCSC (SA-RCSC) 포뱃은 RCSC 포뱃을 변형하여 Transformer에도 적용될 수 있도록 했을 뿐만 아 니라 많은 PE가 가속기에 설계되어 있어도 PE의 활용률이 감소하지 않도록 한다. 특히 latency 대부분을 차지하는 디코딩 시간을 줄이기 위해 자세한 Transformer 분석을 통해 불필요한 연산을 건너뛰게 된다. 또한 Transformer에서 필요한 다양한 형태의 매트릭스 곱셈을 수행 할 수 있도록 하드웨어 flexibilty를 가지도록 아키텍 처(OPTIMUS라 불리는)가 디자인되었다. CPU, GPU, 전용 하드웨어로 디지인된 대조군과 비교해서 OPTIMUS의 latency는 41.62×, 24.23×, 16.01× 만큼 더 짧 다. 추가적으로 비교대상들에 비해 처리량도 각각 43.35×, 25.45×, 19.00× 만큼 더 높다.
The LSTM and the Transformer are widely used neural network models for modeling or analyzing time-varying data such as speech recognition, machine translation, and language modeling. The main operation of the LSTM and the Transformer is changed from dense matrix-vector multiplication to sparse matrix- vector multiplication after weight matrix pruning which is widely exploited in deep learning. Although the pruning greatly reduces memory requirements, the sparse weight matrix causes some issues in the matrix multiplication. The first issue is that the computational load to be processed is distributed differently for each PE. This disproportion between PEs significantly reduces the average utilization of PE. The second issue is that many stalls can occur because the input vector elements required for multiplication in the PE are not prepared in the local buffer. As with the first issue, these stalls lead to lower utilization of the PE, resulting in increased latency. In this dissertation, three types of sparse matrix formats and architectures are proposed to mitigate these issues. First, we propose the Compressed and Bal- anced Sparse Row (CBSR) format to improve the inference speed of the LSTM accelerator. This format focuses on minimizing load imbalance over PEs. Also, the network transformation is presented to eliminate the additional overhead in- curred by CBSR format generation. As a result, the LSTM accelerator has a 16∼38% better throughput and 9∼22% less energy than conventional CSR/CSC formats. Second, we present the advanced Rearranged Compressed Sparse Col- umn (RCSC) format of the CBSR format. This format also aims to accelerate the LSTM, while the CBSR format focuses on only one issue (load imbalance), while this format can mitigate both issues (load imbalance and input load miss). In addition, stalls that are not covered by the RCSC format are minimized by suggesting a new architecture. The architecture has a hierarchical buffer to search a wider range of memory addresses in a minimum number of cycles, increasing the hit rate at the local buffer. The proposed format improves spatial locality when accessing input vectors, increasing the hit rate in local buffers by 30∼230% and achieving a 27∼84% speed-up. The previous two sparse matrix formats could only be applied to LSTM. Third, we propose a new format, named Set-Associative RCSC (SA-RCSC), and architecture, named OPTIMUS, that can mitigate sparse issues even in the Transformer network inference. The SA-RCSC format enables high PE utilization even if a large MAC is implemented in the accelerator. We also present skipping redundant computations to improve the performance of the Transformer decoding process. OPTIMUS, a hardware accelerator, is de- signed with the flexibility to support various types of matrix multiplication in the Transformer neural networks. The latency of OPTIMUS is 41.62×, 24.23×, 16.01× smaller than that of CPU, GPU and the baseline custom hardware, re- spectively. In addition, the throughput is 43.35×, 25.45×, 19.00× higher than the comparisons.
URI
http://postech.dcollection.net/common/orgView/200000287220
https://oasis.postech.ac.kr/handle/2014.oak/111383
Article Type
Thesis
Files in This Item:
There are no files associated with this item.

qr_code

  • mendeley

Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.

Views & Downloads

Browse