KR102334473B1 - Adaptive Deep Learning Accelerator and Method thereof - Google Patents
Adaptive Deep Learning Accelerator and Method thereof Download PDFInfo
- Publication number
- KR102334473B1 KR102334473B1 KR1020190149306A KR20190149306A KR102334473B1 KR 102334473 B1 KR102334473 B1 KR 102334473B1 KR 1020190149306 A KR1020190149306 A KR 1020190149306A KR 20190149306 A KR20190149306 A KR 20190149306A KR 102334473 B1 KR102334473 B1 KR 102334473B1
- Authority
- KR
- South Korea
- Prior art keywords
- deep learning
- rdma
- external memory
- buffer
- data
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
- G06F13/1673—Details of memory controller using buffers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
- G06F13/1678—Details of memory controller using bus width
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Abstract
다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있는 딥러닝 가속 장치 및 방법이 제공된다. 본 발명의 실시예에 따른 딥러닝 가속 장치는 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 RDMA(Read Direct Memory Access); RDMA에서 읽어들인 데이터가 저장되는 제1 버퍼; RDMA와 제1 버퍼의 상황을 파악하는 체커; 및 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 연산기; 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 제어기;를 포함한다.
이에 의해, 다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있게 된다.Provided are an apparatus and method for accelerating deep learning that can adaptively control hardware speed even when an access pattern of an external memory cannot be predicted by sharing an external memory with other devices. A deep learning acceleration apparatus according to an embodiment of the present invention directly accesses an external memory, and reads data for a deep learning operation from the external memory (Read Direct Memory Access) (RDMA); a first buffer in which data read from RDMA is stored; a checker for understanding the status of RDMA and the first buffer; and an operator for performing a deep learning operation with the data stored in the first buffer; It includes; based on the situation identified in the checker, the controller for varying the operating speed of the calculator.
Accordingly, it is possible to adaptively control the hardware speed even in a state where the access pattern of the external memory cannot be predicted by sharing the external memory with other devices.
Description
본 발명은 영상 처리 및 SoC(System on Chip) 기술에 관한 것으로, 더욱 상세하게는 딥러닝 연산시 하드웨어 속도를 제어할 수 있는 딥러닝 가속 장치 및 방법에 관한 것이다.The present invention relates to image processing and SoC (System on Chip) technology, and more particularly, to a deep learning acceleration apparatus and method capable of controlling hardware speed during deep learning operation.
딥러닝 하드웨어 가속기에 대한 대부분의 연구 개발은 입력되는 데이터(Feature map)외 컨볼루션 파라미터(Weight)를 최대한 많이 처리하는 것에 초점이 맞추어져 있다.Most research and development for deep learning hardware accelerators is focused on processing as many convolution parameters (weight) as possible in addition to input data (feature map).
하지만, 딥러닝 하드웨어 가속기가 접근하여야 하는 외부 메모리에의 물리적 제약 사항인 외부 메모리 허용 Bandwidth 라는 제약이 있다. 즉, 딥러닝 하드웨어 가속기의 성능이 뛰어나 연산기 할당을 충분이 할 수 있다 하더라도, 외부 메모리로부터의 데이터를 공급이 빠르게 이루어지지 않으면, 빠른 연산을 수행할 수 없는 상태가 된다. However, there is a limitation of the external memory allowable Bandwidth, which is a physical constraint on the external memory that the deep learning hardware accelerator must access. That is, even if the performance of the deep learning hardware accelerator is excellent and the operator allocation is sufficient, if the data from the external memory is not supplied quickly, it is in a state in which fast operation cannot be performed.
만약, 딥러닝 하드웨어 가속기가 외부 메모리를 단독으로 사용하는 경우라면, 가속기의 Bandwidth 상황을 사전 예측할 수 있어 Peak Memory bandwidth를 넘지 않는 한도에서, 외부 메모리부터의 데이터 공급이 최적화되도록 설계할 수 있다.If the deep learning hardware accelerator uses an external memory alone, the bandwidth situation of the accelerator can be predicted in advance, so that the data supply from the external memory can be optimized as long as it does not exceed the peak memory bandwidth.
그러나, 작은 시스템의 경우에는 딥러닝 하드웨어 가속기가 단독으로 외부 메모리를 사용하는 것은 아주 드물며, 다른 인터페이스나 메인 프로세서와 함께 외부 메모리를 공유하여 사용하여야 한다. 이 경우에는 외부 메모리의 접근 상황을 예측할 수 없어 위 설계 방법을 적용할 수 없는 문제가 있다.However, in the case of a small system, it is very rare for a deep learning hardware accelerator to use an external memory alone, and it must be used by sharing the external memory with another interface or main processor. In this case, there is a problem in that the above design method cannot be applied because the access condition of the external memory cannot be predicted.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있는 딥러닝 가속 장치 및 방법을 제공함에 있다.The present invention has been devised to solve the above problems, and an object of the present invention is to adaptively control the hardware speed even in a state where the access pattern of the external memory cannot be predicted by sharing the external memory with other devices. It is to provide an apparatus and method for accelerating deep learning that can do this.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, 딥러닝 가속 장치는 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 RDMA(Read Direct Memory Access); RDMA에서 읽어들인 데이터가 저장되는 제1 버퍼; RDMA와 제1 버퍼의 상황을 파악하는 체커; 및 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 연산기; 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 제어기;를 포함한다. According to an embodiment of the present invention for achieving the above object, a deep learning acceleration apparatus directly accesses an external memory, and reads data for a deep learning operation from the external memory (Read Direct Memory Access) (RDMA); a first buffer in which data read from RDMA is stored; a checker for understanding the status of RDMA and the first buffer; and an operator for performing a deep learning operation with the data stored in the first buffer; It includes; based on the situation identified in the checker, the controller for varying the operating speed of the calculator.
본 발명에 따른 딥러닝 가속 장치는 연산기에서 딥러닝 연산된 데이터가 저장되는 제2 버퍼; 외부 메모리에 직접 접근하여, 제2 버퍼에 저장된 데이터를 외부 메모리에 기록하는 WDMA(Write Direct Memory Access);를 더 포함하고, 체커는, WDMA와 제2 버퍼의 상황을 더 파악할 수 있다. A deep learning acceleration apparatus according to the present invention includes: a second buffer in which data calculated by deep learning in the calculator is stored; The method further includes a write direct memory access (WDMA) that directly accesses the external memory and writes the data stored in the second buffer to the external memory, and the checker may further understand the status of the WDMA and the second buffer.
체커는, RDMA와 WDMA의 bandwidth 상황을 파악하고, 제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 동작 여부를 제어할 수 있다.The checker determines the bandwidth status of RDMA and WDMA, and the controller can control whether the operator operates according to the identified bandwidth status of RDMA and WDMA.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 간격을 제어할 수 있다.The controller may control the enable interval of the operator according to the identified RDMA and WDMA bandwidth conditions.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 간격을 제어할 수 있다.The controller may control the enable signal interval of the operator according to the identified bandwidth conditions of RDMA and WDMA.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 길이를 제어할 수 있다.The controller may control the length of the enable signal of the operator according to the identified bandwidth conditions of RDMA and WDMA.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기에 인가되는 클럭의 속도를 제어할 수 있다.The controller may control the speed of the clock applied to the calculator according to the identified bandwidth conditions of RDMA and WDMA.
본 발명의 다른 측면에 따르면, RDMA(Read Direct Memory Access)가, 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 단계; 제1 버퍼가, RDMA가 읽어들인 데이터를 저장하는 단계; 연산기가, 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 단계; 체커가. RDMA와 제1 버퍼의 상황을 파악하는 단계; 및 제어기가, 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 단계;를 포함하는 것을 특징으로 하는 딥러닝 가속 방법이 제공된다.According to another aspect of the present invention, RDMA (Read Direct Memory Access), by directly accessing an external memory, reading data for a deep learning operation from the external memory; storing, by the first buffer, data read by the RDMA; performing, by an operator, a deep learning operation with data stored in a first buffer; checkers. determining the status of the RDMA and the first buffer; And, the controller, based on the situation identified in the checker, the step of varying the operating speed of the operator; is provided a deep learning acceleration method comprising a.
이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, 다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있게 된다.As described above, according to embodiments of the present invention, it is possible to adaptively control the hardware speed even in a state where the access pattern of the external memory cannot be predicted by sharing the external memory with other devices.
특히, 본 발명의 실시예들에 따르면, 딥러닝 가속기에서 매번 동일한 채널/Weight 별 데이터 처리를 위해 대용량의 외부 메모리 접근에 따른 연산 속도 제어가 가능하며, Peak Bandwidth 상황에서 연산기의 연산 속도 혹은 연산율을 적절히 분배하여 가속기의 데이터 버퍼링 속도의 영향을 최소화할 수 있게 된다.In particular, according to embodiments of the present invention, it is possible to control the operation speed according to the access of a large-capacity external memory for data processing by the same channel/weight each time in the deep learning accelerator, and the operation speed or operation rate of the operator in a peak bandwidth situation It is possible to minimize the effect of the data buffering speed of the accelerator by properly distributing the .
도 1은 본 발명이 적용 가능한 딥러닝 가속 장치를 도시한 도면,
도 2는 본 발명의 일 실시예에 따른 딥러닝 가속 장치의 구조를 도시한 블럭도,
도 3은, 도 2에 도시된 연산기(130)의 상세 구조를 도시한 블럭도,
도 4는 본 발명의 다른 실시예에 따른 딥러닝 가속 장치의 동작 제어 방법의 설명에 제공되는 흐름도,
도 5는, 도 2에 도시된 딥러닝 가속 장치의 구성을 개념적으로 나타낸 블럭도이다.1 is a view showing a deep learning acceleration device to which the present invention is applicable;
2 is a block diagram showing the structure of a deep learning acceleration apparatus according to an embodiment of the present invention;
3 is a block diagram showing the detailed structure of the
4 is a flowchart provided for explaining an operation control method of a deep learning acceleration device according to another embodiment of the present invention;
5 is a block diagram conceptually illustrating the configuration of the deep learning acceleration apparatus shown in FIG. 2 .
이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.Hereinafter, the present invention will be described in more detail with reference to the drawings.
도 1은 본 발명이 적용 가능한 딥러닝 가속 장치를 도시한 도면이다. 도시된 딥러닝 가속 장치는, RDMA(Read Direct Memory Access)(110), 입력 버퍼(120), 연산기(130), 출력 버퍼(140), WDMA(Write Direct Memory Access)(150)를 포함하여 구성된다.1 is a diagram illustrating a deep learning acceleration device to which the present invention is applicable. The illustrated deep learning acceleration device comprises a read direct memory access (RDMA) 110 , an
딥러닝 가속 장치는 외부 메모리(10)로부터 데이터를 입력받아 딥러닝 연산을 수행하고, 연산 결과를 외부 메모리(10)로 출력하여 저장한다.The deep learning acceleration device receives data from the
외부 메모리(10)로부터 입력받는 데이터는 IFmap(Input Feature map : 입력 영상의 특징 데이터)와 Weight(딥러닝 모델의 컨볼루션 파라미터)이고, 외부 메모리(10)로 출력하는 딥러닝 연산 결과는 OFmap(Outut Feature map)이다.The data input from the
연산기(130)는 입력 버퍼(120)에 저장된 데이터로 딥러닝 연산을 수행한다. 이 과정에서, 연산기(130)는 필터링을 위하여 채널별 순차적으로 연산하여 합산하고, 여러 채널에 동시 필터링을 적용하며, 필터를 두고 다채널의 영상을 동시 처리할 수 있다.The
그러나, 단순히 위의 기법들을 이용할 경우, 채널의 증가 및 연산을 하기 위한 IFmap 데이터가 많은 경우에는 외부 메모리(10)로부터의 데이터 입출력에 많은 시간을 소요하게 된다.However, when simply using the above techniques, when there is a lot of IFmap data for channel increase and operation, it takes a lot of time to input/output data from the
즉, 데이터 입출력에 많은 시간을 소요할 경우 연산기(130)의 동작을 수행하기 위한 데이터의 준비율이 떨어져 하드웨어 동작 시 속도 저하가 발생(core의 hold 상태 지속) 한다.That is, when a lot of time is spent on data input/output, the data preparation rate for performing the operation of the
이는 전체적인 속도의 저하 혹은 Bandwidth를 고려한 하드웨어 구조의 재설계를 필요로 하게 된다.This requires a reduction in overall speed or a redesign of the hardware structure in consideration of bandwidth.
위에서 설명한 바와 같이 다수의 연산을 수행하는 구조에서는 IFmap, Weight가 외부 메모리(10)로 부터의 데이터 입력을 필요로 하며, OFmap의 경우에는 외부 메모리(10)에 저장을 필요로 한다.As described above, in the structure for performing a number of operations, IFmap and Weight require data input from the
즉, 충분한 데이터의 입출력을 위한 입출력 Bandwidth가 굉장히 중요하다. 보통 연산시 사전에 입력 데이터를 요청할 경우에 Peak Bandwidth를 필요로 하게 되므로, 해당 Peak값을 분산할 필요성이 있다. That is, input/output bandwidth for sufficient data input/output is very important. In general, when requesting input data in advance, peak bandwidth is required, so it is necessary to distribute the corresponding peak value.
해당 Peak 값을 고려하여 다양한 하드웨어 구현 방법이 나왔으나, 딥러닝 가속 장치의 내부 구조만을 위한 것이 대부분이며, 전체 코어의 동작에만 한정되어 있는 실정이다.Various hardware implementation methods have been proposed in consideration of the corresponding peak value, but most are for the internal structure of the deep learning accelerator and are limited only to the operation of the entire core.
이에 따라, 본 발명의 실시예에서는, 입력된 데이터를 이용하는 딥러닝 연산 가속 처리를 위하여, 딥러닝 연산을 수행함에 있어 하드웨어 리소스 상태를 지속적으로 관리하며, 하드웨어 속도를 적응적으로 제어하는 기법을 제시한다.Accordingly, in an embodiment of the present invention, for deep learning operation acceleration processing using input data, a technique for continuously managing the hardware resource state and adaptively controlling the hardware speed in performing a deep learning operation is proposed. do.
구체적으로, 본 발명의 실시예에서는, 시스템 내의 다른 프로세서나 다른 인터페이스에 의해 외부 메모리(10)가 공유되는 환경으로 인해 외부 메모리(10)의 접근 패턴을 전혀 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있는 적응형 딥러닝 가속 장치의 하드웨어 구조를 제시한다.Specifically, in the embodiment of the present invention, the hardware speed is adapted even in a state where the access pattern of the
도 2는 본 발명의 일 실시예에 따른 딥러닝 가속 장치의 구조를 도시한 블럭도이다. 본 발명의 실시예에 따른 딥러닝 가속 장치는, 도 2에 도시된 바와 같이, RDMA(110), 입력 버퍼(120), 연산기(130), 출력 버퍼(140), WDMA(150), 체커(Checker)(160) 및 제어기(Controller)(170)를 포함하여 구성된다.2 is a block diagram illustrating the structure of a deep learning acceleration apparatus according to an embodiment of the present invention. The deep learning acceleration apparatus according to an embodiment of the present invention, as shown in FIG. 2,
RDMA(110)는 외부 메모리(10)에 직접 접근하여, 외부 메모리(10)로부터 딥러닝 연산을 위한 데이터를 읽어들이는 모듈이다. 입력 버퍼(120)는 RDMA(110)에서 읽어들인 데이터가 저장되는 버퍼이다.The
RDMA(110)가 외부 메모리(10)로부터 읽어들여 입력 버퍼(120)에 저장하는 데이터는, IFmap과 Weight이다.Data that the
연산기(130)는 입력 버퍼(120)에 저장된 데이터로 딥러닝 연산을 수행하기 위한 모듈이다. 도 3은, 도 2에 도시된 연산기(130)의 상세 구조를 도시한 블럭도이다.The
도시된 바와 같이, 연산기(130)는 딥러닝 연산을 위해 필요한 컨볼루션 연산 모듈(131), 어드레스 트리 모듈(132), 배치 정규화 모듈(133), Add Bias 모듈(134), Activation 모듈(135) 및 Maxpool 모듈(136)을 포함한다.As shown, the
출력 버퍼(140)는 연산기(130)에서 딥러닝 연산된 데이터인 OFmap이 저장되는 버퍼이다. WDMA(150)는 외부 메모리(10)에 직접 접근하여, 출력 버퍼(140)에 저장된 데이터를 외부 메모리(10)에 기록한다.The
체커(160)는 RDMA(110)와 입력 버퍼(120)를 체크하고 출력 버퍼(140)와 WDMA(150)를 체크하여, RDMA(110)의 bandwidth 상황과 WDMA(150)의 bandwidth 상황을 파악한다.The
제어기(170)는 체커(160)에서 파악된 DMA bandwidth 상황(채널 상황)을 기초로, 연산기(130)의 동작 속도가 가변되도록 제어한다.The
구체적으로, 제어기(170)는 DMA bandwidth 상황에 따라, 연산기(130)의 Enable 신호의 간격, Enable 신호의 길이 등을 제어할 수 있다. 나아가, 제어기(170)는 DMA bandwidth 상황에 따라, 연산기(130)에 인가되는 클럭의 속도를 제어하는 것도 가능하다.Specifically, the
본 발명의 실시예에 따른 딥러닝 가속 장치의 사양이 다음과 같이 설계된 경우를 상정한다.It is assumed that the specification of the deep learning acceleration device according to the embodiment of the present invention is designed as follows.
외부 메모리(10)와 DMA(110,150) 간 인터페이스인 AXI 인터페이스의bitwidth : 512bitsBitwidth of AXI interface, which is an interface between
burst : 16burst : 16
multiple outstanding : 8multiple outstanding : 8
Kernel : 3×3Kernel : 3×3
Fmap : 17bits~32bitsFmap : 17bits~32bits
Weight : 16 bitsWeight: 16 bits
16채널의 입력 데이터를 처리하여 16채널의 출력 데이터를 연산한다면, 라인 메모리 기반이므로 사전에 데이터를 RDMA(110)로 미리 요청하여 DMA 캐쉬에 저장하고, 이를 입력 버퍼(120)에서 불러들여 라인 메모리를 구성한다.If 16-channel input data is processed and 16-channel output data is calculated, the data is requested in advance to the
한 번의 multiple outstanding 요청으로 획득할 수 있는 데이터는 최대 32클럭 이내에 2048 데이터(32bits 기준) = 16 pixels × 16channel data 이며, 2,304(3×3×16ch(in)×16ch(out))를 연산기(130)에서 동시에 처리하여 출력 버퍼(140)로 저장이 가능하다.The data that can be acquired with one multiple outstanding request is 2048 data (based on 32bits) = 16 pixels × 16channel data within a maximum of 32 clocks, and 2,304 (3×3×16ch(in)×16ch(out)) of 2,304(3×3×16ch(in)×16ch(out)) ) can be simultaneously processed and stored in the
위의 연산을 위하여, 모든 데이터를 버퍼링한다면 병렬 처리수(Pcal)에 따라서 Pcal×n×m×Input Channel×Output Channel×2의 peak bandwidth가 필요하게 되며, 또한, OFmap의 누적 연산을 위한 입출력 bitwidth의 2배 크기의 덧셈용 버퍼를 필요로 한다For the above operation, if all data is buffered, a peak bandwidth of Pcal×n×m×Input Channel×Output Channel×2 is required according to the number of parallel processing (Pcal). Requires an addition buffer twice the size of
그러나, AXI 채널에 여유가 없어 입출력을 위한 Delay가 커지거나, RDMA(110)와 WDMA(150)의 속도가 상이할 경우에는 이를 처리하기 위하여 연산기(130)의 속도를 줄이거나 아예 동작을 하지 못하게 하는 기능이 없다면, 데이터의 부족 현상이 발생하거나, 출력 버퍼(140)가 넘치는 현상이 발생하게 된다.However, if the delay for input/output is increased because there is not enough room in the AXI channel, or the speed of the
하지만, 본 발명의 실시예에 따른 딥러닝 가속 장치에서는 입출력을 위한 DMA bandwidth 상황에 따라 연산기(130)의 Go/Stop 제어가 가능할 뿐만 아니라, 연산기(130)로 인가되는 클럭 속도를 제어하여, 연산기(130)의 동작/속도를 DMA bandwidth 상황에 따라 적응적으로 제어할 수 있다.However, in the deep learning acceleration device according to an embodiment of the present invention, Go/Stop control of the
기존 방식으로 처리한다고 하면, 해당 데이터의 입출력이 끝날 때 까지 다른 AXI 채널은 hold 되어 있어 bus 채널 상황에 따른 대처가 느려지게 될 것이다.If it is processed in the conventional way, other AXI channels are held until the input/output of the corresponding data is finished, so the response according to the bus channel conditions will be slow.
도 4는 본 발명의 다른 실시예에 따른 딥러닝 가속 장치의 동작 제어 방법의 설명에 제공되는 흐름도이다.4 is a flowchart provided to explain a method for controlling an operation of a deep learning acceleration apparatus according to another embodiment of the present invention.
도시된 바와 같이, 딥러닝 가속 장치의 RDMA(110)는 외부 메모리(10)로부터 딥러닝 연산을 위한 데이터를 읽어들여 입력 버퍼(120)에 저장한다(S210).As shown, the
다음, 연산기(130)가 S210단계에서 저장된 데이터로 딥러닝 연산을 수행하고, 딥러닝 연산 결과를 출력 버퍼(140)에 저장한다(S220).Next, the
그러면, WDMA(150)는 S220단계에서 저장된 데이터를 외부 메모리(10)에 저장한다(S230).Then, the
S210단계 내지 S230단계가 수행되는 중에, 체커(160)는 RDMA(110)와 입력 버퍼(120)를 체크하고 출력 버퍼(140)와 WDMA(150)를 체크하여, DMA bandwidth 상황을 파악한다(S240).While steps S210 to S230 are performed, the
그리고, 제어기(170)는 S240단계에서 파악된 DMA bandwidth 상황을 기초로, 연산기(130)의 동작 속도가 가변되도록 제어한다(S350). S350단계에서 연산기(130)의 속도 제어는 Enable 신호의 간격, Enable 신호의 길이 등을 조절하거나 인가되는 클럭의 속도를 제어하는 방식으로 수행된다.Then, the
도 5는, 도 2에 도시된 딥러닝 가속 장치의 구성을 개념적으로 나타낸 도면이다. 도시된 바와 같이, 본 발명의 실시예에 따른 딥러닝 가속 장치는, 통신부(101), 프로세서(102) 및 저장부(103)를 포함하여 구성된다.FIG. 5 is a diagram conceptually illustrating the configuration of the deep learning acceleration device shown in FIG. 2 . As shown, the deep learning acceleration apparatus according to an embodiment of the present invention is configured to include a
통신부(101)는 외부 메모리(10)와 데이터를 전달하기 위한 통신 수단으로, 전술한 RDMA(110)와 WDMA(150)가 이에 해당한다.The
프로세서(102)는 딥러닝 가속 장치에서 필요한 연산과 제어를 수행하기 위해 필요한 구성으로, 전술한 연산기(130), 체커(160) 및 제어기(170)가 이에 해당한다.The
저장부(103)는 외부 메모리(10)로부터 입력되는 데이터와 외부 메모리(10)로 출력할 데이터가 임시 저장되는 저장소로, 전술한 입력 버퍼(120)와 출력 버퍼(140)가 이에 해당한다.The
지금까지, 적응형 딥러닝 가속 장치 및 방법에 대해, 바람직한 실시예를 들어 상세히 설명하였다.So far, the adaptive deep learning acceleration apparatus and method have been described in detail with reference to preferred embodiments.
본 발명의 실시예에서는, 입력 데이터 및 입력 컨볼루션 파라미터의 준비 상황을 지속적으로 확인하여 하드웨어 속도를 가변시키는 구조를 통해, 적절한 속도 제어로 저전력 처리가 가능하고, 할당된 연산기의 세부 동작 제어로 다양한 네트워크에 적용 가능하다.In the embodiment of the present invention, low-power processing is possible with appropriate speed control through a structure that changes the hardware speed by continuously checking the preparation status of input data and input convolution parameters, and various operations can be performed by controlling the detailed operation of the assigned operator. applicable to the network.
구체적으로, 본 발명의 실시예에 따른 적응형 딥러닝 가속 장치는, 대용량의 외부 메모리 접근의 예측 불가능한 상황에서도 동작 가능한 구조로 설계되며, 저전력 하드웨어 처리 기법을 적용하며, 실제 시스템에서의 다양한 상황에서 적용 가능할 수 있다.Specifically, the adaptive deep learning acceleration apparatus according to an embodiment of the present invention is designed in a structure that can operate even in an unpredictable situation of large-capacity external memory access, applies a low-power hardware processing technique, and can be used in various situations in an actual system. may be applicable.
또한, 본 발명의 실시예서는, 딥러닝 가속 장치에서 매번 동일한 채널/Weight 별 데이터 처리를 위해, 외부 대용량의 메모리 접근에 따른 연산 속도 제어가 가능한 하드웨어 구조를 채택하였다.In addition, in the embodiment of the present invention, a hardware structure capable of controlling the operation speed according to an external large-capacity memory access is adopted for data processing by the same channel/weight every time in the deep learning acceleration device.
나아가, 데이터 재사용성을 높여줌과 동시에, Peak Bandwidth 상황에서 연산기의 연산 속도 혹은 연산율을 적절히 분배하여 가속기의 데이터 버퍼링 속도의 영향 최소화할 수 있도록 하였다.Furthermore, while increasing data reusability, the effect of the data buffering speed of the accelerator can be minimized by properly distributing the operation speed or operation rate of the operator in the peak bandwidth situation.
한편, 본 실시예에 따른 장치와 방법의 기능을 수행하게 하는 컴퓨터 프로그램을 수록한 컴퓨터로 읽을 수 있는 기록매체에도 본 발명의 기술적 사상이 적용될 수 있음은 물론이다. 또한, 본 발명의 다양한 실시예에 따른 기술적 사상은 컴퓨터로 읽을 수 있는 기록매체에 기록된 컴퓨터로 읽을 수 있는 코드 형태로 구현될 수도 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터에 의해 읽을 수 있고 데이터를 저장할 수 있는 어떤 데이터 저장 장치이더라도 가능하다. 예를 들어, 컴퓨터로 읽을 수 있는 기록매체는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광디스크, 하드 디스크 드라이브, 등이 될 수 있음은 물론이다. 또한, 컴퓨터로 읽을 수 있는 기록매체에 저장된 컴퓨터로 읽을 수 있는 코드 또는 프로그램은 컴퓨터간에 연결된 네트워크를 통해 전송될 수도 있다.On the other hand, it goes without saying that the technical idea of the present invention can be applied to a computer-readable recording medium containing a computer program for performing the functions of the apparatus and method according to the present embodiment. In addition, the technical ideas according to various embodiments of the present invention may be implemented in the form of computer-readable codes recorded on a computer-readable recording medium. The computer-readable recording medium may be any data storage device readable by the computer and capable of storing data. For example, the computer-readable recording medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical disk, hard disk drive, or the like. In addition, the computer-readable code or program stored in the computer-readable recording medium may be transmitted through a network connected between computers.
또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In addition, although preferred embodiments of the present invention have been illustrated and described above, the present invention is not limited to the specific embodiments described above, and the technical field to which the present invention belongs without departing from the gist of the present invention as claimed in the claims In addition, various modifications are possible by those of ordinary skill in the art, and these modifications should not be individually understood from the technical spirit or perspective of the present invention.
110 : RDMA(Read Direct Memory Access)
120 : 입력 버퍼
130 : 연산기
131 : 컨볼루션 연산 모듈
132 : 어드레스 트리 모듈
133 : 배치 정규화 모듈
134 : Add Bias 모듈
135 : Activation 모듈
136 : Maxpool 모듈140 : 출력 버퍼
150 : WDMA(Write Direct Memory Access)
160 : 체커(Checker)
170 : 제어기110 : RDMA (Read Direct Memory Access)
120: input buffer
130: operator
131: convolution operation module
132: address tree module
133: batch normalization module
134 : Add Bias module
135: Activation module
136: Maxpool module 140: output buffer
150: WDMA (Write Direct Memory Access)
160: Checker
170: controller
Claims (8)
RDMA에서 읽어들인 데이터가 저장되는 제1 버퍼;
RDMA와 제1 버퍼의 상황을 파악하는 체커; 및
제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 연산기;
체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 제어기;를 포함하는 것을 특징으로 하는 딥러닝 가속 장치.
RDMA (Read Direct Memory Access) that directly accesses external memory and reads data for deep learning operation from external memory;
a first buffer in which data read from RDMA is stored;
a checker for understanding the status of RDMA and the first buffer; and
an operator for performing a deep learning operation with data stored in the first buffer;
Based on the situation identified in the checker, a controller for varying the operating speed of the calculator; Deep learning acceleration device comprising a.
연산기에서 딥러닝 연산된 데이터가 저장되는 제2 버퍼;
외부 메모리에 직접 접근하여, 제2 버퍼에 저장된 데이터를 외부 메모리에 기록하는 WDMA(Write Direct Memory Access);를 더 포함하고,
체커는,
WDMA와 제2 버퍼의 상황을 더 파악하는 것을 특징으로 하는 딥러닝 가속 장치.
The method according to claim 1,
a second buffer in which data calculated by deep learning in the calculator is stored;
WDMA (Write Direct Memory Access) for writing the data stored in the second buffer to the external memory by directly accessing the external memory; further comprising,
checkers,
Deep learning acceleration device, characterized in that it further grasps the situation of WDMA and the second buffer.
체커는,
RDMA와 WDMA의 bandwidth 상황을 파악하고,
제어기는,
파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 동작 여부를 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
3. The method according to claim 2,
checkers,
Understand the bandwidth status of RDMA and WDMA,
The controller is
A deep learning accelerator, characterized in that it controls whether the calculator operates according to the identified RDMA and WDMA bandwidth conditions.
제어기는,
파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 간격을 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
4. The method according to claim 3,
The controller is
A deep learning accelerator, characterized in that it controls the enable interval of the calculator according to the identified RDMA and WDMA bandwidth conditions.
제어기는,
파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 간격을 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
5. The method according to claim 4,
The controller is
A deep learning accelerator, characterized in that it controls the enable signal interval of the calculator according to the identified RDMA and WDMA bandwidth conditions.
제어기는,
파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 길이를 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
5. The method according to claim 4,
The controller is
A deep learning accelerator, characterized in that it controls the length of the enable signal of the calculator according to the identified RDMA and WDMA bandwidth conditions.
제어기는,
파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기에 인가되는 클럭의 속도를 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
The method according to claim 1,
The controller is
A deep learning accelerator, characterized in that it controls the speed of the clock applied to the calculator according to the identified RDMA and WDMA bandwidth conditions.
제1 버퍼가, RDMA가 읽어들인 데이터를 저장하는 단계;
연산기가, 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 단계;
체커가. RDMA와 제1 버퍼의 상황을 파악하는 단계; 및
제어기가, 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 단계;를 포함하는 것을 특징으로 하는 딥러닝 가속 방법.RDMA (Read Direct Memory Access), by directly accessing an external memory, reading data for deep learning operation from the external memory;
storing, by the first buffer, data read by the RDMA;
performing, by an operator, a deep learning operation with data stored in a first buffer;
checkers. determining the status of the RDMA and the first buffer; and
Deep learning acceleration method comprising a; by the controller, based on the situation identified in the checker, varying the operating speed of the operator.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/KR2019/015929 WO2021100900A1 (en) | 2019-11-20 | 2019-11-20 | Adaptive deep learning acceleration device and method |
KR1020190149306A KR102334473B1 (en) | 2019-11-20 | 2019-11-20 | Adaptive Deep Learning Accelerator and Method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190149306A KR102334473B1 (en) | 2019-11-20 | 2019-11-20 | Adaptive Deep Learning Accelerator and Method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20210061583A KR20210061583A (en) | 2021-05-28 |
KR102334473B1 true KR102334473B1 (en) | 2021-12-03 |
Family
ID=75980591
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190149306A KR102334473B1 (en) | 2019-11-20 | 2019-11-20 | Adaptive Deep Learning Accelerator and Method thereof |
Country Status (2)
Country | Link |
---|---|
KR (1) | KR102334473B1 (en) |
WO (1) | WO2021100900A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114372012B (en) * | 2021-12-21 | 2024-02-20 | 中国科学院深圳先进技术研究院 | Universal and configurable high-energy-efficiency pooling calculation single-row output system and method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4025260B2 (en) * | 2003-08-14 | 2007-12-19 | 株式会社東芝 | Scheduling method and information processing system |
US10540588B2 (en) * | 2015-06-29 | 2020-01-21 | Microsoft Technology Licensing, Llc | Deep neural network processing on hardware accelerators with stacked memory |
WO2017007044A1 (en) * | 2015-07-07 | 2017-01-12 | 삼성전자 주식회사 | Signal processing device and method |
KR101847262B1 (en) * | 2016-03-18 | 2018-05-28 | 연세대학교 산학협력단 | Main memory embeded hardware accelerator and operation method of the same |
KR101813251B1 (en) * | 2016-04-04 | 2017-12-29 | 윤성현 | Operating apparatus and operation method based on accelerator-dsp memory sharing circumstances |
KR102459854B1 (en) * | 2016-05-26 | 2022-10-27 | 삼성전자주식회사 | Accelerator for deep neural networks |
KR102034659B1 (en) * | 2017-07-31 | 2019-10-21 | 서울대학교산학협력단 | Method for convolution operation redution and system for performing the same |
KR102292389B1 (en) * | 2018-01-17 | 2021-08-25 | 한국전자통신연구원 | Apparatus for distributed processing through remote direct memory access and method for the same |
WO2020116672A1 (en) * | 2018-12-05 | 2020-06-11 | 전자부품연구원 | Deep learning hardware accelerator device |
-
2019
- 2019-11-20 KR KR1020190149306A patent/KR102334473B1/en active IP Right Grant
- 2019-11-20 WO PCT/KR2019/015929 patent/WO2021100900A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
KR20210061583A (en) | 2021-05-28 |
WO2021100900A1 (en) | 2021-05-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5884050A (en) | Mechanism for high bandwidth DMA transfers in a PCI environment | |
US7136970B2 (en) | Storage system and dynamic load management method thereof | |
JP4356765B2 (en) | Information processing apparatus and method, and program | |
US20160211006A1 (en) | Memory access device for memory sharing among plurality of processors, and access method for same | |
CA2364625C (en) | Arbitration methods and systems for arbitrating access to a disk controller memory | |
US20210303199A1 (en) | Buffer optimization for solid-state drives | |
US8954644B2 (en) | Apparatus and method for controlling memory | |
US7617344B2 (en) | Methods and apparatus for controlling access to resources in an information processing system | |
US20180285012A1 (en) | Apparatus and method for accessing storage system that includes a plurality of storage devices with different access speeds | |
JP2006318178A (en) | Device and method for data transfer arbitration | |
CN111797034A (en) | Data management method, neural network processor and terminal equipment | |
US6782463B2 (en) | Shared memory array | |
KR20200057311A (en) | Storage device throttling amount of communicated data depending on suspension frequency of operation | |
JP3266470B2 (en) | Data processing system with per-request write-through cache in forced order | |
US6799228B2 (en) | Input/output control apparatus, input/output control method and information storage system | |
KR102334473B1 (en) | Adaptive Deep Learning Accelerator and Method thereof | |
US7409486B2 (en) | Storage system, and storage control method | |
CN114721975A (en) | Chain table processing method and device, accelerator, circuit board, equipment and storage medium | |
WO2016206463A1 (en) | Write operation control method, device and system | |
US10346070B2 (en) | Storage control apparatus and storage control method | |
KR102368364B1 (en) | Deep Learning Acceleration Hardware Device | |
US20090119429A1 (en) | Semiconductor integrated circuit | |
US7774513B2 (en) | DMA circuit and computer system | |
JP3766377B2 (en) | Bus control device and information processing system | |
CN107085557A (en) | Direct memory access system and associated method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A302 | Request for accelerated examination | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |