KR20190076916A - Method and apparatus for outlier-aware accelerating neural networks - Google Patents

Method and apparatus for outlier-aware accelerating neural networks Download PDF

Info

Publication number
KR20190076916A
KR20190076916A KR1020180168495A KR20180168495A KR20190076916A KR 20190076916 A KR20190076916 A KR 20190076916A KR 1020180168495 A KR1020180168495 A KR 1020180168495A KR 20180168495 A KR20180168495 A KR 20180168495A KR 20190076916 A KR20190076916 A KR 20190076916A
Authority
KR
South Korea
Prior art keywords
data
neural network
activation
quantization
calculation
Prior art date
Application number
KR1020180168495A
Other languages
Korean (ko)
Other versions
KR102415214B1 (en
Inventor
유승주
박은혁
Original Assignee
서울대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 서울대학교산학협력단 filed Critical 서울대학교산학협력단
Publication of KR20190076916A publication Critical patent/KR20190076916A/en
Application granted granted Critical
Publication of KR102415214B1 publication Critical patent/KR102415214B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Neurology (AREA)
  • Image Analysis (AREA)
  • Feedback Control In General (AREA)

Abstract

Presented are a method for accelerating data processing in a neural network and an apparatus thereof. The apparatus may comprise: a control unit performing quantization on data based on the characteristics of the data on a neural network and separating and performing calculation on the data according to expression form of the quantized data; and a memory storing the quantized data.

Description

이상치를 고려한 뉴럴네트워크 가속 방법 및 장치{METHOD AND APPARATUS FOR OUTLIER-AWARE ACCELERATING NEURAL NETWORKS}TECHNICAL FIELD [0001] The present invention relates to a method and apparatus for accelerating neural networks,

본 명세서에서 개시되는 실시예들은 이상치를 고려한 뉴럴네트워크 가속 방법 및 장치에 관한 것으로, 보다 상세하게는 뉴럴네트워크상의 데이터의 형식에 따라 분류하여 처리함으로써 데이터의 처리속도를 가속하는 방법 및 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for accelerating a data rate by classifying data according to a format of data on a neural network .

딥뉴럴네트워크는 일반적으로 컨볼루션을 사용하는CNN(convolutional neural network)과 행렬과 벡터의 곱을 주된 계산으로하는 RNN(recurrent neural network)으로 나뉜다. CNN은 영상처리에, RNN은 연속된 데이터처리에 적합한 것으로 알려져있다. CNN, RNN 모두 각 층(layer)에서는 입력데이터와 weight 간의 컨볼루션 또는 행력곱셈으로 출력을 구한 후 거기에 활성함수(일반적으로는 ReLU 또는 sigmoid)를 적용하여 해당 층의 출력을 구한다.Deep neural networks are generally divided into convolutional neural networks (CNNs) using convolution and recurrent neural networks (RNN) using matrix-vector multiplication. CNN is known to be suitable for image processing, and RNN is suitable for continuous data processing. In each layer of CNN and RNN, output is obtained by convolution or multiplication of input data and weight, and then an active function (generally, ReLU or sigmoid) is applied to it to obtain the output of the layer.

이러한 딥뉴럴네트워크는 많은 계산을 필요로 하는데 특히 그 중에서 컨볼루션(convolution)과 행렬곱셈(matrix-vector 또는 matrix-matrix) 계산이 대부분을 차지한다.These deep neural networks require many computations, most of which are convolution and matrix-vector or matrix-matrix calculations.

컨볼루션과 행렬곱셈 계산을 빠르게 수행하기 위해서 메모리 접근량과 계산량을 줄이기 위해 데이터를 양자화하지만 기존 데이터의 정밀도를 유지하지 못하는 문제점이 있다. In order to perform convolution and matrix multiplication calculations quickly, we quantize the data to reduce the amount of memory access and computation, but the accuracy of existing data can not be maintained.

관련하여 선행기술 문헌인 한국특허공개번호 제10-2001-0105425호에서는 비휘발성 메모리 소자인 MFSFET소자의 동작을 예측하는 방법과 상기 소자를 사용한 뉴로-디바이스의 적응형 학습회로에 관한 것으로, 게이트 강유전체의 분극을 스위칭시켜 전류의 흐름을 제어하는 방식의 비휘발성 메모리 소자의 동작을 예측할 뿐, 뉴메모리의 쓰기횟수의 제한에 따른 문제점을 해결하지 못한다. In the related art, Korean Patent Laid-Open No. 10-2001-0105425 discloses a method for predicting the operation of an MFSFET device which is a nonvolatile memory device and an adaptive learning circuit of a neuro-device using the device, The operation of the nonvolatile memory device in which the current flow is controlled by switching the polarization of the nonvolatile memory device can not be solved.

따라서 상술된 문제점을 해결하기 위한 기술이 필요하게 되었다.Therefore, a technique for solving the above-described problems is required.

한편, 전술한 배경기술은 발명자가 본 발명의 도출을 위해 보유하고 있었거나, 본 발명의 도출 과정에서 습득한 기술 정보로서, 반드시 본 발명의 출원 전에 일반 공중에게 공개된 공지기술이라 할 수는 없다.On the other hand, the background art described above is technical information acquired by the inventor for the derivation of the present invention or obtained in the derivation process of the present invention, and can not necessarily be a known technology disclosed to the general public before the application of the present invention .

본 명세서에서 개시되는 실시예들은, 뉴럴네트워크의 출력의 질을 유지하면서 적은 비트수로 데이터 형식을 구성할 수 있도록 데이터의 분포에 기초하여 양자화를 달리 적용하는 뉴럴네트워크 가속 방법 및 장치를 제시하는데 목적이 있다.The embodiments disclosed herein provide a neural network acceleration method and apparatus for applying quantization differently based on the distribution of data so that the data format can be configured with a small number of bits while maintaining the quality of the output of the neural network .

본 명세서에서 개시되는 실시예들은, 뉴럴네트워크의 데이터 중 큰 값을 가지는 일부의 이상치 데이터는 고정밀도로 계산하고, 나머지 데이터에 대해서는 저정밀도로 계산하여 계산량을 줄이는 뉴럴네트워크 가속 방법 및 장치를 제시하는데 목적이 있다.The embodiments disclosed herein provide a method and apparatus for accelerating a neural network in which a certain amount of outlier data having a large value among data of a neural network is calculated with high accuracy and the remaining data is calculated with a low accuracy to reduce the amount of calculation .

본 명세서에서 개시되는 실시예들은, 뉴럴네트워크의 데이터에 대해 양자화를 달리하여 메모리 접근 데이터양을 줄이는 뉴럴네트워크 가속 방법 및 장치를 제시하는데 목적이 있다.The embodiments disclosed herein are aimed at providing a neural network acceleration method and apparatus that reduces the amount of memory access data by varying the quantization for the data of the neural network.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 일 실시예에 따르면, 뉴럴네트워크 상의 데이터 처리를 가속화하는 장치에 있어서, 상기 뉴럴네트워크 상의 데이터의 특성에 기초하여 상기 데이터에 양자화를 수행하고, 양자화된 데이터의 표현형식에 따라 상기 데이터에 대한 계산을 분리하여 수행하는 제어부 및 상기 양자화된 데이터를 저장하는 메모리를 포함할 수 있다.According to an embodiment of the present invention, there is provided an apparatus for accelerating data processing on a neural network, comprising: a quantizer for quantizing the data based on characteristics of data on the neural network; A controller for separating and performing calculations on the data according to a representation format of the data, and a memory for storing the quantized data.

다른 실시예에 따르면, 뉴럴네트워크가속장치가 뉴럴네트워크 상의 데이터 처리를 가속화하는 방법에 있어서, 상기 뉴럴네트워크 상의 데이터의 특성에 기초하여 상기 데이터에 양자화를 수행하는 단계, 상기 양자화된 데이터를 저장하는 단계 및 상기 양자화된 데이터의 표현형식에 따라 상기 데이터에 대한 계산을 분리하여 수행하는 단계를 포함할 수 있다.According to another embodiment, a method for accelerating data processing on a neural network, the method comprising: performing quantization on the data based on characteristics of the data on the neural network; storing the quantized data And separating and performing the calculation on the data according to a representation format of the quantized data.

다른 실시예에 따르면, 뉴럴네트워크가속방법을 수행하는 프로그램이 기록된 컴퓨터 판독이 가능한 기록매체로서, 뉴럴네트워크가속방법은, 상기 뉴럴네트워크 상의 데이터의 특성에 기초하여 상기 데이터에 양자화를 수행하는 단계, 상기 양자화된 데이터를 저장하는 단계 및 상기 양자화된 데이터의 표현형식에 따라 상기 데이터에 대한 계산을 분리하여 수행하는 단계를 포함할 수 있다.According to another embodiment, there is provided a computer readable medium having recorded thereon a program for performing a neural network acceleration method, the method comprising: performing quantization on the data based on characteristics of data on the neural network; Storing the quantized data, and separating and performing calculations on the data according to a representation format of the quantized data.

다른 실시예에 따르면, 뉴럴네트워크가속장치에 의해 수행되며, 뉴럴네트워크가속방법을 수행하기 위해 기록매체에 저장된 컴퓨터프로그램으로서, 뉴럴네트워크가속방법은, 상기 뉴럴네트워크 상의 데이터의 특성에 기초하여 상기 데이터에 양자화를 수행하는 단계, 상기 양자화된 데이터를 저장하는 단계 및 상기 양자화된 데이터의 표현형식에 따라 상기 데이터에 대한 계산을 분리하여 수행하는 단계를 포함할 수 있다.According to another embodiment, a computer program stored on a recording medium for performing a neural network acceleration method, the neural network acceleration method comprising the steps of: Performing quantization, storing the quantized data, and separating and performing calculation on the data according to a representation format of the quantized data.

전술한 과제 해결 수단 중 어느 하나에 의하면, 뉴럴네트워크의 출력의 질을 유지하면서 적은 비트수로 데이터 형식을 구성할 수 있도록 데이터의 분포에 기초하여 양자화를 달리 적용하는 뉴럴네트워크 가속 방법 및 장치를 제시할 수 있다. According to any one of the above-mentioned problem solving means, a neural network acceleration method and apparatus are proposed in which quantization is applied differently based on the distribution of data so that the data format can be configured with a small number of bits while maintaining the output quality of the neural network can do.

또한, 전술한 과제 해결 수단 중 어느 하나에 의하면, 뉴럴네트워크의 데이터 중 큰 값을 가지는 일부의 이상치 데이터는 고정밀도로 계산하고, 나머지 데이터에 대해서는 저정밀도로 계산하여 계산량을 줄이는 뉴럴네트워크 가속 방법 및 장치를 제시할 수 있다. Further, according to any one of the above-mentioned means for solving the above-mentioned problems, a neural network acceleration method and apparatus for calculating a certain amount of outlier data having a large value among data of a neural network with high precision and calculating the remaining data with low precision, .

아울러 전술한 과제 해결 수단 중 어느 하나에 의하면, 뉴럴네트워크의 데이터에 대해 양자화를 달리하여 메모리 접근 데이터양을 줄이는 뉴럴네트워크 가속 방법 및 장치를 제시할 수 있다.In addition, according to any one of the above-mentioned problem solving means, it is possible to suggest a neural network acceleration method and apparatus for reducing the amount of memory access data by varying quantization on data of a neural network.

개시되는 실시예들에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 개시되는 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtained in the disclosed embodiments are not limited to the effects mentioned above, and other effects not mentioned are obvious to those skilled in the art to which the embodiments disclosed from the following description belong It can be understood.

도 1은 일 실시예에 따른 뉴럴네트워크가속장치를 도시한 블록도이다.
도 2는 일 실시예에 따른 뉴럴네트워크가속방법을 설명하기 위한 순서도이다.
도 3 내지 도 10 은 일 실시예에 따른 뉴럴네트워크가속방법을 설명하기 위한 참고도이다.
도 11 내지 도 12 는 일 실시예에 따른 뉴럴네트워크가속방법의 성능을 실험한 데이터이다.
1 is a block diagram illustrating a neural network accelerator according to one embodiment.
2 is a flowchart illustrating a method of accelerating a neural network according to an exemplary embodiment of the present invention.
3 to 10 are reference views for explaining a neural network acceleration method according to an embodiment.
11 to 12 are experimental data on the performance of the neural network acceleration method according to an embodiment.

아래에서는 첨부한 도면을 참조하여 다양한 실시예들을 상세히 설명한다. 아래에서 설명되는 실시예들은 여러 가지 상이한 형태로 변형되어 실시될 수도 있다. 실시예들의 특징을 보다 명확히 설명하기 위하여, 이하의 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에게 널리 알려져 있는 사항들에 관해서 자세한 설명은 생략하였다. 그리고, 도면에서 실시예들의 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Various embodiments are described in detail below with reference to the accompanying drawings. The embodiments described below may be modified and implemented in various different forms. In order to more clearly describe the features of the embodiments, detailed descriptions of known matters to those skilled in the art are omitted. In the drawings, parts not relating to the description of the embodiments are omitted, and like parts are denoted by similar reference numerals throughout the specification.

명세서 전체에서, 어떤 구성이 다른 구성과 "연결"되어 있다고 할 때, 이는 ‘직접적으로 연결’되어 있는 경우뿐 아니라, ‘그 중간에 다른 구성을 사이에 두고 연결’되어 있는 경우도 포함한다. 또한, 어떤 구성이 어떤 구성을 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한, 그 외 다른 구성을 제외하는 것이 아니라 다른 구성들을 더 포함할 수도 있음을 의미한다.Throughout the specification, when a configuration is referred to as being "connected" to another configuration, it includes not only a case of being directly connected, but also a case of being connected with another configuration in between. In addition, when a configuration is referred to as "including ", it means that other configurations may be included, as well as other configurations, as long as there is no specially contradicted description.

이하 첨부된 도면을 참고하여 실시예들을 상세히 설명하기로 한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

다만 이를 설명하기에 앞서, 아래에서 사용되는 용어들의 의미를 먼저 정의한다. Before describing this, we first define the meaning of the terms used below.

이하에서 ‘뉴럴네트워크’는 입력레이어, 적어도 하나의 은닉레이어 그리고 출력레이어로 구성될 수 있으며, 각 레이어는 적어도 하나의 ‘노드’로 구성될 수 있다. 그리고 각 레이어의 노드는 다음 레이어의 노드와의 연결관계를 형성할 수 있다. Hereinafter, the 'neural network' may include an input layer, at least one hidden layer, and an output layer, and each layer may include at least one 'node'. The node of each layer can form the connection relation with the node of the next layer.

그리고 ‘데이터’는 뉴럴네트워크의 각 레이어의 노드에 입력되거나 출력되는 정보로 다음 레이어에 전달할 때 레이어에 입력되는 데이터의 반영강도를 결정하는 웨이트(Weight)와 노드에서 입출력되는 데이터인 액티베이션(Activation) 등이 포함될 수 있다. The 'data' is information input or output to each layer of the neural network. It is a weight that determines the reflection intensity of data input to the layer when it is transmitted to the next layer, and activation, which is input / And the like.

‘양자화’는 계산의 결과품질 저하를 최소로 하면서 적은 비트 수로 데이터를 표현하는 기술이다. 'Quantization' is a technique that expresses data with a small number of bits while minimizing quality degradation as a result of the calculation.

이러한 양자화방법은 예를 들어, 이진 가중치(binary weight) 적용하는 이진(binary) 양자화방법이 있고, 복잡도가 큰 네트워크에 적용되는 N (>1) 비트 양자화방법으로 딥 뉴럴 네트워크의 경우에도 8비트 양자화가 가능한 cross entropy를 최소화하는 clipping 기반 양자화방법과 3% 이내의 정확도 손실로 4비트 양자화기법인 균형 양자화(Balanced quantization)방법 등이 있다. This quantization method is a binary quantization method applying a binary weight, for example, and an N (> 1) bit quantization method applied to a network having a high complexity. Even in the case of a deep neural network, Clipping based quantization method that minimizes possible cross entropy and balanced quantization method which is 4 bit quantization method with accuracy loss within 3%.

위에 정의한 용어 이외에 설명이 필요한 용어는 아래에서 각각 따로 설명한다.Terms other than those defined above are explained below separately.

도 1은 일 실시예에 따른 뉴럴네트워크가속장치(10)를 설명하기 위한 블록도이다.1 is a block diagram for explaining a neural network acceleration apparatus 10 according to an embodiment.

뉴럴네트워크가속장치(10)는 네트워크(N)를 통해 원격지의 서버에 접속하거나, 타 단말 및 서버와 연결 가능한 컴퓨터나 휴대용 단말기, 텔레비전, 웨어러블 디바이스(Wearable Device) 등으로 구현될 수 있다. 여기서, 컴퓨터는 예를 들어, 웹 브라우저(WEB Browser)가 탑재된 노트북, 데스크톱(desktop), 랩톱(laptop)등을 포함하고, 휴대용 단말기는 예를 들어, 휴대성과 이동성이 보장되는 무선 통신 장치로서, PCS(Personal Communication System), PDC(Personal Digital Cellular), PHS(Personal Handyphone System), PDA(Personal Digital Assistant), GSM(Global System for Mobile communications), IMT(International Mobile Telecommunication)-2000, CDMA(Code Division Multiple Access)-2000, W-CDMA(W-Code Division Multiple Access), Wibro(Wireless Broadband Internet), 스마트폰(Smart Phone), 모바일 WiMAX(Mobile Worldwide Interoperability for Microwave Access) 등과 같은 모든 종류의 핸드헬드(Handheld) 기반의 무선 통신 장치를 포함할 수 있다. 또한, 텔레비전은 IPTV(Internet Protocol Television), 인터넷 TV(Internet Television), 지상파 TV, 케이블 TV 등을 포함할 수 있다. 나아가 웨어러블 디바이스는 예를 들어, 시계, 안경, 액세서리, 의복, 신발 등 인체에 직접 착용 가능한 타입의 정보처리장치로서, 직접 또는 다른 정보처리장치를 통해 네트워크를 경유하여 원격지의 서버에 접속하거나 타 단말과 연결될 수 있다.The neural network accelerator 10 may be implemented as a computer, a portable terminal, a television, a wearable device, or the like, which can be connected to a remote server through a network N or connected to other terminals and servers. Here, the computer includes, for example, a notebook computer, a desktop computer, a laptop computer, and the like, each of which is equipped with a web browser (WEB Browser), and the portable terminal may be a wireless communication device , Personal Communication System (PCS), Personal Digital Cellular (PDC), Personal Handyphone System (PHS), Personal Digital Assistant (PDA), Global System for Mobile communications (GSM), International Mobile Telecommunication (IMT) (W-CDMA), Wibro (Wireless Broadband Internet), Smart Phone, Mobile WiMAX (Mobile Worldwide Interoperability for Microwave Access) (Handheld) based wireless communication device. In addition, the television may include an Internet Protocol Television (IPTV), an Internet television (TV), a terrestrial TV, a cable TV, and the like. Further, the wearable device is an information processing device of a type that can be directly worn on a human body, for example, a watch, a glasses, an accessory, a garment, shoes, and the like. The wearable device can be connected to a remote server via a network, Lt; / RTI >

도 1을 참조하면, 일 실시예에 따른 뉴럴네트워크가속장치(10)는 입출력부(110), 제어부(120), 통신부(130) 및 메모리(140)를 포함할 수 있다.Referring to FIG. 1, the neural network acceleration apparatus 10 according to an embodiment may include an input / output unit 110, a control unit 120, a communication unit 130, and a memory 140.

입출력부(110)는 사용자로부터 입력을 수신하기 위한 입력부와, 작업의 수행 결과 또는 뉴럴네트워크가속장치(10)의 상태 등의 정보를 표시하기 위한 출력부를 포함할 수 있다. 예를 들어, 입출력부(110)는 사용자 입력을 수신하는 조작 패널(operation panel) 및 화면을 표시하는 디스플레이 패널(display panel) 등을 포함할 수 있다.The input / output unit 110 may include an input unit for receiving an input from a user, and an output unit for displaying information such as a result of a task or a state of the neural network accelerator 10. [ For example, the input / output unit 110 may include an operation panel for receiving user input and a display panel for displaying a screen.

구체적으로, 입력부는 키보드, 물리 버튼, 터치 스크린, 카메라 또는 마이크 등과 같이 다양한 형태의 사용자 입력을 수신할 수 있는 장치들을 포함할 수 있다. 또한, 출력부는 디스플레이 패널 또는 스피커 등을 포함할 수 있다. 다만, 이에 한정되지 않고 입출력부(110)는 다양한 입출력을 지원하는 구성을 포함할 수 있다.In particular, the input unit may include devices capable of receiving various types of user input, such as a keyboard, a physical button, a touch screen, a camera or a microphone. Also, the output unit may include a display panel or a speaker. However, the present invention is not limited to this, and the input / output unit 110 may include various input / output support structures.

제어부(120)는 뉴럴네트워크장치(10)의 전체적인 동작을 제어하며, CPU 등과 같은 프로세서를 포함할 수 있다. 제어부(120)는 입출력부(110)를 통해 수신한 사용자 입력에 대응되는 동작을 수행하도록 뉴럴네트워크장치(10)에 포함된 다른 구성들을 제어할 수 있다.The control unit 120 controls the overall operation of the neural network device 10 and may include a processor such as a CPU. The control unit 120 may control other components included in the neural network device 10 to perform an operation corresponding to the user input received through the input /

예를 들어, 제어부(120)는 메모리(140)에 저장된 프로그램을 실행시키거나, 메모리(140)에 저장된 파일을 읽어오거나, 새로운 파일을 메모리(140)에 저장할 수도 있다.For example, the control unit 120 may execute a program stored in the memory 140, read a file stored in the memory 140, or store a new file in the memory 140. [

이러한 제어부(120)는 뉴럴네트워크를 구성하는 적어도 하나의 레이어 각각을 구성하는 노드에서 이용되는 데이터에 대해 적어도 하나의 방법으로 양자화를 수행할 수 있다. The control unit 120 may perform quantization on data used in a node constituting each of at least one layer constituting the neural network by at least one method.

즉, 제어부(120)는 뉴럴네트워크 상의 데이터 값에 기초하여 적은 수의 이상치(outlier)데이터에 고정밀도 양자화 방법을 적용할 수 있고, 나머지 대부분의 데이터인 노멀데이터에 저정밀도 양자화 방법을 분리 적용할 수 있다. That is, the control unit 120 can apply the high-precision quantization method to a small number of outlier data based on the data value on the neural network, and separately apply the low-precision quantization method to the remaining normal data .

예를 들어, 제어부(120)는 웨이트의 값을 기준으로 뉴럴네트워크 상의 웨이트를 값에 따라 카운트하여 값에 따른 웨이트의 분포를 획득할 수 있고, 웨이트 값 별 카운트된 웨이트의 수에 따라 구간을 나눌 수 있다. 이때, 제어부(120)는 웨이트의 절대값이 0에 가까울수록 구간을 좁게 나눌 수 있고, 웨이트의 절대값이 0 보다 클수록 구간을 넓게 나눌 수 있다.For example, the control unit 120 can obtain the distribution of the weight according to the value by counting the weight on the neural network based on the value of the weight, and divides the interval according to the number of counted weights by the weight value . At this time, the controller 120 can divide the interval narrower as the absolute value of the weight is closer to 0, and can divide the interval broader as the absolute value of the weight is larger than 0.

또는 예를 들어, 제어부(120)는 웨이트의 수에 기초하여 웨이트의 수가 기 설정된 수 이상인 경우에는 웨이트 값 구간을 0.05 간격으로 나눌 수 있고, 웨이트의 수가 기 설정된 수 이하인 경우에는 웨이트 값 구간을 0.1 간격으로 구간을 나눌 수 있다. Alternatively, for example, when the number of weights is equal to or greater than a predetermined number based on the number of weights, the control section 120 may divide the weight value section by 0.05 intervals. If the number of weights is equal to or less than the preset number, You can divide the interval by interval.

그리고 제어부(120)는 적어도 하나의 구간에 대해 각 구간에 포함된 데이터의 특성에 따라 데이터에 적용할 양자화 방법을 달리 적용할 수 있다. The controller 120 may apply the quantization method to be applied to the data according to the characteristics of data included in each section for at least one section.

이때, 제어부(120)가 적용하는 양자화방법은 데이터와 양자화된 데이터 간의 오차에 기초하여 데이터에 대한 양자화 수준(level)을 결정하여 적용할 수 있다.At this time, the quantization method applied by the control unit 120 can determine and apply a quantization level for data based on an error between the data and the quantized data.

예를 들어, 제어부(120)는 웨이트의 값이 상대적으로 큰 0.4 이상의 구간은 양자화 전 데이터와 양자화된 데이터의 값의 오차가 커 양자화 수준을 16비트인 고정밀 양자화 방법을 적용할 수 있으며, 양자화 전 데이터와 양자화된 데이터의 값의 오차가 적은 웨이트 값이 0.4 미만의 구간에 대해서는 양자화 수준을 8 비트인 저정밀 양자화 방법을 적용할 수 있다. For example, the control unit 120 can apply a high-precision quantization method in which the quantization level is 16 bits because the error between the quantization data and the quantized data is large in a section of 0.4 or more in which the value of the weight is relatively large, A low-precision quantization method with a quantization level of 8 bits can be applied to an interval in which the error value of the data and the quantized data is small and the weight value is less than 0.4.

이와 같이 제어부(120)가 데이터의 분포에 기초하여 구간 별로 서로 다른 방법의 양자화를 적용함으로써 값이 큰 이상치데이터에 의해 데이터의 분포가 좌우로 퍼지는 형태인 긴 꼬리(long tail)형태를 가지는 경우에도, 제한된 비트로 양자화를 수행하여 계산속도를 높임과 동시에 긴 꼬리에 영역에 속한 데이터의 양자화에 따른 뉴럴네트워크 출력 품질의 저하를 줄일 수 있다.In this way, even if the control unit 120 applies a quantization of different methods for each section based on the distribution of data, and thus has a long tail shape in which the distribution of the data spreads to the left and right by the outlier data having a large value , It is possible to reduce the degradation of the neural network output quality due to the quantization of data belonging to the long tail region while increasing the calculation speed by performing quantization with limited bits.

이상치를 고려한 양자화는 양자화 오류를 줄이는 면에서 기존 선형양자화 대비 2가지 장점이 있다. 첫째, 대부분의 데이터는 적은 양자화 오류를 갖는다. 둘째, 이상치의 경우 고정밀도 값으로 표현되므로 이상치 데이터는 양자화 오류가 없다. 이상치들은 값이 크기 때문에 결과에 큰 영향을 미치는 데이터이므로 이를 고려한 양자화는 전체적인 양자화 오류를 줄여서 기존 선형 양자화 대비 적은 수의 비트로 데이터를 표현할 수 있게 한다.Quantization considering anomalies has two advantages over existing linear quantization in reducing quantization errors. First, most of the data has fewer quantization errors. Second, since the outliers are represented by high precision values, there is no quantization error in the outlier data. Since the outliers are large data, the quantization considering the data has a large effect on the result. Therefore, it reduces the overall quantization error, thereby allowing the data to be represented with a small number of bits compared to the existing linear quantization.

이후, 제어부(120)는 데이터의 형식에 따라 이상치 데이터와 노멀 데이터로 분류하여 메모리(140)상의 버퍼에 데이터를 저장할 수 있고, 버퍼에 저장된 데이터가 이상치 데이터와 노멀데이터를 분류하여 계산을 수행할 수 있다. Thereafter, the control unit 120 classifies the data into the abnormal data and the normal data according to the data format, and stores the data in the buffer on the memory 140. The data stored in the buffer classifies the abnormal data and the normal data to perform the calculation .

실시예에 따라, 제어부(120)는 실시예에 따라, 제어부(120)는 데이터에 포함되는 양자화된 액티베이션을 표현한 비트수에 기초하여, 기 설정된 비트수를 초과한 이상치액티베이션 및 기 설정된 비트수 이하인 노멀액티베이션 중 어느 하나로 액티베이션을 분류할 수 있다. According to the embodiment, the control unit 120 controls the operation of the control unit 120 based on the number of bits representing the quantized activation included in the data, Lt; RTI ID = 0.0 > normal activation. ≪ / RTI >

예를 들어, 제어부(120)는 액티베이션를 나타내는 비트 수가 8비트를 초과하는지 판단할 수 있고, 8 비트를 초과하는 이상치액티베이션과 8비트 이하 노멀액티베이션으로 분류할 수 있다. For example, the control unit 120 can determine whether the number of bits representing the activation exceeds 8 bits, and can classify the abnormal value activation to exceed 8 bits and the normal activation to 8 bits or less.

그리고 제어부(120)는 노멀액티베이션과 이상치액티베이션을 분리하여 병렬적으로 계산할 수 있다. Then, the controller 120 can separately calculate the normal activation and the abnormal activation, and calculate them in parallel.

하나의 실시예에 따라 노드에 입력되는 액티베이션이 노멀액티베이션이면, 제어부(120)는 노멀액티베이션에 대해 계산을 수행하는 노멀계산그룹을 통해 계산을 수행할 수 있다. If the activation input to the node according to one embodiment is a normal activation, the control unit 120 may perform computation via a normal computation group that performs computations for normal activation.

예를 들어, 제어부(120)는 노멀액티베이션의 계산을 위해 메모리(140)의 버퍼에 저장된 16개의 4 비트의 액티베이션인 노멀액티베이션을 노멀계산그룹의 클러스터 액티베이션 버퍼(Cluster activation buffer)로 전송할 수 있고, 웨이트를 노멀계산그룹의 클러스터 웨이트 버퍼(Cluster weight buffer)로 이동시킬 수 있다. For example, the controller 120 may transmit normal activation, which is 16 four-bit activation stored in the buffer of the memory 140, to the cluster activation buffer of the normal calculation group for calculating the normal activation, The weight can be moved to the cluster weight buffer of the normal calculation group.

이때, 실시예에 따라 클러스터 웨이트 버퍼는 표 형태로 구성될 수 있고, 표의 각 행(Row)은 16 개의 4 비트 웨이트인 노멀웨이트와 함께 8 비트 웨이트인 이상치웨이트를 표현하기 위한 8 비트 포인터 및 4 비트 인덱스 값들로 구성될 수 있다. 그리고 클러스터 액티베이션 버퍼는 16 개의 4 비트 액티베이션인 노멀액티베이션이 하나의 행으로 구성될 수 있다.In this case, the cluster weight buffer may be configured in the form of a table, and each row of the table includes an 8-bit pointer for expressing the ideal weight, which is an 8-bit weight, and a 4-bit pointer Bit index values. And the cluster activation buffer may consist of 16 rows of 4-bit activation normal activation in one row.

그리고 제어부(120)는 클러스터 웨이트 버퍼에 저장된 웨이트와 클러스터 액티베이션 버퍼에 저장된 액티베이션 각각을 병렬적으로 계산할 수 있다. 이때, 제어부(120)는 뉴럴네트워크를 구성하는 노드에서 출력되는 데이터인 액티베이션(activation) 중 제로-액티베이션을 제외한 액티베이션에 대한 계산을 스케줄링할 수 있다. The controller 120 may calculate the weight stored in the cluster weight buffer and the activation stored in the cluster activation buffer in parallel. At this time, the controller 120 may schedule the calculation of the activation except for the zero-activation among the activation, which is data output from the node constituting the neural network.

예를 들어, 제어부(120)는 클러스터 웨이트 버퍼로부터 16개의 웨이트와 클러스터 액티베이션 버퍼로부터 16개의 액티베이션을 노멀계산그룹을 구성하는 16개의 계산 유닛에 각각 할당할 수 있다. 그리고 제어부(120)는 계산 유닛을 통해 1개의 4비트 웨이트와 1개의 4비트 액티베이션간의 콘볼루션 계산을 1싸이클(Cycle)에 수행할 수 있다. 이후, 제어부(120)는 16개의 계산유닛 각각에서 계산된 결과를 결합한 후 버퍼에 저장할 수 있다. For example, the control unit 120 may assign 16 weights from the cluster weight buffer and 16 activations from the cluster activation buffer to 16 calculation units constituting the normal calculation group, respectively. The control unit 120 may perform a convolution calculation between one 4-bit weight and one 4-bit activation in one cycle through the calculation unit. Thereafter, the control unit 120 may combine the calculated results in each of the 16 calculation units and store them in a buffer.

이때, 클러스터 웨이트 버퍼에 저장된 웨이트 중 이상치웨이트가 존재하면, 제어부(120)는 이상치웨이트와 액티베이션의 계산을 2 싸이클에 수행할 수 있다.At this time, if there is an outlier weight among the weights stored in the cluster weight buffer, the control unit 120 can calculate the outlier weight and the activation in two cycles.

예를 들어, 16개의 웨이트 중 1개의 8비트 이상치웨이트가 존재하면, 제어부(120)는 8비트의 이상치웨이트 중 상위 4비트(MSB)에 대해 4비트 액티베이션과 4비트 콘볼루션 계산을 수행하고, 나머지 하위 4 비트에 대해 상기 액티베이션과 4비트 콘볼루션 계산을 수행하여 합산함으로써 이상치웨이트와 액티베이션의 콘볼루션 계산을 2싸이클(Cycle)에 수행할 수 있다. For example, if there is one 8-bit outlier weight among the 16 weights, the controller 120 performs 4-bit activation and 4-bit convolution calculations on the upper 4 bits (MSB) of the 8-bit outlier weight, And performing the activation and the 4-bit convolution computation on the remaining lower 4 bits and summing them, thereby performing the convolution computation of the ideal weight and the activation in two cycles.

다른 실시예에 따라 노드에 입력되는 액티베이션이 이상치액티베이션이면, 제어부(120)는 이상치액티베이션에 대해 계산을 수행하는 이상치계산그룹을 통해 계산을 수행할 수 있다. If the activation input to the node according to another embodiment is an outlier activation, the controller 120 may perform computation through an outlier computation group that performs computations for outlier activation.

예를 들어, 제어부(120)는 버퍼에 저장된 이상치액티베이션인 16 비트 액티베이션을 16개 획득하고, 클러스터 웨이트 버퍼로부터 16개의 웨이트를 획득하여 이상치계산그룹을 구성하는 16개의 계산유닛 각각에 할당하여 병렬적으로 콘볼루션 계산을 수행할 수 있다. For example, the control unit 120 obtains 16 16-bit activations, which are the outlier activation stored in the buffer, and obtains 16 weights from the cluster weight buffer, assigns them to each of the 16 calculation units constituting the outlier calculation group, To perform the convolution calculation.

이때, 16 개의 웨이트 중 1개의 이상치웨이트가 포함되어 있으면, 제어부(120)는 이상치웨이트의 상위비트와 16비트 액티베이션을 제 1 계산유닛을 통해 콘볼루션 계산을 수행하고, 이상치웨이트의 하위비트와 상기 16 비트 액티베이션을 제 2 계산유닛을 통해 각각 계산함으로써 2 개의 계산유닛에서 병렬적으로 계산을 수행할 수 있다. At this time, if one of the 16 weights is included, the control unit 120 performs the convolution calculation through the first calculation unit for the upper bit and the 16-bit activation of the outlier weight, The calculation can be performed in parallel in two calculation units by calculating 16-bit activation through the second calculation unit, respectively.

이후, 제어부(120)는 노멀계산그룹에서 계산된 결과와 이상치계산그룹에서 계산된 결과를 기초로 노드에서의 계산결과를 버퍼에 저장할 수 있다. Thereafter, the control unit 120 may store the calculation result at the node in the buffer based on the result calculated in the normal calculation group and the calculation result in the outlier calculation group.

예를 들어, 제어부(120)는 3개의 버퍼로 구성된 클러스터 출력 트라이버퍼(cluster output tri-buffer) 중 2 개의 버퍼에 접근하여 기 계산된 결과에 노멀계산그룹에서 계산된 새로운 결과를 합산하여 저장할 수 있다. 이후, 제어부(120)는 이상치계산그룹에서 계산된 결과를 클러스터 출력 트라이버퍼에 저장된 결과에 합산하여 최종 결과를 계산할 수 있다. For example, the controller 120 accesses two buffers among the cluster output tri-buffers constituted by three buffers, and adds the new results calculated in the normal calculation group to the previously calculated results. have. Thereafter, the control unit 120 may calculate the final result by adding the result calculated in the outlier calculation group to the result stored in the cluster output tri-buffer.

이와 같이 계산을 처리하는 뉴럴네트워크의 노드에서 계산그룹을 데이터에 대한 양자화 방법에 따라 선택적으로 계산그룹을 달리 함으로써 데이터의 분포에서 긴 꼬리에 해당하는 데이터를 이용한 연산의 수행횟수를 크게 낮출 수 있어 계산량을 획기적으로 낮출 수 있음과 동시에 양자화에 따른 뉴럴네트워크의 결과 오차를 최소화할 수 있다.In this way, in the node of the neural network that processes the calculation, the number of calculation using data corresponding to the long tail can be greatly reduced in the distribution of data by selectively changing the calculation group according to the quantization method for the data, And the resultant error of the neural network due to the quantization can be minimized.

통신부(130)는 다른 디바이스 또는 네트워크와 유무선 통신을 수행할 수 있다. 이를 위해, 통신부(130)는 다양한 유무선 통신 방법 중 적어도 하나를 지원하는 통신 모듈을 포함할 수 있다. 예를 들어, 통신 모듈은 칩셋(chipset)의 형태로 구현될 수 있다.The communication unit 130 can perform wired / wireless communication with another device or a network. To this end, the communication unit 130 may include a communication module supporting at least one of various wired / wireless communication methods. For example, the communication module may be implemented in the form of a chipset.

통신부(130)가 지원하는 무선 통신은, 예를 들어 Wi-Fi(Wireless Fidelity), Wi-Fi Direct, 블루투스(Bluetooth), UWB(Ultra Wide Band) 또는 NFC(Near Field Communication) 등일 수 있다. 또한, 통신부(130)가 지원하는 유선 통신은, 예를 들어 USB 또는 HDMI(High Definition Multimedia Interface) 등일 수 있다.The wireless communication supported by the communication unit 130 may be Wi-Fi (Wireless Fidelity), Wi-Fi Direct, Bluetooth, UWB (Ultra Wide Band), NFC (Near Field Communication), or the like. The wired communication supported by the communication unit 130 may be, for example, USB or High Definition Multimedia Interface (HDMI).

메모리(140)에는 파일, 어플리케이션 및 프로그램 등과 같은 다양한 종류의 데이터가 설치 및 저장될 수 있다. 제어부(120)는 메모리(140)에 저장된 데이터에 접근하여 이를 이용하거나, 또는 새로운 데이터를 메모리(140)에 저장할 수도 있다. 또한, 제어부(120)는 메모리(140)에 설치된 프로그램을 실행할 수도 있다. 도 1을 참조하면, 메모리(140)에는 양자화방법을 수행하기 위한 프로그램이 설치될 수 있다.Various types of data such as files, applications, programs, and the like can be installed and stored in the memory 140. [ The control unit 120 may access the data stored in the memory 140 and use the data or store the new data in the memory 140. [ Also, the control unit 120 may execute a program installed in the memory 140. [ Referring to FIG. 1, a program for performing a quantization method may be installed in the memory 140.

이러한 메모리(140)는 제어부(120)의 노멀계산그룹 또는 이상치계산그룹에서 계산된 데이터를 저장할 수 있다.The memory 140 may store the calculated data in the normal calculation group or the outlier calculation group of the control unit 120. [

이를 위해 메모리(140)에는 버퍼가 할당될 수 있으며 예를 들어, 데이터가 저장되는 버퍼와 노멀액티베이션이 저장되는 클러스터 액티베이션 버퍼, 웨이트가 저장되는 클러스터 웨이트 버퍼 및 계산그룹에서 계산된 결과가 저장되는 클러스터 출력 트라이버퍼가 할당될 수 있다. For this purpose, a buffer may be allocated in the memory 140, for example, a buffer for storing data, a cluster activation buffer for storing normal activation, a cluster weight buffer for storing weights, and a cluster An output tri buffer can be assigned.

즉, 뉴럴네트워크 하드웨어 가속기(Cnvlutin)의 경우 영(zero) 입력 액티베이션(activation)에 대한 곱셈 연산을 스킵(skip)하여 계산량을 줄인다. 기존 하드웨어 가속기는 양자화를 지원하기 위한 특별한 구조를 가지고 있는 경우가 없으며, 계산시 데이터의 실효 비트수를 줄이는 구조가 있으나 이 역시 메모리 접근 시에는 데이터 비트수를 32비트 또는 16비트를 가정한다. That is, in the case of the neural network hardware accelerator (Cnvlutin), the multiplication operation for zero input activation is skipped to reduce the calculation amount. Existing hardware accelerators do not have a special structure to support quantization, and there is a structure to reduce the number of effective bits of data in calculation. However, it is assumed that the number of data bits is 32 bits or 16 bits in memory access.

이러한 뉴럴네트워크가속장치(10)는 적은 수의 이상치(outlier)에 고정밀도 데이터를, 나머지 대부분의 데이터에 저정밀도 데이터를 사용하여, 결과적으로 대규모의 깊은 뉴럴네트워크의 경우에도 유효 4비트 수준의 데이터 표현 및 계산을 가능하게 하는 점에서 기존 가속장치와 차이가 있다. Such a neural network accelerator 10 uses high-precision data for a small number of outliers and low-precision data for most of the remaining data, resulting in data of 4-bit level even in the case of a large-scale deep neural network It differs from conventional accelerators in that it allows representation and calculation.

도 2 는 일 실시예에 따른 뉴럴네트워크가속방법을 설명하기 위한 순서도이다. 2 is a flowchart illustrating a method of accelerating a neural network according to an exemplary embodiment of the present invention.

도 2 에 도시된 실시예에 따른 뉴럴네트워크가속방법은 도 1 에 도시된 뉴럴네트워크가속장치(10)에서 시계열적으로 처리되는 단계들을 포함한다. 따라서, 이하에서 생략된 내용이라고 하더라도 도 1 에 도시된 뉴럴네트워크가속장치(10)에 관하여 이상에서 기술한 내용은 도 2 에 도시된 실시예에 따른 뉴럴네트워크가속방법에도 적용될 수 있다.The neural network acceleration method according to the embodiment shown in FIG. 2 includes steps that are processed in a time-series manner in the neural network accelerator 10 shown in FIG. Therefore, even though omitted from the following description, the above description of the neural network accelerator 10 shown in FIG. 1 can be applied to the neural network acceleration method according to the embodiment shown in FIG.

우선, 뉴럴네트워크가속장치(10)는 뉴럴네트워크에서 이용되는 데이터에 대해 적어도 하나의 방법으로 양자화를 수행할 수 있다(S2001).First, the neural network accelerator 10 may perform quantization on data used in the neural network by at least one method (S2001).

실시예에 따라, 뉴럴네트워크가속장치(10)는 데이터가 가질 수 있는 값의 범위를 기준으로 뉴럴네트워크 내에서 이용되는 데이터의 분포를 획득할 수 있으며, 데이터의 분포에 기초하여 동일한 양자화 방법을 수행할 데이터 값의 구간을 나눌 수 있다. According to an embodiment, the neural network accelerator 10 can acquire a distribution of data used in a neural network based on a range of values that the data may have, and perform the same quantization method based on the distribution of data You can divide the interval of the data value to be divided.

예를 들어, 학습에 따라 뉴럴네트워크를 구성하는 레이어 상의 적어도 하나의 노드 간 데이터의 반영강도인 웨이트 값이 결정되면, 뉴럴네트워크가속장치(10)는 뉴럴네트워크 상의 웨이트의 값을 기초로 동일한 값을 가지는 웨이트를 카운트하여 웨이트 값의 분포를 획득할 수 있다. 그리고 뉴럴네트워크가속장치(10)는 웨이트의 수에 반비례하여 동일한 양자화 방법을 수행할 웨이트 값의 구간을 좁게 설정하고, 데이터의 수가 적은 구간에 대해서는 동일한 양자화 방법을 수행할 웨이트의 값의 구간을 넓게 설정할 수 있다.For example, if the weight value, which is the reflection strength of data between at least one node on the layer constituting the neural network, is determined according to the learning, the neural network accelerator 10 calculates the same value based on the value of the weight on the neural network The weights of the branches can be counted to obtain the distribution of the weight values. The neural network accelerating apparatus 10 sets the interval of the weight value to perform the same quantization method in inverse proportion to the number of weights and narrows the interval of the value of the weight for performing the same quantization method in a section in which the number of data is small Can be set.

도 3 은 가중치의 분포에 구간의 설정을 도시한 표이다. 이를 참조하면, 뉴럴네트워크가속장치(10)는 가중치의 수가 많은 구간인 0 내지 0.1사이는 0.05 단위로 구간 (301)을 설정할 수 있으며, 가중치의 수가 적은 구간은 0.1 내지 0.4 사이는 0.1 단위로 구간(302)을 설정할 수 있다. 3 is a table showing the setting of intervals in the distribution of weights. Referring to this, the neural network accelerator 10 can set the interval 301 between 0 and 0.1, which is a section having a large number of weights, and the interval 301 with a small number of weights is 0.1 to 0.4, (302).

그리고 뉴럴네트워크가속장치(10)는 데이터의 분포에 기초하여 설정된 적어도 하나의 구간 별로 양자화 방법을 달리 적용할 수 있으며, 데이터와 양자화가 적용된 데이터 간의 오차에 기초하여 각 구간에 대해 적용할 양자화의 레벨을 달리 결정할 수 있다.The neural network accelerating apparatus 10 may apply the quantization method differently according to at least one section set based on the distribution of data and may calculate the level of the quantization to be applied to each section based on the error between the data and the data to which the quantization is applied Can be determined differently.

실시예에 따라, 뉴럴네트워크가속장치(10)는 설정된 구간에 속하는 데이터 값에 기초하여 기 설정된 값을 초과하는 구간에 속하는 데이터인 이상치 데이터에 대해서는 고정밀 양자화 방법을 수행할 수 있고, 기 설정된 값 미만인 노멀 데이터에 대해서는 저정밀 양자화 방법을 수행할 수 있다.According to the embodiment, the neural network acceleration apparatus 10 can perform a high-precision quantization method on the outlier data, which is data belonging to a section exceeding a preset value, based on the data value belonging to the set interval, A low-precision quantization method can be performed for the normal data.

예를 들어, 뉴럴네트워크가속장치(10)는 웨이트 값이 상대적으로 큰 0.4 이상의 구간으로 양자화에 의한 오차가 큰 데이터에 대해서는 비트수가 16 비트인 고정밀 양자화방법을 수행할 수 있으며, 데이터 값이 0.4 미만의 구간으로 양자화에 의한 오차가 적은 데이터에 대해서는 비트수가 8 비트인 저정밀 양자화 방법을 적용할 수 있다. For example, the neural network accelerating apparatus 10 can perform a high-precision quantization method in which the number of bits is 16 bits for data with a large error due to quantization and a section with a relatively large weight value of 0.4 or more. When the data value is less than 0.4 A low-precision quantization method in which the number of bits is 8 bits can be applied to data having a small error due to quantization.

도 4 는 뉴럴네트워크가속장치(10) 상의 데이터에 포함되는 웨이트 분포에 따른 서로 다른 양자화를 수행한 값의 분포를 도시한 그래프이다. 4 is a graph showing the distribution of values obtained by performing different quantization according to the weight distribution included in the data on the neural network acceleration apparatus 10. In FIG.

도 4 를 참조하면, 뉴럴네트워크 상의 웨이트 값은 소수의 절대값이 큰 이상치 웨이트(402, 403)에 의해 제 1 그래프(401) 상의 웨이트 값의 분포가 넓게 된다. 이에 기존 선형 양자화 방법을 적용하면, 제 2 그래프(404)와 같이 양자화에 대한 오차가 많이 발생한다. Referring to FIG. 4, the weight value on the first graph 401 is broadened by the ideal weight 402, 403 having a large absolute value of the prime number on the neural network. Accordingly, when the conventional linear quantization method is applied, much error occurs in the quantization as in the second graph 404.

반면, 뉴럴네트워크가속장치(10)는 제 3 그래프(405)와 같이 웨이트의 값에 기초하여 이상치 웨이트(402, 403)와 나머지 웨이트로 값을 분류할 수 있고, 각 구간 별로 서로 다른 양자화 방법을 적용할 수 있고, 이상치 웨이트(406, 407)에 고정밀 양자화 방법을 적용함으로써 이상치 웨이트의 값에 대한 양자화 오차를 줄일 수 있으며, 노멀 웨이트에 대해 저정밀 양자화를 적용함으로써 적은 수의 비트로 웨이트를 표현할 수 있다. On the other hand, the neural network accelerator 10 can classify the values of the outlier weights 402 and 403 and the remaining weights based on the value of the weight, as in the third graph 405, By applying a high-precision quantization method to the outlier weights 406 and 407, a quantization error with respect to the value of the outlier weight can be reduced. By applying the low-precision quantization to the normal weight, the weight can be expressed with a small number of bits have.

이와 같이 각 데이터에 대해 서로 다른 양자화를 수행함으로써 기존에 모든 데이터에 대해 일률적인 양자화(ex. 선형양자화 또는 로그양자화)를 수행하는 경우에 비해 더 적은 비트 수로 데이터를 표현할 수 있음과 동시에 양자화 오차를 줄일 수 있어, 뉴럴네트워크의 출력의 질을 유지시킬 수 있다.By performing different quantization for each data, data can be expressed with a smaller number of bits than in the case of performing uniform quantization (e.g., linear quantization or log quantization) on all data, and at the same time, quantization error The output quality of the neural network can be maintained.

이후, 뉴럴네트워크가속장치(10)는 양자화된 데이터를 버퍼에 저장할 수 있다(S2002). Thereafter, the neural network acceleration apparatus 10 can store the quantized data in the buffer (S2002).

도 5 는 이상치 데이터를 고려한 뉴럴네트워크가속장치(10)의 구조를 도시한 예시도로 이를 참조하면, 뉴럴네트워크가속장치(10)는 최상위 계인 PE swarm(501)을 포함할 수 있으며, PE swarm(501)은 PE클러스터(502)와 PE클러스터(502)에서 계산된 정보를 저장하는 Swarm 버퍼(503) 그리고 PE 클러스터(502)의 동작과 주메모리와의 통신을 제어하는 Swarm 제어기(504)로 구성될 수 있다. 이러한 뉴럴네트워크가속장치(10)는 양자화되어 계산될 데이터를 PE swarm버퍼(503)에 저장할 수 있다. 이때, Swarm 버퍼(503)는 주메모리와 통신에 버퍼로 사용되고, PE 클러스터(502)의 입, 출력 값들을 저장할 수 있다. PE 클러스터(502)는 PE 그룹들과 클러스터 버퍼, 컨트롤러로 구성될 수 있다. PE 그룹은 각각 17 개의 계산유닛들로 구성될 수 있으며, 계산그룹은 노멀계산그룹과 이상치계산그룹의 2 가지 종류로 나뉠 수 있다. 계산그룹의 계산결과는 클러스터 출력 트라이버퍼(Cluster output tri-buffer)에 저장될 수 있다. 5 is a diagram illustrating the structure of a neural network accelerator 10 considering outlier data. Referring to FIG. 5, the neural network accelerator 10 may include a PE swarm 501, Includes a Swarm buffer 503 for storing information calculated in the PE cluster 502 and the PE cluster 502 and a Swarm controller 504 for controlling the operation of the PE cluster 502 and the communication with the main memory . Such a neural network accelerator 10 may store the data to be quantized and computed in the PE swarm buffer 503. At this time, the Swarm buffer 503 is used as a buffer for communication with the main memory, and can store the input and output values of the PE cluster 502. The PE cluster 502 may consist of PE groups, a cluster buffer, and a controller. The PE group can be composed of 17 calculation units each, and the calculation group can be divided into two types, a normal calculation group and an outlier calculation group. The calculation result of the calculation group can be stored in the cluster output tri-buffer.

그리고 뉴럴네트워크가속장치(10)는 양자화된 데이터의 표현형식에 따라 데이터에 대한 계산을 분리하여 수행할 수 있다(S2003).Then, the neural network acceleration apparatus 10 can perform computation on data separately according to the representation format of the quantized data (S2003).

이를 위해, 뉴럴네트워크가속장치(10)는 입력되는 데이터의 양자화 형식에 기초하여 이상치 액티베이션과 노멀 액티베이션으로 분류하여 계산을 달리 수행할 수 있다. To this end, the neural network acceleration device 10 can perform the calculation differently based on the quantization format of the inputted data, by classifying it into the abnormal value activation and the normal activation.

예를 들어, 뉴럴네트워크가속장치(10)는 버퍼로부터 획득되는 액티베이션의 비트를 기준으로 16비트 미만이면 노멀액티베이션으로 분류하고, 16비트이면 이상치액티베이션으로 분류할 수 있다. For example, the neural network accelerating apparatus 10 may classify as normal activation if the bit is less than 16 bits based on the bit of the activation obtained from the buffer, and classify it as abnormal value activation if the bit is 16 bits.

그리고 뉴럴네트워크가속장치(10)는 노멀액티베이션과 이상치액티베이션으로 분리하여 계산할 수 있다.Then, the neural network acceleration device 10 can be separately calculated by the normal activation and the abnormal activation.

이때, 뉴럴네트워크가속장치(10)는 데이터를 계산하는 계산그룹에 대해 스케줄링을 통해 계산그룹의 가동률을 높혀 성능향상을 시킬 수 있다. At this time, the neural network acceleration apparatus 10 can improve the performance by raising the operation rate of the calculation group through the scheduling for the calculation group for calculating the data.

도 6 은 계산그룹들을 스케줄링하는 것을 도시한 예시도이다. 뉴럴네트워크가속장치(10)는 계산그룹을 통해 1X1X16의 액티베이션을 획득하여 계산을 수행하고 출력으로 1X1X16 액티베이션을 생성한다. 뉴럴네트워크가속장치(10)는 0이 아닌 액티베이션만 계산을 수행하기에 0이 아닌 액티베이션의 개수에 따라 제 1 계산그룹(601)이 계산을 마치면, 새로운 1X1X16 액티베이션(602)을 제 1 계산그룹(603)에 할당하여 계산을 계속 수행하도록 한다. 6 is an exemplary diagram illustrating scheduling computation groups. The neural network accelerator 10 acquires 1X1X16 activation through a computation group to perform computation and generates 1X1X16 activation as an output. The neural network accelerator 10 sends a new 1X1X16 activation 602 to the first computation group 602 if the first computation group 601 completes calculations according to the number of non-zero activations to perform only non-zero computations 603) so as to continue the calculation.

하나의 실시예에 따라 노멀액티베이션이 입력되면, 뉴럴네트워크가속장치(10)는 노멀액티베이션과 웨이트를 버퍼에 저장하고, 노멀 계산그룹을 통해 계산할 수 있다. If normal activation is input according to one embodiment, the neural network accelerator 10 may store the normal activation and the weight in a buffer and calculate through the normal calculation group.

도 7 은 뉴럴네트워크가속장치(10)의 PE 클러스터의 내부동작을 보여주는 예시도이다. 이를 참조하면, 뉴럴네트워크가속장치(10)는 표형태로 구성되는 클러스터 웨이트 버퍼(701)에 각 행(row) 별로 16개의 4 비트 웨이트를 버퍼로부터 획득하여 저장할 수 있다. 그리고 뉴럴네트워크가속장치(10)는 클러스터 액티베이션 버퍼(702)에도 16개의 4 비트 액티베이션을 버퍼로부터 획득하여 저장할 수 있다. 7 is an exemplary diagram showing the internal operation of the PE cluster of the neural network accelerator 10. [ Referring to this, the neural network accelerator 10 can acquire and store 16 4-bit weights for each row from a buffer in a cluster weight buffer 701 configured in a tabular form. The neural network accelerator 10 may also acquire and store 16 4-bit activations from the buffer into the cluster activation buffer 702.

그리고 뉴럴네트워크가속장치(10)는 버퍼에 저장된 노멀액티베이션과 웨이트에 대해 콘볼루션 계산을 수행할 수 있다.The neural network acceleration device 10 may then perform convolution calculations on the normal activation and weight stored in the buffer.

예를 들어, 뉴럴네트워크가속장치(10)는 복수의 노멀 계산그룹 각각에서 노멀액티베이션인 4비트 액티베이션과 4비트 웨이트 간 콘볼루션 계산을 1 싸이클에 수행할 수 있다. For example, the neural network accelerator 10 may perform four cycles of 4-bit activation and 4-bit weight convolution computation, which are normally activated in each of the plurality of normal calculation groups, in one cycle.

이때, 4 비트 액티베이션과 콘볼루션 계산이 수행되는 웨이트가 8 비트인 이상치 웨이트인 경우, 뉴럴네트워크가속장치(10)는 이상치 웨이트의 상위 4 비트와 4비트 액티베이션 간 콘볼루션 계산을 수행하고, 이상치 웨이트이 하위 4 비트와 상기 4 비트 액티베이션 간 콘볼루션 계산을 수행한 후 계산된 결과를 합하여 최종 결과값을 획득할 수 있다. At this time, if the weight at which the 4-bit activation and the convolution calculation are performed is the odd value weight of 8 bits, the neural network acceleration device 10 performs the convolution calculation between the upper 4 bits and the 4-bit activation of the ideal value weight, The final result value can be obtained by adding the calculated result after performing the convolution calculation between the lower 4 bits and the 4-bit activation.

도 8 은 하나의 계산그룹에서의 동작을 도시한 예시도이다. 이를 참조하면, 뉴럴네트워크가속장치(10)는 획득된 16 개의 노멀액티베이션과 16개의 웨이트를 계산그룹내의 노멀액티베이션을 계산하는 16개의 노멀 계산유닛(802)에 각각 제공할 수 있고, 각 노멀 계산유닛을 통해 획득된 노멀액티베이션과 노멀웨이트 간의 콘볼루션 계산을 수행할 수 있다. FIG. 8 is an exemplary diagram showing operations in one calculation group. FIG. With reference to this, the neural network accelerator 10 can provide 16 normal activations and 16 weights obtained to each of the 16 normal calculation units 802 for calculating the normal activation in the calculation group, Lt; RTI ID = 0.0 > normal-activation < / RTI >

이때, 16개의 웨이트 중 이상치 웨이트가 포함된 경우, 뉴럴네트워크가속장치(10)는 이상치웨이트의 상위 4비트를 계산그룹내의 이상치 계산유닛(801)에 할당하여 노멀액티베이션과 콘볼루션 계산을 수행하고, 이상치웨이트의 하위 4 비트를 노멀 계산유닛(802)에 할당하여 노멀액티베이션과 콘볼루션 계산을 수행할 수 있다. 이후, 뉴럴네트워크가속장치(10)는 이상치 계산유닛에서 계산된 결과와 노멀 계산유닛에서 계산된 결과를 합하여 2 싸이클에 최종 결과를 계산할 수 있다. At this time, when the outlier weight among the 16 weights is included, the neural network accelerator 10 allocates the upper 4 bits of the outlier weight to the outlier calculation unit 801 in the calculation group to perform the normal activation and the convolution calculation, The lower 4 bits of the ideal value weight can be assigned to the normal calculation unit 802 to perform the normal activation and the convolution calculation. Thereafter, the neural network acceleration apparatus 10 can calculate the final result in two cycles by summing the result calculated in the outlier calculation unit and the result calculated in the normal calculation unit.

그리고 뉴럴네트워크가속장치(10)는 계산된 결과를 클러스터 출력 트라이버퍼(cluster output tri-buffer)에 저장할 수 있다. The neural network accelerator 10 may then store the computed results in a cluster output tri-buffer.

다른 실시예에 따라, 이상치액티베이션이 입력되면, 뉴럴네트워크가속장치(10)는 이상치액티베이션과 웨이트를 이상치 계산그룹을 통해 계산할 수 있다. According to another embodiment, when an anomaly activation is input, the neural network accelerator 10 may calculate an outlier activation and a weight through an outlier calculation group.

예를 들어, 뉴럴네트워크가속장치(10)는 이상치액티베이션인 16 비트 액티베이션과 웨이트를 풀 프리시젼(Full-precision) 계산유닛을 이용하여 계산할 수 있다. For example, the neural network accelerator 10 may calculate the 16-bit activation and the weight, which are the outlier activation, using a full-precision calculation unit.

도 9 는 이상치액티베이션을 계산하는 계산그룹을 도시한 예시도이다. 이를 참조하면, 뉴럴네트워크가속장치(10)는 PE swarm버퍼에 저장된 이상치 액티베이션을 이상치 액티베이션 FIFO에 표형태(901)로 저장할 수 있고, 클러스터 웨이트 버퍼로부터 입력된 웨이트를 이용하여 16개 풀 프리시젼 계산유닛을 이용하여 콘볼루션 계산을 수행할 수 있다. Fig. 9 is an exemplary diagram showing a calculation group for calculating an outlier activation. Fig. Referring to this, the neural network accelerator 10 may store the outlier activation stored in the PE swarm buffer as a tabular form 901 in the anomalous activation FIFO, and may use the weight input from the cluster weight buffer to generate 16 full precision computation units Can be used to perform convolution calculations.

이때, 이상치웨이트가 입력되면, 노멀액티베이션과 이상치웨이트간의 계산과 동일하게 이상치웨이트의 상위 4비트와 이상치액티베이션을 이상치 풀 프리시젼 계산유닛을 통한 계산결과, 이상치웨이트 하위 4 비트와 이상치액티베이션을 노멀 풀 프리시젼 계산유닛을 통해 계산결과를 합하여 최종 결과를 계산할 수 있다.At this time, when the ideal value weight is input, the upper 4 bits of the ideal value weight and the abnormal value activation are calculated by the calculation result of the abnormal value full precision calculation unit, the lower 4 bits of the ideal value weight and the abnormal value activation are set as the normal full precision The final result can be calculated by summing the calculation results through the calculation unit.

그리고 뉴럴네트워크가속장치(10)는 계산될 결과를 클러스터 출력 트라이버퍼(cluster output tri-buffer)에 저장할 수 있다. The neural network accelerator 10 may then store the result to be computed in a cluster output tri-buffer.

이후, 뉴럴네트워크가속장치(10)는 노멀 계산그룹과 이상치 계산그룹에 의해 각각 계산된 결과를 기초로 최종 결과를 계산할 수 있다. Thereafter, the neural network accelerator 10 may calculate the final result based on the results calculated by the normal calculation group and the outlier calculation group, respectively.

예를 들어, 뉴럴네트워크가속장치(10)는 클러스터 출력 트라이버퍼(cluster output tri-buffer)에 저장된 결과를 합하여 최종결과를 획득할 수 있다. For example, the neural network accelerator 10 may sum the results stored in the cluster output tri-buffer to obtain the final result.

도 10 은 클러스터 출력 트라이버퍼(cluster output tri-buffer)에 데이터를 저장하여 최종 결과를 계산하는 과정을 도시한 예시도이다. 이를 참조하면, 뉴럴네트워크가속장치(10)는 노멀 계산 그룹에서 2 개의 버퍼에 접근해서 기존 저장된 제 1 결과(1001)에 새로운 제 2 결과(1002)를 더하여 저장할 수 있고, 이상치 계산 그룹의 계산 결과를 제 2 결과(1002)에 더하여 최종결과(1003)를 계산할 수 있다. 10 is an exemplary diagram illustrating a process of storing data in a cluster output tri-buffer to calculate a final result. Referring to this, the neural network accelerator 10 can access two buffers in a normal calculation group and store a result of adding a new second result 1002 to an existing stored first result 1001, May be added to the second result 1002 to calculate the final result 1003.

이와 같이 이상치 데이터를 고려하여 뉴럴네트워크 상의 데이터에 대한 양자화 방법을 달리 수행하고, 양자화가 수행된 데이터를 데이터의 비트 수에 따라 분리하여 계산함으로써 적은 비트로도 출력결과의 품질을 유지하면서 계산량을 줄일 수 있어 메모리에 쓰여지는 데이터량을 줄일 수 있다.In this way, the quantization method for the data on the neural network is performed in consideration of the outlier data, and the computed amount is reduced while maintaining the quality of the output result with a small number of bits by separately calculating the quantized data according to the number of bits of data The amount of data written to memory can be reduced.

도 11 내지 도 12 는 뉴럴네트워크가속방법을 적용한 실험 결과이다. 도 11을 참조하면, 딥뉴럴네트워크의 대표적인 예인 VGG-16에 본 발명을 적용하고 기존 하드웨어 가속기들과 비교한 결과를 보인다. 그림에서 보는 바와 같이 기존 기술인 Eyeriss와 ZeNA의 8비트 버전 대비 본 발명의 4비트 가속기(8비트 이상치, OLAccel8)가 30% 이상 빠른 수행과 2배 이상의 에너지 감소를 가능하게 한다.11 to 12 are experimental results using a neural network acceleration method. Referring to FIG. 11, the present invention is applied to VGG-16, which is a representative example of a deep neural network, and the results are compared with existing hardware accelerators. As shown in the figure, the 4-bit accelerator (8-bit outlier, OLAccel8) of the present invention is faster than the 8-bit version of Eyeriss and ZeNA by more than 30% and can reduce energy more than 2 times.

그리고 도 12 를 참조하면, ImageNet 처리를 위한 ResNet-18에 대한 기존 하드웨어 가속기와의 비교 결과를 보여준다. 이 경우 ZeNA 결과는 기존 논문에 없어서 Eyeriss만을 비교하였다. Eyeriss 8비트 대비 본 발명의 4비트 가속기(8비트 이상치, OLAccel8)가 4배 이상 성능과 40% 이상의 에너지 감소 결과를 얻었다. Referring to FIG. 12, there is shown a result of comparing ResNet-18 with an existing hardware accelerator for ImageNet processing. In this case, the ZeNA results were not found in the existing paper and only Eyersiss was compared. The 4 bit accelerator (8 bit outlier value, OLAccel8) of the present invention compared with the Eyeriss 8 bit has a performance four times or more and an energy reduction of 40 percent or more.

본 발명은 딥뉴럴네트워크에서 데이터 크기(비트수)를 줄이는 기술로 모든 뉴럴네트워크의 수행과 학습에 사용될 수 있다. 따라서, 딥러닝이 적용되는 모든 분야에 적용 가능한 기술이다.The present invention is a technique for reducing data size (number of bits) in a deep neural network and can be used for performance and learning of all neural networks. Therefore, it is applicable to all fields where deep running is applied.

이상의 실시예들에서 사용되는 '~부'라는 용어는 소프트웨어 또는 FPGA(field programmable gate array) 또는 ASIC 와 같은 하드웨어 구성요소를 의미하며, '~부'는 어떤 역할들을 수행한다. 그렇지만 '~부'는 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. '~부'는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다. 따라서, 일 예로서 '~부'는 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램특허 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들, 및 변수들을 포함한다.The term " part " used in the above embodiments means a hardware component such as a software or a field programmable gate array (FPGA) or an ASIC, and the 'part' performs certain roles. However, 'part' is not meant to be limited to software or hardware. &Quot; to " may be configured to reside on an addressable storage medium and may be configured to play one or more processors. Thus, by way of example, 'parts' may refer to components such as software components, object-oriented software components, class components and task components, and processes, functions, , Subroutines, segments of program patent code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.

구성요소들과 '~부'들 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 '~부'들로 결합되거나 추가적인 구성요소들과 '~부'들로부터 분리될 수 있다.The functions provided within the components and components may be combined with a smaller number of components and components or separated from additional components and components.

뿐만 아니라, 구성요소들 및 '~부'들은 디바이스 또는 보안 멀티미디어카드 내의 하나 또는 그 이상의 CPU 들을 재생시키도록 구현될 수도 있다.In addition, the components and components may be implemented to play back one or more CPUs in a device or a secure multimedia card.

도 2 를 통해 설명된 실시예에 따른 뉴럴네트워크가속방법은 컴퓨터에 의해 실행 가능한 명령어 및 데이터를 저장하는, 컴퓨터로 판독 가능한 매체의 형태로도 구현될 수 있다. 이때, 명령어 및 데이터는 프로그램 코드의 형태로 저장될 수 있으며, 프로세서에 의해 실행되었을 때, 소정의 프로그램 모듈을 생성하여 소정의 동작을 수행할 수 있다. 또한, 컴퓨터로 판독 가능한 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터로 판독 가능한 매체는 컴퓨터 기록 매체일 수 있는데, 컴퓨터 기록 매체는 컴퓨터 판독 가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함할 수 있다.예를 들어, 컴퓨터 기록 매체는 HDD 및 SSD 등과 같은 마그네틱 저장 매체, CD, DVD 및 블루레이 디스크 등과 같은 광학적 기록 매체, 또는 네트워크를 통해 접근 가능한 서버에 포함되는 메모리일 수 있다. The neural network acceleration method according to the embodiment described with reference to FIG. 2 may also be implemented in the form of a computer-readable medium for storing instructions and data executable by a computer. At this time, the command and data may be stored in the form of program code, and when executed by the processor, a predetermined program module may be generated to perform a predetermined operation. In addition, the computer-readable medium can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. The computer-readable medium can also be a computer storage medium, which can be volatile and non-volatile, implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, For example, computer recording media may include magnetic storage media such as HDDs and SSDs, optical recording media such as CD, DVD and Blu-ray discs, or other types of media accessible via a network. May be the memory included in the server.

또한 도 2 를 통해 설명된 실시예에 따른 뉴럴네트워크가속방법은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 컴퓨터 프로그램(또는 컴퓨터 프로그램 제품)으로 구현될 수도 있다. 컴퓨터 프로그램은 프로세서에 의해 처리되는 프로그래밍 가능한 기계 명령어를 포함하고, 고레벨 프로그래밍 언어(High-level Programming Language), 객체 지향 프로그래밍 언어(Object-oriented Programming Language), 어셈블리 언어 또는 기계 언어 등으로 구현될 수 있다. 또한 컴퓨터 프로그램은 유형의 컴퓨터 판독가능 기록매체(예를 들어, 메모리, 하드디스크, 자기/광학 매체 또는 SSD(Solid-State Drive) 등)에 기록될 수 있다. The neural network acceleration method according to the embodiment described with reference to FIG. 2 may also be implemented as a computer program (or a computer program product) including instructions executable by a computer. A computer program includes programmable machine instructions that are processed by a processor and can be implemented in a high-level programming language, an object-oriented programming language, an assembly language, or a machine language . The computer program may also be recorded on a computer readable recording medium of a type (e.g., memory, hard disk, magnetic / optical medium or solid-state drive).

따라서 도 2 를 통해 설명된 실시예에 따른 뉴럴네트워크가속방법은 상술한 바와 같은 컴퓨터 프로그램이 컴퓨팅 장치에 의해 실행됨으로써 구현될 수 있다. 컴퓨팅 장치는 프로세서와, 메모리와, 저장 장치와, 메모리 및 고속 확장포트에 접속하고 있는 고속 인터페이스와, 저속 버스와 저장 장치에 접속하고 있는 저속 인터페이스 중 적어도 일부를 포함할 수 있다. 이러한 성분들 각각은 다양한 버스를 이용하여 서로 접속되어 있으며, 공통 머더보드에 탑재되거나 다른 적절한 방식으로 장착될 수 있다. Therefore, the neural network acceleration method according to the embodiment described with reference to FIG. 2 can be implemented by a computer program as described above being executed by the computing device. The computing device may include a processor, a memory, a storage device, a high-speed interface connected to the memory and a high-speed expansion port, and a low-speed interface connected to the low-speed bus and the storage device. Each of these components is connected to each other using a variety of buses and can be mounted on a common motherboard or mounted in any other suitable manner.

여기서 프로세서는 컴퓨팅 장치 내에서 명령어를 처리할 수 있는데, 이런 명령어로는, 예컨대 고속 인터페이스에 접속된 디스플레이처럼 외부 입력, 출력 장치상에 GUI(Graphic User Interface)를 제공하기 위한 그래픽 정보를 표시하기 위해 메모리나 저장 장치에 저장된 명령어를 들 수 있다. 다른 실시예로서, 다수의 프로세서 및(또는) 다수의 버스가 적절히 다수의 메모리 및 메모리 형태와 함께 이용될 수 있다. 또한 프로세서는 독립적인 다수의 아날로그 및(또는) 디지털 프로세서를 포함하는 칩들이 이루는 칩셋으로 구현될 수 있다. Where the processor may process instructions within the computing device, such as to display graphical information to provide a graphical user interface (GUI) on an external input, output device, such as a display connected to a high speed interface And commands stored in memory or storage devices. As another example, multiple processors and / or multiple busses may be used with multiple memory and memory types as appropriate. The processor may also be implemented as a chipset comprised of chips comprising multiple independent analog and / or digital processors.

또한 메모리는 컴퓨팅 장치 내에서 정보를 저장한다. 일례로, 메모리는 휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 다른 예로, 메모리는 비휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 또한 메모리는 예컨대, 자기 혹은 광 디스크와 같이 다른 형태의 컴퓨터 판독 가능한 매체일 수도 있다. The memory also stores information within the computing device. In one example, the memory may comprise volatile memory units or a collection thereof. In another example, the memory may be comprised of non-volatile memory units or a collection thereof. The memory may also be another type of computer readable medium such as, for example, a magnetic or optical disk.

그리고 저장장치는 컴퓨팅 장치에게 대용량의 저장공간을 제공할 수 있다. 저장 장치는 컴퓨터 판독 가능한 매체이거나 이런 매체를 포함하는 구성일 수 있으며, 예를 들어 SAN(Storage Area Network) 내의 장치들이나 다른 구성도 포함할 수 있고, 플로피 디스크 장치, 하드 디스크 장치, 광 디스크 장치, 혹은 테이프 장치, 플래시 메모리, 그와 유사한 다른 반도체 메모리 장치 혹은 장치 어레이일 수 있다. And the storage device can provide a large amount of storage space to the computing device. The storage device may be a computer readable medium or a configuration including such a medium and may include, for example, devices in a SAN (Storage Area Network) or other configurations, and may be a floppy disk device, a hard disk device, Or a tape device, flash memory, or other similar semiconductor memory device or device array.

상술된 실시예들은 예시를 위한 것이며, 상술된 실시예들이 속하는 기술분야의 통상의 지식을 가진 자는 상술된 실시예들이 갖는 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 상술된 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.It will be apparent to those skilled in the art that the above-described embodiments are for illustrative purposes only and that those skilled in the art will readily understand that other embodiments can be readily modified without departing from the spirit or essential characteristics of the embodiments described above You will understand. It is therefore to be understood that the above-described embodiments are to be considered in all respects only as illustrative and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 명세서를 통해 보호 받고자 하는 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태를 포함하는 것으로 해석되어야 한다.It is to be understood that the scope of the present invention is defined by the appended claims rather than the foregoing description and should be construed as including all changes and modifications that come within the meaning and range of equivalency of the claims, .

10: 뉴럴네트워크가속장치
110: 입출력부
120: 제어부
130: 통신부
140: 메모리
10: Neural network accelerator
110: Input / output unit
120:
130:
140: Memory

Claims (14)

뉴럴네트워크 상의 데이터 처리를 가속화하는 장치에 있어서,
상기 뉴럴네트워크 상의 데이터의 특성에 기초하여 상기 데이터에 양자화를 수행하고, 양자화된 데이터의 표현형식에 따라 상기 데이터에 대한 계산을 분리하여 수행하는 제어부; 및
상기 양자화된 데이터를 저장하는 메모리를 포함하는, 뉴럴네트워크가속장치.
An apparatus for accelerating data processing on a neural network,
A controller for performing quantization on the data based on characteristics of data on the neural network and separately performing calculations on the data according to a representation format of the quantized data; And
And a memory for storing the quantized data.
제 1 항에 있어서,
상기 제어부는,
상기 뉴럴네트워크 상의 데이터의 분포에 기초하여 상기 데이터에 대해 적용할 양자화 방법을 결정하는, 뉴럴네트워크가속장치.
The method according to claim 1,
Wherein,
And determines a quantization method to apply to the data based on a distribution of data on the neural network.
제 2 항에 있어서,
상기 제어부는,
상기 데이터 및 상기 양자화된 데이터 간의 오차에 기초하여 상기 데이터에 대한 양자화 수준(level)을 결정하는, 뉴럴네트워크가속장치.
3. The method of claim 2,
Wherein,
And determines a quantization level for the data based on an error between the data and the quantized data.
제 2 항에 있어서,
상기 데이터는,
상기 데이터 값이 기 설정된 값을 초과하는 이상치데이터 및 상기 데이터 값이 기 설정된 값 이하인 노멀데이터로 구성되고,
상기 제어부는,
상기 이상치데이터 및 상기 노멀데이터 각각을 분리하여 계산을 수행하는, 뉴럴네트워크가속장치.
3. The method of claim 2,
The data includes:
The abnormal value data having the data value exceeding a predetermined value and the normal data having the data value equal to or less than a predetermined value,
Wherein,
And separates each of the abnormal value data and the normal data to perform the calculation.
제 4 항에 있어서,
상기 제어부는,
상기 뉴럴네트워크를 구성하는 노드에서 출력되는 데이터인 액티베이션(activation) 중 제로-액티베이션을 제외한 액티베이션에 대한 계산을 스케줄링을 하는, 뉴럴네트워크가속장치.
5. The method of claim 4,
Wherein,
Wherein activation is scheduling a calculation for activation other than zero-activation among activation, which is data output from a node constituting the neural network.
제 4 항에 있어서,
상기 제어부는,
상기 뉴럴네트워크를 구성하는 노드에 상기 액티베이션의 반영강도를 나타내는 데이터인 웨이트(weight) 중 이상치웨이트(outlier weight)를 기 설정된 수의 상위 비트와 나머지 비트로 분리하여 계산을 수행하는, 뉴럴네트워크가속장치.
5. The method of claim 4,
Wherein,
Wherein the calculation is performed by dividing the outlier weight among the weights, which is data representing the reflection strength of the activation, into a predetermined number of upper bits and remaining bits, to a node constituting the neural network.
뉴럴네트워크가속장치가 뉴럴네트워크 상의 데이터 처리를 가속화하는 방법에 있어서,
상기 뉴럴네트워크 상의 데이터의 특성에 기초하여 상기 데이터에 양자화를 수행하는 단계;
상기 양자화된 데이터를 저장하는 단계; 및
상기 양자화된 데이터의 표현형식에 따라 상기 데이터에 대한 계산을 분리하여 수행하는 단계를 포함하는, 뉴럴네트워크가속방법.
A method for accelerating data processing on a neural network,
Performing quantization on the data based on characteristics of the data on the neural network;
Storing the quantized data; And
And separately performing calculations on the data according to a representation format of the quantized data.
제 7 항에 있어서,
상기 데이터에 양자화를 수행하는 단계는,
상기 뉴럴네트워크 상의 데이터의 분포에 기초하여 상기 데이터에 대해 적용할 양자화 방법을 결정하는 단계를 포함하는, 뉴럴네트워크가속방법.
8. The method of claim 7,
Wherein the step of performing quantization on the data comprises:
Determining a quantization method to apply to the data based on a distribution of data on the neural network.
제 8 항에 있어서,
상기 양자화 방법을 결정하는 단계는,
상기 데이터 및 상기 양자화된 데이터 간의 오차에 기초하여 상기 데이터에 대한 양자화 수준(level)을 결정하는 단계를 포함하는, 뉴럴네트워크가속방법.
9. The method of claim 8,
Wherein the step of determining the quantization method comprises:
Determining a quantization level for the data based on an error between the data and the quantized data.
제 8 항에 있어서,
상기 데이터는,
상기 데이터 값이 기 설정된 값을 초과하는 이상치데이터 및 상기 데이터 값이 기 설정된 값 이하인 노멀데이터로 구성되고,
상기 데이터에 대한 계산을 분리하여 수행하는 단계는,
상기 이상치데이터 및 상기 노멀데이터 각각을 분리하여 계산을 수행하는 단계를 포함하는, 뉴럴네트워크가속방법.
9. The method of claim 8,
The data includes:
The abnormal value data having the data value exceeding a predetermined value and the normal data having the data value equal to or less than a predetermined value,
Separately performing the calculations on the data comprises:
And separating each of the outlier data and the normal data to perform a calculation.
제 10 항에 있어서,
상기 이상치데이터 및 상기 노멀데이터 각각을 분리하여 계산을 수행하는 단계는,
상기 뉴럴네트워크를 구성하는 노드에서 출력되는 데이터인 액티베이션(activation) 중 제로-액티베이션을 제외한 액티베이션에 대한 계산을 스케줄링을 하는 단계를 포함하는, 뉴럴네트워크가속방법.
11. The method of claim 10,
Wherein the step of separating the abnormal data and the normal data to perform the calculation comprises:
And scheduling a calculation for activation other than zero-activation among activation, which is data output from a node constituting the neural network.
제 10 항에 있어서,
상기 뉴럴네트워크가속방법은,
상기 뉴럴네트워크를 구성하는 노드에 상기 액티베이션의 반영강도를 나타내는 데이터인 웨이트(weight) 중 이상치웨이트(outlier weight)를 기 설정된 수의 상위 비트와 나머지 비트로 분리하여 계산을 수행하는 단계를 더 포함하는, 뉴럴네트워크가속방법.
11. The method of claim 10,
The neural network acceleration method includes:
Further comprising the step of dividing the outlier weight among the weights, which is data representing the reflection intensity of the activation, into a predetermined number of upper bits and remaining bits, Neural network acceleration method.
제 7 항에 기재된 방법을 수행하는 프로그램이 기록된 컴퓨터 판독 가능한 기록 매체.A computer-readable recording medium on which a program for carrying out the method according to claim 7 is recorded. 뉴럴네트워크가속장치에 의해 수행되며, 제 7 항에 기재된 방법을 수행하기 위해 매체에 저장된 컴퓨터 프로그램.
A computer program stored in a medium for performing the method of claim 7 performed by a neural network acceleration device.
KR1020180168495A 2017-12-22 2018-12-24 Method and apparatus for outlier-aware accelerating neural networks KR102415214B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20170178747 2017-12-22
KR1020170178747 2017-12-22

Publications (2)

Publication Number Publication Date
KR20190076916A true KR20190076916A (en) 2019-07-02
KR102415214B1 KR102415214B1 (en) 2022-06-30

Family

ID=67258656

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180168495A KR102415214B1 (en) 2017-12-22 2018-12-24 Method and apparatus for outlier-aware accelerating neural networks

Country Status (1)

Country Link
KR (1) KR102415214B1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210012083A (en) * 2019-07-23 2021-02-03 포항공과대학교 산학협력단 Neural network system and operating method of the same
KR20210126390A (en) 2020-04-10 2021-10-20 한화시스템 주식회사 System and method for accelerating deep neural network training using adaptive batch selection
KR20210130865A (en) * 2020-04-22 2021-11-02 한국전력공사 Hybrid deep learning scheduling method for accelerated processing of multi-ami data stream in edge computing
WO2022145550A1 (en) * 2020-12-31 2022-07-07 서울대학교산학렵력단 Algorithm and method for dynamically varying quantization precision of deep learning network
WO2023080292A1 (en) * 2021-11-08 2023-05-11 한국전자기술연구원 Apparatus and method for generating adaptive parameter for deep learning acceleration device
WO2023128024A1 (en) * 2021-12-30 2023-07-06 한국전자기술연구원 Method and system for quantizing deep-learning network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009169439A (en) * 2007-02-21 2009-07-30 Sony Corp Signal separating device, signal separating method, and computer program
JP2011022156A (en) * 2008-04-11 2011-02-03 Mitsubishi Electric Corp Apparatus state detector, apparatus state detection server, apparatus state detection system and apparatus state database maintenance server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009169439A (en) * 2007-02-21 2009-07-30 Sony Corp Signal separating device, signal separating method, and computer program
JP2011022156A (en) * 2008-04-11 2011-02-03 Mitsubishi Electric Corp Apparatus state detector, apparatus state detection server, apparatus state detection system and apparatus state database maintenance server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Han, Song, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149v1. arXiv. 2015.10.* *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210012083A (en) * 2019-07-23 2021-02-03 포항공과대학교 산학협력단 Neural network system and operating method of the same
KR20210126390A (en) 2020-04-10 2021-10-20 한화시스템 주식회사 System and method for accelerating deep neural network training using adaptive batch selection
KR20210130865A (en) * 2020-04-22 2021-11-02 한국전력공사 Hybrid deep learning scheduling method for accelerated processing of multi-ami data stream in edge computing
WO2022145550A1 (en) * 2020-12-31 2022-07-07 서울대학교산학렵력단 Algorithm and method for dynamically varying quantization precision of deep learning network
WO2023080292A1 (en) * 2021-11-08 2023-05-11 한국전자기술연구원 Apparatus and method for generating adaptive parameter for deep learning acceleration device
WO2023128024A1 (en) * 2021-12-30 2023-07-06 한국전자기술연구원 Method and system for quantizing deep-learning network

Also Published As

Publication number Publication date
KR102415214B1 (en) 2022-06-30

Similar Documents

Publication Publication Date Title
KR102415214B1 (en) Method and apparatus for outlier-aware accelerating neural networks
US11630984B2 (en) Method and apparatus for accelerating data processing in neural network
CN110520870B (en) Flexible hardware for high throughput vector dequantization with dynamic vector length and codebook size
US10140034B2 (en) Solid-state drive assignment based on solid-state drive write endurance
US20190171927A1 (en) Layer-level quantization in neural networks
US8843502B2 (en) Sorting a dataset of incrementally received data
JP2022501676A (en) Data processing methods, devices, computer devices, and storage media
US11049013B1 (en) Encoding of weight values stored on neural network inference circuit
US11275721B2 (en) Adaptive table placement in NUMA architectures
KR102034661B1 (en) Method and apparatus for data quantization for neural network
US11210586B1 (en) Weight value decoder of neural network inference circuit
US20170031822A1 (en) Control method and electronic device
CN113435682A (en) Gradient compression for distributed training
KR20200037602A (en) Apparatus and method for selecting artificaial neural network
CN104536902A (en) Performance optimization method for IO (Input/Output) subsystem by testing server
JP2017204281A (en) Storage system, apparatus and method for storage system
US20160210305A1 (en) Effective method to compress tabular data export files for data movement
KR20190013162A (en) Method for convolution operation redution and system for performing the same
US10394453B1 (en) Method and system for choosing an optimal compression algorithm considering resources
US10996739B2 (en) Reducing power consumption in a neural network environment using data management
CN114089921A (en) Power system data storage method and device, computer equipment and storage medium
US11463551B2 (en) Using a sharded distributed cache as a pipeline integration buffer
JP2023519665A (en) Modification of processing data streams to reduce power impact during parallel processing
US9372636B1 (en) Tiered-storage design
KR20200057832A (en) Method and apparatus for deciding ensemble weight about base meta learner

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant