WO2023085442A1 - 고정확도 딥러닝 연산 장치 - Google Patents

고정확도 딥러닝 연산 장치 Download PDF

Info

Publication number
WO2023085442A1
WO2023085442A1 PCT/KR2021/016178 KR2021016178W WO2023085442A1 WO 2023085442 A1 WO2023085442 A1 WO 2023085442A1 KR 2021016178 W KR2021016178 W KR 2021016178W WO 2023085442 A1 WO2023085442 A1 WO 2023085442A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
exponent
converter
buffer
adder tree
Prior art date
Application number
PCT/KR2021/016178
Other languages
English (en)
French (fr)
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 WO2023085442A1 publication Critical patent/WO2023085442A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • G06F5/015Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising having at least two separately controlled shifting levels, e.g. using shifting matrices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/02Comparing digital values
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/491Computations with decimal numbers radix 12 or 20.
    • G06F7/498Computations with decimal numbers radix 12 or 20. using counter-type accumulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • G06F7/501Half or full adders, i.e. basic adder cells for one denomination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/509Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination for multiple operands, e.g. digital integrators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • G06F7/53Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel
    • 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

Definitions

  • the present invention relates to a deep learning accelerator, and more particularly, to a method and hardware structure for lightening calculations in performing calculations for deep learning learning and inference.
  • the deep learning hardware accelerator aims to quickly perform deep learning operations by receiving input data (input feature map) and input convolution parameters (weight).
  • Adder Tree operation requires a lot of addition operations because it is necessary to repeat the addition of two input data hierarchically. Addition using hardware logic requires more resources than multiplication, especially when the data to be added have different exponents.
  • the present invention has been made to solve the above problems, and an object of the present invention is to provide a method for quickly performing an Adder Tree operation without a resource shortage problem in a deep-nulling accelerator of a device with limited resources.
  • an Adder Tree operation device includes a first register receiving first data; a second register receiving second data; a comparator that compares an exponent of the first data with an exponent of the second data; a switch for transferring one of the first data and the second data to the converter and the other to the buffer based on the comparison result of the comparator; A converter that converts the exponent of the transmitted data; a buffer that stores the transmitted data and outputs it as it is; and an adder for adding data output from the converter and data output from the buffer.
  • a switch can pass data with a large exponent to the converter and pass data with a small exponent to a buffer.
  • the converter can convert the exponent of transmitted data into an exponent of data having a small exponent.
  • the converter shifts the exponent bit of the transmitted data to convert it into an exponent of data having a small exponent.
  • the distribution of the maximum value and the minimum value may be within a certain range.
  • the adder may transfer the first data to the converter and transfer the second data to the buffer when the comparator determines that the exponent of the first data and the exponent of the second data are the same.
  • the converter may store the first data and output it as it is.
  • an Adder Tree operation method includes receiving first data and second data; Comparing the exponent of the first data with the exponent of the second data; converting one of the first data and the second data based on the comparison result; Adding the converted data and other data; includes.
  • the memory required for the operation is drastically reduced, thereby reducing the number of devices with limited resources. It enables trouble-free Adder Tree operation even in deep-nering accelerators.
  • FIG. 1 is a diagram showing a deep learning accelerator to which the present invention can be applied;
  • FIG. 2 is a block diagram showing the detailed structure of the operator shown in Figure 1;
  • FIG. 3 is a diagram illustrating a data representation
  • FIG. 4 is a diagram showing the detailed structure of the Adder Tree module of the calculator shown in FIG. 2, and
  • FIG. 5 is a diagram showing a detailed structure of the CHK/BS module shown in FIG. 4;
  • the illustrated deep learning accelerator includes a read direct memory access (RDMA) 110, an input buffer 120, an operator 130, an output buffer 140, and a write direct memory access (WDMA) 150. do.
  • RDMA read direct memory access
  • WDMA write direct memory access
  • the deep learning accelerator receives data from the external memory 10, performs deep learning calculations, and outputs and stores calculation results to the external memory 10.
  • Data received from the external memory 10 are IFmap (Input Feature map: feature data of an input image) and Weights (convolution parameters of a deep learning model), and the deep learning operation result output to the external memory 10 is OFmap ( output feature map).
  • IFmap Input Feature map: feature data of an input image
  • Weights convolution parameters of a deep learning model
  • the RDMA 110 reads the IFmap and weights stored in the external memory 10 and stores them in the input buffer 120, and the WDMA 150 reads the OFmap stored in the output buffer 140 and stores them in the external memory 10. Save.
  • FIG. 2 is a block diagram showing a detailed structure of the calculator 130 shown in FIG. 1 .
  • the operator 130 includes a convolution operation module 131, an Adder Tree module 132, a Batch Normalization module 133, an Add Bias module 134, and Activation required for deep learning operation. module 135 and Maxpool module 136.
  • the direction of reducing data transmission and reception with the external memory 10 can obtain the best effect, so data to which quantization is applied as much as possible is used with less performance degradation. If floating point operations are converted to fixed point operations by applying quantization, operations in multiplication/addition can be reduced.
  • IFmap and Weight require data input from the external memory 10, and in the case of OFmap, storage in the external memory 10 is required, but sufficient data
  • the input/output bandwidth for input/output is very important.
  • calculation is impossible even if the resource of the calculator 130 is sufficient, so that the rest time increases, and thus the calculation time compared to the calculation capability increases.
  • a hardware device that expresses and calculates data with a small number of bits is mainly used.
  • a fixed point including a common exponent for each channel/layer
  • the central controller manages the exponent for each channel or layer, and only simple fixed point multiplication operations are used in actual multiplication operations.
  • FIG. 4 is a diagram showing a detailed structure of the Adder Tree module 132 among components of the calculator 130 shown in FIG. 2 . As shown, the Adder Tree module 132 has to perform many addition operations.
  • the addition operation of data #0 and data #32 the addition operation of data #16 and data #48, the addition operation of data #8 and data #40, ..., the data #28 and The addition operation of data #60 is performed.
  • an addition operation of the result of the 1st addition operation and the result of the 2nd addition operation in layer 1 an addition operation between the result of the 3rd addition operation and the 4th addition operation result in layer 1, ..., Addition operation of the result of the 7th addition operation and the result of the 8th addition operation on layer 1, addition operation between the result of the 1st addition operation and the result of the 2nd addition operation on layer 2, the result of the 3rd addition operation on layer 2 and the 4th
  • An addition operation of the result of the addition operation and an addition operation of the result of the fifth addition operation and the result of the sixth addition operation in layer 2 are performed.
  • Each node of the Adder Tree module 132 further includes a CHK/BS module 210 in addition to the adder 220 so that an addition operation can be performed with a small amount of resources.
  • the CHK/BS module 210 verifies the exponent of the two data to be added, and then converts the exponent of the data with the larger exponent to the exponent of the smaller data, and applies it to the adder 220.
  • FIG. 5 is a diagram showing the detailed structure of the CHK/BS module 210. Since the CHK/BS module 210 provided in the Adder Tree module 132 can be equally implemented, FIG. 5 shows only the structure of one CHK/BS module 210.
  • the CHK/BS module 210 includes register A 211, register B 212, exponent comparator 213, switch 214, converter 215 and buffer 216. .
  • Register A 211 and register B 212 receive and store data A and data B, respectively.
  • the exponent comparator 213 compares the exponent of data A stored in register A 211 with the exponent of data B stored in register B 212.
  • the switch 214 transfers one of data A and data B to the converter 215 and the other to the buffer 216. Specifically, the switch 214 transfers data with a large exponent to the converter 215 and transfers data with a small exponent to the buffer 216.
  • the converter 215 converts the exponent and mantissa of data transmitted through the switch 214.
  • the converter 215 converts the exponent of transmitted data into the exponent of relative data having a smaller exponent. This shifts the exponent bit of data and can be converted into an exponent of data with a small exponent. For example, if the large exponent is "1110" and the small exponent is "1101", the second bit of "1110" is shifted to the right to convert to "1101".
  • the converter 215 converts the mantissa according to the exponent conversion, so that the data value does not change.
  • the buffer 216 stores the transmitted data and outputs it as it is.
  • the converted data output from the converter 215 and the unconverted data output from the buffer 216 perform an addition operation.
  • the switch 214 transfers data A to the converter 215 and transfers data B to the buffer 216 .
  • the converter 215 stores the data A without converting and outputs it as it is.
  • the training data of deep learning models tend to have similar distributions of maximum and minimum values. That is, it means that the difference between the data values is not large. Therefore, if the addition operation is performed while maintaining the common exponent point, the amount of operation for addition can be reduced, rather than performing the addition operation by extending the entire value of the common exponent.
  • the shiter register operation amount can be reduced by half.
  • the hardware size can be reduced. For all addition operations, the range in which exponents must be changed is wide, but in operations between similar data, the min/max variation is not statistically large, so the change logic can be designed with small hardware. The reduction in hardware size not only reduces the area of the chip, but also enables low-power operation, which is a great advantage in terms of price/performance.

Landscapes

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

Abstract

고정확도 딥러닝 연산 장치가 제공된다. 본 발명의 실시예에 따른 Adder Tree 연산 장치는, 제1 데이터를 입력받는 제1 레지스터, 제2 데이터를 입력받는 제2 레지스터, 제1 데이터의 exponent와 제2 데이터의 exponent를 비교하는 비교기, 비교기의 비교 결과를 기초로 제1 데이터와 제2 데이터 중 하나는 변환기로 전달하고 다른 하나는 버퍼로 전달하는 스위치, 전달되는 데이터의 exponent를 변환하는 변환기, 전달되는 데이터를 저장하였다가 그대로 출력하는 버퍼 및 변환기에서 출력되는 데이터와 버퍼에서 출력되는 데이터를 덧셈하는 덧셈기를 포함한다. 이에 의해, Adder Tree 연산에서 덧셈할 두 데이터의 exponent를 더 작은 exponent로 변환하여 덧셈함으로써, 연산에 필요한 메모리를 획기적으로 줄여, 리소스에 제한이 있는 디바이스의 딥너링 가속장치에서도 문제 없는 Adder Tree 연산을 가능하게 한다.

Description

고정확도 딥러닝 연산 장치
본 발명은 딥러닝 가속장치에 관한 것으로, 더욱 상세하게는 딥러닝 학습 및 추론을 위한 연산을 수행함에 있어 연산 경량화를 위한 방법 및 하드웨어 구조에 관한 것이다.
딥러닝 하드웨어 가속장치는 입력 데이터(input feature map), 입력 컨볼루션 파라미터(weight)를 입력받아 딥러닝 연산을 빠르게 수행하는 것을 목표로 하고 있다.
딥러닝 연산 중 Adder Tree 연산은 입력되는 두 데이터들을 덧셈하는 것을 계층적으로 반복해야 하므로 많은 덧셈 연산을 요하고 있다. 하드웨어 로직을 이용한 덧셈은 곱셈 보다 더 많은 리소스를 요구하고 있는데, 이는 덧셈할 데이터들의 exponent가 다른 경우에 더욱 그러하다.
메모리와 GPU가 충분한 서버의 경우에는 위 경우에도 아무런 문제가 되지 않는다. 하지만 모바일 디바이스와 같이 리소스에 제한이 있는 디바이스에 적용할 딥너링 가속장치의 경우에는 위 경우 연산이 불가능하거나 가능하더라도 많은 연산 시간과 전력을 요한다는 문제가 있다.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 리소스에 제한이 있는 디바이스의 딥너링 가속장치에서 Adder Tree 연산을 리소스 부족 문제 없이 빠르게 수행하는 방법을 제공함에 있다.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, Adder Tree 연산 장치는, 제1 데이터를 입력받는 제1 레지스터; 제2 데이터를 입력받는 제2 레지스터; 제1 데이터의 exponent와 제2 데이터의 exponent를 비교하는 비교기; 비교기의 비교 결과를 기초로, 제1 데이터와 제2 데이터 중 하나는 변환기로 전달하고, 다른 하나는 버퍼로 전달하는 스위치; 전달되는 데이터의 exponent를 변환하는 변환기; 전달되는 데이터를 저장하였다가 그대로 출력하는 버퍼; 및 변환기에서 출력되는 데이터와 버퍼에서 출력되는 데이터를 덧셈하는 덧셈기;를 포함한다.
스위치는, exponent가 큰 데이터를 변환기로 전달하고, exponent가 작은 데이터를 버퍼로 전달할 수 있다.
변환기는, 전달되는 데이터의 exponent를 exponent가 작은 데이터의 exponent로 변환할 수 있다.
변환기는, 전달되는 데이터의 exponent 비트를 시프트하여 exponent가 작은 데이터의 exponent로 변환할 수 있다.
제1 데이터와 제2 데이터가 포함된 데이터들은, 최대 값과 최소 값의 분포가 일정 범위 내일 수 있다.
덧셈기는, 비교기에서 제1 데이터의 exponent와 제2 데이터의 exponent가 동일한 것으로 판단되면, 제1 데이터를 변환기로 전달하고, 제2 데이터를 버퍼로 전달할 수 있다.
그리고, 변환기는, 비교기에서 제1 데이터의 exponent와 제2 데이터의 exponent가 동일한 것으로 판단되면, 제1 데이터를 저장하였다가 그대로 출력할 수 있다.
한편, 본 발명의 다른 실시예에 따른, Adder Tree 연산 방법은, 제1 데이터와 제2 데이터를 입력받는 단계; 제1 데이터의 exponent와 제2 데이터의 exponent를 비교하는 단계; 비교 결과를 기초로, 제1 데이터와 제2 데이터 중 하나를 변환하는 단계; 변환된 데이터와 다른 데이터를 덧셈하는 단계;를 포함한다.
이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, Adder Tree 연산에서 덧셈할 두 데이터의 exponent를 더 작은 exponent로 변환하여 덧셈함으로써, 연산에 필요한 메모리를 획기적으로 줄여, 리소스에 제한이 있는 디바이스의 딥너링 가속장치에서도 문제 없는 Adder Tree 연산을 가능하게 한다.
도 1은 본 발명이 적용 가능한 딥러닝 가속장치를 도시한 도면,
도 2은, 도 1에 도시된 연산기의 상세 구조를 도시한 블럭도,
도 3은 데이터 표현형을 예시한 도면,
도 4는, 도 2에 도시된 연산기의 Adder Tree 모듈의 상세 구조를 도시한 도면, 그리고,
도 5는, 도 4에 도시된 CHK/BS 모듈의 상세 구조를 도시한 도면이다.
이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.
도 1은 본 발명이 적용 가능한 딥러닝 가속장치를 도시한 도면이다. 도시된 딥러닝 가속장치는, RDMA(Read Direct Memory Access)(110), 입력 버퍼(120), 연산기(130), 출력 버퍼(140), WDMA(Write Direct Memory Access)(150)를 포함하여 구성된다.
딥러닝 가속장치는 외부 메모리(10)로부터 데이터를 입력받아 딥러닝 연산을 수행하고, 연산 결과를 외부 메모리(10)로 출력하여 저장한다.
외부 메모리(10)로부터 입력받는 데이터는 IFmap(Input Feature map : 입력 영상의 특징 데이터)와 Weight(딥러닝 모델의 컨볼루션 파라미터)이고, 외부 메모리(10)로 출력하는 딥러닝 연산 결과는 OFmap(Outut Feature map)이다.
따라서 RDMA(110)는 외부 메모리(10)에 저장된 IFmap과 Weight를 읽어들여 입력 버퍼(120)에 저장하고, WDMA(150)는 출력 버퍼(140)에 저장된 OFmap을 읽어들여 외부 메모리(10)에 저장한다.
연산기(130)는 입력 버퍼(120)에 저장된 데이터로 딥러닝 연산을 수행한다. 도 2은, 도 1에 도시된 연산기(130)의 상세 구조를 도시한 블럭도이다.
도시된 바와 같이, 연산기(130)는 딥러닝 연산을 위해 필요한 컨볼루션 연산 모듈(131), Adder Tree 모듈(132), 배치 정규화(Batch Normalization) 모듈(133), Add Bias 모듈(134), Activation 모듈(135) 및 Maxpool 모듈(136)을 포함한다.
저전력의 동작을 위하여 외부 메모리(10)와의 데이터 송수신을 줄여 주는 방향이 최고의 효과를 얻을 수 있어, 성능 열화가 적은 선에서 양자화(Quantization)를 최대한 많이 적용된 데이터를 이용한다. 양자화가 적용되어 Floating point 연산이 Fixed point 연산으로 변환되면 곱셈/덧셈에서의 연산이 줄어들 수 있다.
한편, 위에서 설명한 바와 같이 다수의 연산을 수행하는 구조에서는 IFmap, Weight가 외부 메모리(10)로부터의 데이터 입력이 필요로 하며, OFmap의 경우에는 외부 메모리(10)로의 저장을 필요로 하는데, 충분한 데이터의 입출력을 위한 입출력 Bandwidth가 매우 중요하다. 데이터가 부족할 경우 연산기(130)의 리소스가 충분하더라도 연산이 불가능하여 쉬는 시간이 많아져 연산 능력 대비 연산 시간이 늘어나게 된다.
이를 해결하기 위해, 대부분 적은 비트수로 데이터를 표현하여 연산하는 하드웨어 장치를 주로 이용하게 된다. 구체적으로, 도 3에 도시된 바와 같이 Fixed point(채널별/레이어별 common exponent 포함)를 사용하되, 채널 혹은 레이어 단위로 exponent를 중앙 제어기에서 관장하여, 실제 곱셈 연산에서는 단순 Fixed point 곱셈 연산만을 이용하게 처리하게 한다.
하지만 덧셈 연산에서는 두 개의 다른 exponent를 동일하게 맞춰서 연산해야 하므로, 연산기 자체의 비트수가 exponent가 나타내닌 비트까지 표현할 수 있어야 하기 때문에, 덧셈 하드웨어 크기가 상당히 커지게 된다. 아울러 비트를 맞추기 위해서는 시프트 연산을 이용하여 비트 extention을 수행해야 하는데 이를 위한 하드웨어 크기도 상당히 커지게 된다.
도 4는, 도 2에 도시된 연산기(130)의 구성들 중 Adder Tree 모듈(132)의 상세 구조를 도시한 도면이다. 도시된 바와 같이, Adder Tree 모듈(132)은 많은 덧셈 연산을 수행하여야 한다.
구체적으로, Adder Tree의 레이어 1에서는 데이터 #0과 데이터 #32의 덧셈 연산, 데이터 #16과 데이터 #48의 덧셈 연산, 데이터 #8과 데이터 #40의 덧셈 연산, ..., 데이터 #28과 데이터 #60의 덧셈 연산이 수행된다.
그리고, Adder Tree의 레이어 2에서는 레이어 1에서의 1번째 덧셈 연산 결과와 2번째 덧셈 연산 결과의 덧셈 연산, 레이어 1에서의 3번째 덧셈 연산 결과와 4번째 덧셈 연산 결과의 덧셈 연산, ..., 레이어 1에서의 7번째 덧셈 연산 결과와 8번째 덧셈 연산 결과의 덧셈 연산, 레이어 2에서의 1번째 덧셈 연산 결과와 2번째 덧셈 연산 결과의 덧셈 연산, 레이어 2에서의 3번째 덧셈 연산 결과와 4번째 덧셈 연산 결과의 덧셈 연산, 레이어 2에서의 5번째 덧셈 연산 결과와 6번째 덧셈 연산 결과의 덧셈 연산이 수행된다.
적은 리소스로 덧셈 연산이 가능하도록 Adder Tree 모듈(132)의 각 노드들에는 뎃셈기(220)외에 CHK/BS 모듈(210)을 더 포함한다.
CHK/BS 모듈(210)은 뎃셈 연산할 두 데이터들의 exponent를 확인한 후 exponent가 큰 데이터의 exponent를 작은 데이터의 exponent로 변환하여 뎃셈기(220)에 인가한다.
도 5는 CHK/BS 모듈(210)의 상세 구조를 도시한 도면이다. Adder Tree 모듈(132)에 구비되는 CHK/BS 모듈(210)은 동일하게 구현 가능하므로, 도 5에는 하나의 CHK/BS 모듈(210)에 대한 구조만을 도시하였다.
CHK/BS 모듈(210)는 도시된 바와 같이, 레지스터 A(211), 레지스터 B(212), exponent 비교기(213), 스위치(214), 변환기(215) 및 버퍼(216)를 포함하여 구성된다.
레지스터 A(211)와 레지스터 B(212)는 데이터 A와 데이터 B를 각각 입력받아 저장한다. exponent 비교기(213)는 레지스터 A(211)에 저장된 데이터 A의 exponent와 레지스터 B(212)에 저장된 데이터 B의 exponent를 비교한다.
exponent 비교기(213)의 비교 결과를 기초로, 스위치(214)는 데이터 A와 데이터 B 중 하나는 변환기(215)로 전달하고, 다른 하나는 버퍼(216)로 전달한다. 구체적으로, 스위치(214)는 exponent가 큰 데이터를 변환기(215)로 전달하고, exponent가 작은 데이터를 버퍼(216)로 전달하는 것
만약, 데이터 A의 exponent가 더 크다면 데이터 A는 변환기(215)로 전달되고, 데이터 B는 버퍼(216)로 전달된다. 반면, 데이터 B의 exponent가 더 크다면 데이터 B는 변환기(215)로 전달되고, 데이터 A가 버퍼(216)로 전달된다.
변환기(215)는 스위치(214)를 통해 전달되는 데이터의 exponent와 mantissa를 변환한다.
구체적으로, 변환기(215)는 전달되는 데이터의 exponent를 exponent가 작은 상대 데이터의 exponent로 변환한다. 이는, 데이터의 exponent 비트를 시프트하여 exponent가 작은 데이터의 exponent로 변환할 수 있다. 예를 들어, 큰 exponent가 "1110"이고 작은 exponent가 "1101"이면, "1110"의 2번째 비트를 우측으로 시프트하여 "1101"로 변환하는 것이다.
다음 변환기(215)는 exponent의 변환에 따른 mantissa를 변환을 수행하여, 데이터 값이 변화가 없도록 한다.
버퍼(216)는 전달되는 데이터를 저장하였다가 그대로 출력한다.
이에 의해, 덧셈기(220)에서는 변환기(215)에서 출력되는 변환된 데이터와 버퍼(216)에서 출력되는 변환되지 않은 데이터가 덧셈 연산된다.
한편, 데이터 A의 exponent와 데이터 B의 exponent가 동일한 것으로 판단되면, 스위치(214)는 데이터 A를 변환기(215)로 전달하고, 데이터 B를 버퍼(216)로 전달한다. 이 경우, 변환기(215)는 데이터 A를 변환하지 않고 저장하였다가 그대로 출력한다.
통상적으로 딥러닝 모델의 학습 데이터들은 최대 값과 최소 값의 분포가 유사한 경향을 보인다. 즉, 데이터 값들의 차이가 크지 않음을 의미한다. 따라서, common exponent의 값을 전체를 확장하여 덧셈 연산을 수행하는 것이 아니라 common exponent 포인트를 유지한 채 덧셈을 수행하면 덧셈을 위한 연산량을 줄일 수 있다.
또한, Adder tree에서 두 개의 데이터 모두 exponent를 변경하지 않고 작은 exponent를 찾고 해당 값에 하나의 데이터를 맞춰서 덧셈을 진행하면, shiter register 연산량을 기존보다 절반으로 줄일 수 있다. 아울러 연산을 위한 공간을 덜 차지하게 되어 하드웨어 크기를 감소시킬 수 있다. 모든 덧셈 연산을 위해서는 exponent를 변경해야 하는 range가 넓은데 반하여, 유사한 데이터들 간의 연산에서는 통계적으로 min/max variation이 크지 않아 변경 로직도 작은 하드웨어로 설계가 가능하다. 하드웨어 크기의 감소는 칩의 면적이 줄어들 뿐만 아니라 저전력 동작이 가능하여, 가격/성능 면에서도 큰 이점이 있다.
지금까지, 리소스에 제한이 있는 디바이스의 딥너링 가속장치에서 Adder Tree 연산을 문제 없이 빠르게 수행하는 방법에 대해 바람직한 실시예를 들어 상세히 설명하였다.
또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.

Claims (8)

  1. 제1 데이터를 입력받는 제1 레지스터;
    제2 데이터를 입력받는 제2 레지스터;
    제1 데이터의 exponent와 제2 데이터의 exponent를 비교하는 비교기;
    비교기의 비교 결과를 기초로, 제1 데이터와 제2 데이터 중 하나는 변환기로 전달하고, 다른 하나는 버퍼로 전달하는 스위치;
    전달되는 데이터의 exponent를 변환하는 변환기;
    전달되는 데이터를 저장하였다가 그대로 출력하는 버퍼; 및
    변환기에서 출력되는 데이터와 버퍼에서 출력되는 데이터를 덧셈하는 덧셈기;를 포함하는 것을 특징으로 하는 Adder Tree 연산 장치.
  2. 청구항 1에 있어서,
    스위치는,
    exponent가 큰 데이터를 변환기로 전달하고, exponent가 작은 데이터를 버퍼로 전달하는 것을 특징으로 하는 Adder Tree 연산 장치.
  3. 청구항 2에 있어서,
    변환기는,
    전달되는 데이터의 exponent를 exponent가 작은 데이터의 exponent로 변환하는 것을 특징으로 하는 Adder Tree 연산 장치.
  4. 청구항 3에 있어서,
    변환기는,
    전달되는 데이터의 exponent 비트를 시프트하여 exponent가 작은 데이터의 exponent로 변환하는 것을 특징으로 하는 Adder Tree 연산 장치.
  5. 청구항 1에 있어서,
    제1 데이터와 제2 데이터가 포함된 데이터들은,
    최대 값과 최소 값의 분포가 일정 범위 내인 것을 특징으로 하는 Adder Tree 연산 장치.
  6. 청구항 1에 있어서,
    덧셈기는,
    비교기에서 제1 데이터의 exponent와 제2 데이터의 exponent가 동일한 것으로 판단되면, 제1 데이터를 변환기로 전달하고, 제2 데이터를 버퍼로 전달하는 것을 특징으로 하는 Adder Tree 연산 장치.
  7. 청구항 6에 있어서,
    변환기는,
    비교기에서 제1 데이터의 exponent와 제2 데이터의 exponent가 동일한 것으로 판단되면, 제1 데이터를 저장하였다가 그대로 출력하는 것을 특징으로 하는 Adder Tree 연산 장치.
  8. 제1 데이터와 제2 데이터를 입력받는 단계;
    제1 데이터의 exponent와 제2 데이터의 exponent를 비교하는 단계;
    비교 결과를 기초로, 제1 데이터와 제2 데이터 중 하나를 변환하는 단계;
    변환된 데이터와 다른 데이터를 덧셈하는 단계;를 포함하는 것을 특징으로 하는 Adder Tree 연산 방법.
PCT/KR2021/016178 2021-11-09 2021-11-09 고정확도 딥러닝 연산 장치 WO2023085442A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210152666A KR20230067027A (ko) 2021-11-09 2021-11-09 고정확도 딥러닝 연산 장치
KR10-2021-0152666 2021-11-09

Publications (1)

Publication Number Publication Date
WO2023085442A1 true WO2023085442A1 (ko) 2023-05-19

Family

ID=86335935

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/016178 WO2023085442A1 (ko) 2021-11-09 2021-11-09 고정확도 딥러닝 연산 장치

Country Status (2)

Country Link
KR (1) KR20230067027A (ko)
WO (1) WO2023085442A1 (ko)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200128360A (ko) * 2019-05-01 2020-11-12 삼성전자주식회사 뎁스 와이즈 컨벌루션 혼합-정밀도 앤피유 타일
KR20210037569A (ko) * 2019-09-27 2021-04-06 삼성전자주식회사 컨볼루션 신경망 가속기 아키텍처를 위한 전력 효율적인 하이브리드 트래버설 장치 및 방법
CN112862091A (zh) * 2021-01-26 2021-05-28 合肥工业大学 一种基于快速卷积的资源复用型神经网络硬件加速电路

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200128360A (ko) * 2019-05-01 2020-11-12 삼성전자주식회사 뎁스 와이즈 컨벌루션 혼합-정밀도 앤피유 타일
KR20210037569A (ko) * 2019-09-27 2021-04-06 삼성전자주식회사 컨볼루션 신경망 가속기 아키텍처를 위한 전력 효율적인 하이브리드 트래버설 장치 및 방법
CN112862091A (zh) * 2021-01-26 2021-05-28 合肥工业大学 一种基于快速卷积的资源复用型神经网络硬件加速电路

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FARRUKH FASIH UD DIN; XIE TUO; ZHANG CHUN; WANG ZHIHUA: "A Solution to Optimize Multi-Operand Adders in CNN Architecture on FPGA", 2019 IEEE INTERNATIONAL SYMPOSIUM ON CIRCUITS AND SYSTEMS (ISCAS), IEEE, 26 May 2019 (2019-05-26), pages 1 - 4, XP033574524, ISSN: 2158-1525, ISBN: 978-1-7281-3320-1, DOI: 10.1109/ISCAS.2019.8702777 *
PATEL SUJIT KUMAR; SINGHAL SUBODH KUMAR: "Area–delay and energy efficient multi-operand binary tree adder", IET CIRCUITS DEVICES AND SYSTEMS, THE INSTITUTION OF ENGINEERING AND TECHNOLOGY, GB, vol. 14, no. 5, 1 August 2020 (2020-08-01), GB , pages 586 - 593, XP006091783, ISSN: 1751-858X, DOI: 10.1049/iet-cds.2019.0443 *

Also Published As

Publication number Publication date
KR20230067027A (ko) 2023-05-16

Similar Documents

Publication Publication Date Title
CA1095604A (en) Computer interface
US7873688B2 (en) Processing method and computer system for summation of floating point data
WO2013025081A1 (ko) 단말 및 그 단말에서 어플리케이션 수행 방법
WO2020159016A1 (ko) 하드웨어 구현에 적합한 신경망 파라미터 최적화 방법, 신경망 연산방법 및 그 장치
WO2013147441A1 (en) Scheduling apparatus and method for load balancing when performing multiple transcoding operations
WO2023085442A1 (ko) 고정확도 딥러닝 연산 장치
KR100450680B1 (ko) 버스 대역폭을 증가시키기 위한 메모리 컨트롤러, 이를이용한 데이터 전송방법 및 이를 구비하는 컴퓨터 시스템
US4819165A (en) System for performing group relative addressing
US6535898B1 (en) Fast floating-point truncation to integer form
WO2022146080A1 (ko) 딥러닝 네트워크의 동적 양자화 정밀도 가변 알고리즘 및 방법
CN117420982A (zh) 包括融合乘累加器的芯片、设备及数据运算的控制方法
CN116932202B (zh) 一种访存方法、处理器、电子设备及可读存储介质
WO2023113445A1 (ko) 부동 소수점 연산 방법 및 장치
CN111160541A (zh) 集成电路芯片装置及相关产品
US20230244442A1 (en) Normalizer and multiplication and accumulation (mac) operator including the normalizer
CN111160543A (zh) 集成电路芯片装置及相关产品
EP3779706A1 (en) Method, apparatus, device and computer-readable storage medium for storage management
WO2022107951A1 (ko) 초경량 딥러닝 네트워크 학습 방법
WO2022005046A1 (ko) 딥 러닝 네트워크로부터 경량화 딥 러닝 네트워크로 지식을 전수하는 방법
WO2023075146A1 (ko) 컴퓨팅 시스템 및 이를 위한 전치 방법
US20020198916A1 (en) Method and circuit for normalization of floating point significands in a SIMD array MPP
WO2023080292A1 (ko) 딥러닝 가속장치를 위한 적응적 파라미터 생성 장치 및 방법
WO2023195658A1 (ko) 트랜스포머 기반 언어 서비스 가속화를 위한 저비용 다중 fpga 가속 시스템
WO2021107170A1 (ko) 저전력 딥러닝 가속 장치
WO2023120813A1 (ko) 네트워크 엣지간 상호 모니터링을 통한 서버리스 컴퓨팅 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21964152

Country of ref document: EP

Kind code of ref document: A1