WO2021100900A1 - 적응형 딥러닝 가속 장치 및 방법 - Google Patents

적응형 딥러닝 가속 장치 및 방법 Download PDF

Info

Publication number
WO2021100900A1
WO2021100900A1 PCT/KR2019/015929 KR2019015929W WO2021100900A1 WO 2021100900 A1 WO2021100900 A1 WO 2021100900A1 KR 2019015929 W KR2019015929 W KR 2019015929W WO 2021100900 A1 WO2021100900 A1 WO 2021100900A1
Authority
WO
WIPO (PCT)
Prior art keywords
deep learning
rdma
external memory
buffer
data
Prior art date
Application number
PCT/KR2019/015929
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 WO2021100900A1 publication Critical patent/WO2021100900A1/ko

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1678Details of memory controller using bus width
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • 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 image processing and SoC (System on Chip) technology, and more particularly, to a deep learning acceleration apparatus and method capable of controlling a hardware speed during a deep learning operation.
  • SoC System on Chip
  • external memory allowable bandwidth is a physical limitation on external memory that the deep learning hardware accelerator must access. That is, even though the deep learning hardware accelerator has excellent performance and can be sufficient to allocate the operator, if the data from the external memory is not supplied quickly, the fast operation cannot be performed.
  • the bandwidth situation of the accelerator can be predicted in advance, so that data supply from the external memory can be optimized without exceeding the peak memory bandwidth.
  • the present invention was conceived 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 an external memory with other devices. It is to provide an apparatus and method for accelerating deep learning.
  • a deep learning accelerating apparatus includes: RDMA (Read Direct Memory Access) for reading data for deep learning operations from an external memory by directly accessing an external memory; A first buffer for storing data read from RDMA; A checker to determine the status of the RDMA and the first buffer; And an operator that performs a deep learning operation on the data stored in the first buffer. It includes; a controller for varying the operation speed of the operator based on the situation identified in the checker.
  • RDMA Read Direct Memory Access
  • the apparatus for accelerating deep learning includes: a second buffer for storing data obtained by performing deep learning in a calculator; Further, WDMA (Write Direct Memory Access) for directly accessing the external memory and writing data stored in the second buffer to the external memory, and the checker may further determine the status of the WDMA and the second buffer.
  • WDMA Write Direct Memory Access
  • the checker can determine the bandwidth situation of RDMA and WDMA, and the controller can control whether the operator operates or not according to the determined bandwidth situation of RDMA and WDMA.
  • the controller can control the enable interval of the operator according to the identified RDMA and WDMA bandwidth conditions.
  • the controller may control the enable signal interval of the operator according to the identified RDMA and WDMA bandwidth conditions.
  • the controller can control the length of the enable signal of the operator according to the determined bandwidth situation of RDMA and WDMA.
  • the controller may control the speed of the clock applied to the operator according to the determined bandwidth situation of RDMA and WDMA.
  • a read direct memory access 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 the operator, a deep learning operation with data stored in the first buffer; Checkers. Determining the status of the RDMA and the first buffer; And varying, by the controller, the operating speed of the operator based on the situation identified in the checker.
  • RDMA read direct memory access
  • the deep learning accelerator can control the operation speed according to access to a large-capacity external memory for the same channel/weight-specific data processing every time, and the operation speed or operation rate of the operator in the peak bandwidth situation. It is possible to minimize the influence of the data buffering speed of the accelerator by appropriately distributing it.
  • FIG. 1 is a diagram showing a deep learning acceleration device to which the present invention can be applied;
  • FIG. 2 is a block diagram showing the structure of a deep learning acceleration apparatus according to an embodiment of the present invention.
  • FIG. 3 is a block diagram showing a detailed structure of the calculator 130 shown in FIG. 2;
  • FIG. 4 is a flowchart provided to explain a method of controlling an operation of a deep learning accelerating apparatus according to another embodiment of the present invention.
  • FIG. 5 is a block diagram conceptually showing the configuration of the deep learning accelerating apparatus shown in FIG. 2.
  • the illustrated deep learning acceleration apparatus includes a read direct memory access (RDMA) 110, an input buffer 120, a calculator 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 acceleration device receives data from the external memory 10 and performs a deep learning operation, and outputs and stores the operation result to the external memory 10.
  • the data received from the external memory 10 are IFmap (Input Feature map: feature data of the input image) and Weight (convolution parameter of the deep learning model), and the deep learning operation result output to the external memory 10 is OFmap ( Outut Feature map).
  • the calculator 130 performs a deep learning operation with data stored in the input buffer 120.
  • the calculator 130 may sequentially calculate and add up each channel for filtering, apply simultaneous filtering to multiple channels, and simultaneously process images of multiple channels with a filter.
  • IFmap and weight require data input from the external memory 10, and in the case of OFmap, they need to be stored in the external memory 10.
  • the input/output bandwidth for sufficient data input/output is very important.
  • peak bandwidth is required, so it is necessary to distribute the corresponding peak value.
  • a technique for continuously managing the state of hardware resources and adaptively controlling hardware speed in performing deep learning operations is proposed for the acceleration processing of deep learning operations using input data. do.
  • the hardware speed is adapted.
  • Deep learning acceleration apparatus according to an embodiment of the present invention, as shown in Figure 2, RDMA 110, input buffer 120, operator 130, output buffer 140, WDMA 150, checker ( It comprises a Checker (160) and a controller (170).
  • the RDMA 110 is a module that directly accesses the external memory 10 and reads data for deep learning operations from the external memory 10.
  • the input buffer 120 is a buffer in which data read from the RDMA 110 is stored.
  • Data that the RDMA 110 reads from the external memory 10 and stores in the input buffer 120 are IFmap and weight.
  • the calculator 130 is a module for performing a deep learning operation with data stored in the input buffer 120.
  • 3 is a block diagram showing a detailed structure of the operator 130 shown in FIG. 2.
  • the operator 130 includes a convolution operation module 131, an address tree module 132, a batch normalization module 133, an Add Bias module 134, and an Activation module 135 required for a deep learning operation. And a Maxpool module 136.
  • the output buffer 140 is a buffer in which OFmap, which is data that is deep-learned calculated by the operator 130, is stored.
  • the WDMA 150 directly accesses the external memory 10 and writes data stored in the output buffer 140 to the external memory 10.
  • the checker 160 checks the RDMA 110 and the input buffer 120 and checks the output buffer 140 and WDMA 150 to determine the bandwidth status of the RDMA 110 and the bandwidth status of the WDMA 150. .
  • the controller 170 controls the operation speed of the calculator 130 to vary based on the DMA bandwidth situation (channel condition) identified by the checker 160.
  • the controller 170 may control the interval of the enable signal of the operator 130, the length of the enable signal, and the like according to the DMA bandwidth situation. Further, the controller 170 may control the speed of the clock applied to the calculator 130 according to the DMA bandwidth situation.
  • bitwidth of the AXI interface which is an interface between the external memory 10 and DMA (110,150): 512bits
  • the data is requested in advance from the RDMA 110 and stored in the DMA cache, and the data is read from the input buffer 120 and the line memory Configure.
  • the deep learning acceleration apparatus not only can Go/Stop control of the calculator 130 according to the DMA bandwidth for input/output, but also control the clock speed applied to the calculator 130,
  • the operation/speed of (130) can be adaptively controlled according to the DMA bandwidth situation.
  • FIG. 4 is a flowchart illustrating a method of controlling an operation of an apparatus for accelerating deep learning according to another embodiment of the present invention.
  • the RDMA 110 of the deep learning acceleration device reads data for deep learning operation from the external memory 10 and stores it in the input buffer 120 (S210).
  • the calculator 130 performs a deep learning operation with the data stored in step S210, and stores the deep learning operation result in the output buffer 140 (S220).
  • the WDMA 150 stores the data stored in step S220 in the external memory 10 (S230).
  • the checker 160 checks the RDMA 110 and the input buffer 120 and checks the output buffer 140 and the WDMA 150 to determine the DMA bandwidth situation (S240). ).
  • step S350 the controller 170 controls the operation speed of the operator 130 to be varied based on the DMA bandwidth situation identified in step S240 (S350).
  • the speed control of the operator 130 is performed by adjusting the interval of the enable signal, the length of the enable signal, or the like, or controlling the speed of the applied clock.
  • the deep learning acceleration apparatus includes a communication unit 101, a processor 102, and a storage unit 103.
  • the communication unit 101 is a communication means for transferring data to the external memory 10, and the above-described RDMA 110 and WDMA 150 correspond to this.
  • the processor 102 is a component necessary to perform the operation and control required in the deep learning acceleration apparatus, and the above-described calculator 130, checker 160, and controller 170 correspond to this.
  • the storage unit 103 is a storage unit in which data input from the external memory 10 and data to be output to the external memory 10 are temporarily stored, and the above-described input buffer 120 and output buffer 140 correspond to this.
  • the adaptive deep learning accelerator according to an embodiment of the present invention is designed in a structure capable of operating even in an unpredictable situation of accessing a large amount of external memory, applying a low-power hardware processing technique, and in various situations in an actual system. May be applicable.
  • the embodiment of the present invention adopts a hardware structure capable of controlling an operation speed according to access to an external large-capacity memory in order to process the same data for each channel/weight in the deep learning accelerator device.
  • the effect of the data buffering speed of the accelerator can be minimized by properly distributing the calculation speed or calculation rate of the calculator in the peak bandwidth situation.
  • the technical idea of the present invention can be applied to a computer-readable recording medium containing a computer program for performing functions of the apparatus and method according to the present embodiment. Further, the technical idea according to various embodiments of the present invention may be implemented in the form of a computer-readable code recorded on a computer-readable recording medium.
  • the computer-readable recording medium can be any data storage device that can be read by a computer and can store data.
  • a computer-readable recording medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical disk, hard disk drive, or the like.
  • a computer-readable code or program stored in a computer-readable recording medium may be transmitted through a network connected between computers.

Abstract

다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있는 딥러닝 가속 장치 및 방법이 제공된다. 본 발명의 실시예에 따른 딥러닝 가속 장치는 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 RDMA(Read Direct Memory Access); RDMA에서 읽어들인 데이터가 저장되는 제1 버퍼; RDMA와 제1 버퍼의 상황을 파악하는 체커; 및 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 연산기; 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 제어기;를 포함한다. 이에 의해, 다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있게 된다.

Description

적응형 딥러닝 가속 장치 및 방법
본 발명은 영상 처리 및 SoC(System on Chip) 기술에 관한 것으로, 더욱 상세하게는 딥러닝 연산시 하드웨어 속도를 제어할 수 있는 딥러닝 가속 장치 및 방법에 관한 것이다.
딥러닝 하드웨어 가속기에 대한 대부분의 연구 개발은 입력되는 데이터(Feature map)외 컨볼루션 파라미터(Weight)를 최대한 많이 처리하는 것에 초점이 맞추어져 있다.
하지만, 딥러닝 하드웨어 가속기가 접근하여야 하는 외부 메모리에의 물리적 제약 사항인 외부 메모리 허용 Bandwidth 라는 제약이 있다. 즉, 딥러닝 하드웨어 가속기의 성능이 뛰어나 연산기 할당을 충분이 할 수 있다 하더라도, 외부 메모리로부터의 데이터를 공급이 빠르게 이루어지지 않으면, 빠른 연산을 수행할 수 없는 상태가 된다.
만약, 딥러닝 하드웨어 가속기가 외부 메모리를 단독으로 사용하는 경우라면, 가속기의 Bandwidth 상황을 사전 예측할 수 있어 Peak Memory bandwidth를 넘지 않는 한도에서, 외부 메모리부터의 데이터 공급이 최적화되도록 설계할 수 있다.
그러나, 작은 시스템의 경우에는 딥러닝 하드웨어 가속기가 단독으로 외부 메모리를 사용하는 것은 아주 드물며, 다른 인터페이스나 메인 프로세서와 함께 외부 메모리를 공유하여 사용하여야 한다. 이 경우에는 외부 메모리의 접근 상황을 예측할 수 없어 위 설계 방법을 적용할 수 없는 문제가 있다.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있는 딥러닝 가속 장치 및 방법을 제공함에 있다.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, 딥러닝 가속 장치는 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 RDMA(Read Direct Memory Access); RDMA에서 읽어들인 데이터가 저장되는 제1 버퍼; RDMA와 제1 버퍼의 상황을 파악하는 체커; 및 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 연산기; 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 제어기;를 포함한다.
본 발명에 따른 딥러닝 가속 장치는 연산기에서 딥러닝 연산된 데이터가 저장되는 제2 버퍼; 외부 메모리에 직접 접근하여, 제2 버퍼에 저장된 데이터를 외부 메모리에 기록하는 WDMA(Write Direct Memory Access);를 더 포함하고, 체커는, WDMA와 제2 버퍼의 상황을 더 파악할 수 있다.
체커는, RDMA와 WDMA의 bandwidth 상황을 파악하고, 제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 동작 여부를 제어할 수 있다.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 간격을 제어할 수 있다.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 간격을 제어할 수 있다.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 길이를 제어할 수 있다.
제어기는, 파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기에 인가되는 클럭의 속도를 제어할 수 있다.
본 발명의 다른 측면에 따르면, RDMA(Read Direct Memory Access)가, 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 단계; 제1 버퍼가, RDMA가 읽어들인 데이터를 저장하는 단계; 연산기가, 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 단계; 체커가. RDMA와 제1 버퍼의 상황을 파악하는 단계; 및 제어기가, 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 단계;를 포함하는 것을 특징으로 하는 딥러닝 가속 방법이 제공된다.
이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, 다른 디바이스들과 함께 외부 메모리를 공유하여 외부 메모리의 접근 패턴을 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있게 된다.
특히, 본 발명의 실시예들에 따르면, 딥러닝 가속기에서 매번 동일한 채널/Weight 별 데이터 처리를 위해 대용량의 외부 메모리 접근에 따른 연산 속도 제어가 가능하며, Peak Bandwidth 상황에서 연산기의 연산 속도 혹은 연산율을 적절히 분배하여 가속기의 데이터 버퍼링 속도의 영향을 최소화할 수 있게 된다.
도 1은 본 발명이 적용 가능한 딥러닝 가속 장치를 도시한 도면,
도 2는 본 발명의 일 실시예에 따른 딥러닝 가속 장치의 구조를 도시한 블럭도,
도 3은, 도 2에 도시된 연산기(130)의 상세 구조를 도시한 블럭도,
도 4는 본 발명의 다른 실시예에 따른 딥러닝 가속 장치의 동작 제어 방법의 설명에 제공되는 흐름도,
도 5는, 도 2에 도시된 딥러닝 가속 장치의 구성을 개념적으로 나타낸 블럭도이다.
이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.
도 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)이다.
연산기(130)는 입력 버퍼(120)에 저장된 데이터로 딥러닝 연산을 수행한다. 이 과정에서, 연산기(130)는 필터링을 위하여 채널별 순차적으로 연산하여 합산하고, 여러 채널에 동시 필터링을 적용하며, 필터를 두고 다채널의 영상을 동시 처리할 수 있다.
그러나, 단순히 위의 기법들을 이용할 경우, 채널의 증가 및 연산을 하기 위한 IFmap 데이터가 많은 경우에는 외부 메모리(10)로부터의 데이터 입출력에 많은 시간을 소요하게 된다.
즉, 데이터 입출력에 많은 시간을 소요할 경우 연산기(130)의 동작을 수행하기 위한 데이터의 준비율이 떨어져 하드웨어 동작 시 속도 저하가 발생(core의 hold 상태 지속) 한다.
이는 전체적인 속도의 저하 혹은 Bandwidth를 고려한 하드웨어 구조의 재설계를 필요로 하게 된다.
위에서 설명한 바와 같이 다수의 연산을 수행하는 구조에서는 IFmap, Weight가 외부 메모리(10)로 부터의 데이터 입력을 필요로 하며, OFmap의 경우에는 외부 메모리(10)에 저장을 필요로 한다.
즉, 충분한 데이터의 입출력을 위한 입출력 Bandwidth가 굉장히 중요하다. 보통 연산시 사전에 입력 데이터를 요청할 경우에 Peak Bandwidth를 필요로 하게 되므로, 해당 Peak값을 분산할 필요성이 있다.
해당 Peak 값을 고려하여 다양한 하드웨어 구현 방법이 나왔으나, 딥러닝 가속 장치의 내부 구조만을 위한 것이 대부분이며, 전체 코어의 동작에만 한정되어 있는 실정이다.
이에 따라, 본 발명의 실시예에서는, 입력된 데이터를 이용하는 딥러닝 연산 가속 처리를 위하여, 딥러닝 연산을 수행함에 있어 하드웨어 리소스 상태를 지속적으로 관리하며, 하드웨어 속도를 적응적으로 제어하는 기법을 제시한다.
구체적으로, 본 발명의 실시예에서는, 시스템 내의 다른 프로세서나 다른 인터페이스에 의해 외부 메모리(10)가 공유되는 환경으로 인해 외부 메모리(10)의 접근 패턴을 전혀 예측할 수 없는 상태에서도, 하드웨어 속도를 적응적으로 제어할 수 있는 적응형 딥러닝 가속 장치의 하드웨어 구조를 제시한다.
도 2는 본 발명의 일 실시예에 따른 딥러닝 가속 장치의 구조를 도시한 블럭도이다. 본 발명의 실시예에 따른 딥러닝 가속 장치는, 도 2에 도시된 바와 같이, RDMA(110), 입력 버퍼(120), 연산기(130), 출력 버퍼(140), WDMA(150), 체커(Checker)(160) 및 제어기(Controller)(170)를 포함하여 구성된다.
RDMA(110)는 외부 메모리(10)에 직접 접근하여, 외부 메모리(10)로부터 딥러닝 연산을 위한 데이터를 읽어들이는 모듈이다. 입력 버퍼(120)는 RDMA(110)에서 읽어들인 데이터가 저장되는 버퍼이다.
RDMA(110)가 외부 메모리(10)로부터 읽어들여 입력 버퍼(120)에 저장하는 데이터는, IFmap과 Weight이다.
연산기(130)는 입력 버퍼(120)에 저장된 데이터로 딥러닝 연산을 수행하기 위한 모듈이다. 도 3은, 도 2에 도시된 연산기(130)의 상세 구조를 도시한 블럭도이다.
도시된 바와 같이, 연산기(130)는 딥러닝 연산을 위해 필요한 컨볼루션 연산 모듈(131), 어드레스 트리 모듈(132), 배치 정규화 모듈(133), Add Bias 모듈(134), Activation 모듈(135) 및 Maxpool 모듈(136)을 포함한다.
출력 버퍼(140)는 연산기(130)에서 딥러닝 연산된 데이터인 OFmap이 저장되는 버퍼이다. WDMA(150)는 외부 메모리(10)에 직접 접근하여, 출력 버퍼(140)에 저장된 데이터를 외부 메모리(10)에 기록한다.
체커(160)는 RDMA(110)와 입력 버퍼(120)를 체크하고 출력 버퍼(140)와 WDMA(150)를 체크하여, RDMA(110)의 bandwidth 상황과 WDMA(150)의 bandwidth 상황을 파악한다.
제어기(170)는 체커(160)에서 파악된 DMA bandwidth 상황(채널 상황)을 기초로, 연산기(130)의 동작 속도가 가변되도록 제어한다.
구체적으로, 제어기(170)는 DMA bandwidth 상황에 따라, 연산기(130)의 Enable 신호의 간격, Enable 신호의 길이 등을 제어할 수 있다. 나아가, 제어기(170)는 DMA bandwidth 상황에 따라, 연산기(130)에 인가되는 클럭의 속도를 제어하는 것도 가능하다.
본 발명의 실시예에 따른 딥러닝 가속 장치의 사양이 다음과 같이 설계된 경우를 상정한다.
외부 메모리(10)와 DMA(110,150) 간 인터페이스인 AXI 인터페이스의bitwidth : 512bits
burst : 16
multiple outstanding : 8
Kernel : 3×3
Fmap : 17bits~32bits
Weight : 16 bits
16채널의 입력 데이터를 처리하여 16채널의 출력 데이터를 연산한다면, 라인 메모리 기반이므로 사전에 데이터를 RDMA(110)로 미리 요청하여 DMA 캐쉬에 저장하고, 이를 입력 버퍼(120)에서 불러들여 라인 메모리를 구성한다.
한 번의 multiple outstanding 요청으로 획득할 수 있는 데이터는 최대 32클럭 이내에 2048 데이터(32bits 기준) = 16 pixels × 16channel data 이며, 2,304(3×3×16ch(in)×16ch(out))를 연산기(130)에서 동시에 처리하여 출력 버퍼(140)로 저장이 가능하다.
위의 연산을 위하여, 모든 데이터를 버퍼링한다면 병렬 처리수(Pcal)에 따라서 Pcal×n×m×Input Channel×Output Channel×2의 peak bandwidth가 필요하게 되며, 또한, OFmap의 누적 연산을 위한 입출력 bitwidth의 2배 크기의 덧셈용 버퍼를 필요로 한다
그러나, AXI 채널에 여유가 없어 입출력을 위한 Delay가 커지거나, RDMA(110)와 WDMA(150)의 속도가 상이할 경우에는 이를 처리하기 위하여 연산기(130)의 속도를 줄이거나 아예 동작을 하지 못하게 하는 기능이 없다면, 데이터의 부족 현상이 발생하거나, 출력 버퍼(140)가 넘치는 현상이 발생하게 된다.
하지만, 본 발명의 실시예에 따른 딥러닝 가속 장치에서는 입출력을 위한 DMA bandwidth 상황에 따라 연산기(130)의 Go/Stop 제어가 가능할 뿐만 아니라, 연산기(130)로 인가되는 클럭 속도를 제어하여, 연산기(130)의 동작/속도를 DMA bandwidth 상황에 따라 적응적으로 제어할 수 있다.
기존 방식으로 처리한다고 하면, 해당 데이터의 입출력이 끝날 때 까지 다른 AXI 채널은 hold 되어 있어 bus 채널 상황에 따른 대처가 느려지게 될 것이다.
도 4는 본 발명의 다른 실시예에 따른 딥러닝 가속 장치의 동작 제어 방법의 설명에 제공되는 흐름도이다.
도시된 바와 같이, 딥러닝 가속 장치의 RDMA(110)는 외부 메모리(10)로부터 딥러닝 연산을 위한 데이터를 읽어들여 입력 버퍼(120)에 저장한다(S210).
다음, 연산기(130)가 S210단계에서 저장된 데이터로 딥러닝 연산을 수행하고, 딥러닝 연산 결과를 출력 버퍼(140)에 저장한다(S220).
그러면, WDMA(150)는 S220단계에서 저장된 데이터를 외부 메모리(10)에 저장한다(S230).
S210단계 내지 S230단계가 수행되는 중에, 체커(160)는 RDMA(110)와 입력 버퍼(120)를 체크하고 출력 버퍼(140)와 WDMA(150)를 체크하여, DMA bandwidth 상황을 파악한다(S240).
그리고, 제어기(170)는 S240단계에서 파악된 DMA bandwidth 상황을 기초로, 연산기(130)의 동작 속도가 가변되도록 제어한다(S350). S350단계에서 연산기(130)의 속도 제어는 Enable 신호의 간격, Enable 신호의 길이 등을 조절하거나 인가되는 클럭의 속도를 제어하는 방식으로 수행된다.
도 5는, 도 2에 도시된 딥러닝 가속 장치의 구성을 개념적으로 나타낸 도면이다. 도시된 바와 같이, 본 발명의 실시예에 따른 딥러닝 가속 장치는, 통신부(101), 프로세서(102) 및 저장부(103)를 포함하여 구성된다.
통신부(101)는 외부 메모리(10)와 데이터를 전달하기 위한 통신 수단으로, 전술한 RDMA(110)와 WDMA(150)가 이에 해당한다.
프로세서(102)는 딥러닝 가속 장치에서 필요한 연산과 제어를 수행하기 위해 필요한 구성으로, 전술한 연산기(130), 체커(160) 및 제어기(170)가 이에 해당한다.
저장부(103)는 외부 메모리(10)로부터 입력되는 데이터와 외부 메모리(10)로 출력할 데이터가 임시 저장되는 저장소로, 전술한 입력 버퍼(120)와 출력 버퍼(140)가 이에 해당한다.
지금까지, 적응형 딥러닝 가속 장치 및 방법에 대해, 바람직한 실시예를 들어 상세히 설명하였다.
본 발명의 실시예에서는, 입력 데이터 및 입력 컨볼루션 파라미터의 준비 상황을 지속적으로 확인하여 하드웨어 속도를 가변시키는 구조를 통해, 적절한 속도 제어로 저전력 처리가 가능하고, 할당된 연산기의 세부 동작 제어로 다양한 네트워크에 적용 가능하다.
구체적으로, 본 발명의 실시예에 따른 적응형 딥러닝 가속 장치는, 대용량의 외부 메모리 접근의 예측 불가능한 상황에서도 동작 가능한 구조로 설계되며, 저전력 하드웨어 처리 기법을 적용하며, 실제 시스템에서의 다양한 상황에서 적용 가능할 수 있다.
또한, 본 발명의 실시예서는, 딥러닝 가속 장치에서 매번 동일한 채널/Weight 별 데이터 처리를 위해, 외부 대용량의 메모리 접근에 따른 연산 속도 제어가 가능한 하드웨어 구조를 채택하였다.
나아가, 데이터 재사용성을 높여줌과 동시에, Peak Bandwidth 상황에서 연산기의 연산 속도 혹은 연산율을 적절히 분배하여 가속기의 데이터 버퍼링 속도의 영향 최소화할 수 있도록 하였다.
한편, 본 실시예에 따른 장치와 방법의 기능을 수행하게 하는 컴퓨터 프로그램을 수록한 컴퓨터로 읽을 수 있는 기록매체에도 본 발명의 기술적 사상이 적용될 수 있음은 물론이다. 또한, 본 발명의 다양한 실시예에 따른 기술적 사상은 컴퓨터로 읽을 수 있는 기록매체에 기록된 컴퓨터로 읽을 수 있는 코드 형태로 구현될 수도 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터에 의해 읽을 수 있고 데이터를 저장할 수 있는 어떤 데이터 저장 장치이더라도 가능하다. 예를 들어, 컴퓨터로 읽을 수 있는 기록매체는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광디스크, 하드 디스크 드라이브, 등이 될 수 있음은 물론이다. 또한, 컴퓨터로 읽을 수 있는 기록매체에 저장된 컴퓨터로 읽을 수 있는 코드 또는 프로그램은 컴퓨터간에 연결된 네트워크를 통해 전송될 수도 있다.
또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.

Claims (8)

  1. 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 RDMA(Read Direct Memory Access);
    RDMA에서 읽어들인 데이터가 저장되는 제1 버퍼;
    RDMA와 제1 버퍼의 상황을 파악하는 체커; 및
    제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 연산기;
    체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 제어기;를 포함하는 것을 특징으로 하는 딥러닝 가속 장치.
  2. 청구항 1에 있어서,
    연산기에서 딥러닝 연산된 데이터가 저장되는 제2 버퍼;
    외부 메모리에 직접 접근하여, 제2 버퍼에 저장된 데이터를 외부 메모리에 기록하는 WDMA(Write Direct Memory Access);를 더 포함하고,
    체커는,
    WDMA와 제2 버퍼의 상황을 더 파악하는 것을 특징으로 하는 딥러닝 가속 장치.
  3. 청구항 2에 있어서,
    체커는,
    RDMA와 WDMA의 bandwidth 상황을 파악하고,
    제어기는,
    파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 동작 여부를 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
  4. 청구항 3에 있어서,
    제어기는,
    파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 간격을 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
  5. 청구항 4에 있어서,
    제어기는,
    파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 간격을 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
  6. 청구항 4에 있어서,
    제어기는,
    파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기의 Enable 신호 길이를 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
  7. 청구항 1에 있어서,
    제어기는,
    파악된 RDMA와 WDMA의 bandwidth 상황에 따라, 연산기에 인가되는 클럭의 속도를 제어하는 것을 특징으로 하는 딥러닝 가속 장치.
  8. RDMA(Read Direct Memory Access)가, 외부 메모리에 직접 접근하여, 외부 메모리로부터 딥러닝 연산을 위한 데이터를 읽어들이는 단계;
    제1 버퍼가, RDMA가 읽어들인 데이터를 저장하는 단계;
    연산기가, 제1 버퍼에 저장된 데이터로 딥러닝 연산을 수행하는 단계;
    체커가. RDMA와 제1 버퍼의 상황을 파악하는 단계; 및
    제어기가, 체커에서 파악된 상황을 기초로, 연산기의 동작 속도를 가변시키는 단계;를 포함하는 것을 특징으로 하는 딥러닝 가속 방법.
PCT/KR2019/015929 2019-11-20 2019-11-20 적응형 딥러닝 가속 장치 및 방법 WO2021100900A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190149306A KR102334473B1 (ko) 2019-11-20 2019-11-20 적응형 딥러닝 가속 장치 및 방법
KR10-2019-0149306 2019-11-20

Publications (1)

Publication Number Publication Date
WO2021100900A1 true WO2021100900A1 (ko) 2021-05-27

Family

ID=75980591

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/015929 WO2021100900A1 (ko) 2019-11-20 2019-11-20 적응형 딥러닝 가속 장치 및 방법

Country Status (2)

Country Link
KR (1) KR102334473B1 (ko)
WO (1) WO2021100900A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114372012A (zh) * 2021-12-21 2022-04-19 中国科学院深圳先进技术研究院 一种通用、可配置的高能效池化计算单行输出系统和方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090044188A1 (en) * 2003-08-14 2009-02-12 Tatsunori Kanai Method and system for performing real-time operation
US20160379115A1 (en) * 2015-06-29 2016-12-29 Microsoft Technology Licensing, Llc Deep neural network processing on hardware accelerators with stacked memory
US20170357891A1 (en) * 2016-05-26 2017-12-14 The Governing Council Of The University Of Toronto Accelerator for deep neural networks
KR20190013162A (ko) * 2017-07-31 2019-02-11 서울대학교산학협력단 컨볼루션 뉴럴 네트워크를 위한 하드웨어 가속기 및 컨볼루션 연산량 감소 방법
KR102023855B1 (ko) * 2018-12-05 2019-09-20 전자부품연구원 딥러닝 하드웨어 가속장치

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102001222B1 (ko) * 2015-07-07 2019-07-17 삼성전자주식회사 신호 처리 장치 및 방법
KR101847262B1 (ko) * 2016-03-18 2018-05-28 연세대학교 산학협력단 하드웨어 가속기를 포함하는 메인 메모리 및 메인 메모리의 동작 방법
KR101813251B1 (ko) * 2016-04-04 2017-12-29 윤성현 가속기-디지털 신호 프로세서 간 메모리 공유 기반의 연산장치 및 연산방법
KR102292389B1 (ko) * 2018-01-17 2021-08-25 한국전자통신연구원 원격 직접 메모리 접근을 통한 분산 처리 장치 및 그 방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090044188A1 (en) * 2003-08-14 2009-02-12 Tatsunori Kanai Method and system for performing real-time operation
US20160379115A1 (en) * 2015-06-29 2016-12-29 Microsoft Technology Licensing, Llc Deep neural network processing on hardware accelerators with stacked memory
US20170357891A1 (en) * 2016-05-26 2017-12-14 The Governing Council Of The University Of Toronto Accelerator for deep neural networks
KR20190013162A (ko) * 2017-07-31 2019-02-11 서울대학교산학협력단 컨볼루션 뉴럴 네트워크를 위한 하드웨어 가속기 및 컨볼루션 연산량 감소 방법
KR102023855B1 (ko) * 2018-12-05 2019-09-20 전자부품연구원 딥러닝 하드웨어 가속장치

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114372012A (zh) * 2021-12-21 2022-04-19 中国科学院深圳先进技术研究院 一种通用、可配置的高能效池化计算单行输出系统和方法
CN114372012B (zh) * 2021-12-21 2024-02-20 中国科学院深圳先进技术研究院 一种通用、可配置的高能效池化计算单行输出系统和方法

Also Published As

Publication number Publication date
KR20210061583A (ko) 2021-05-28
KR102334473B1 (ko) 2021-12-03

Similar Documents

Publication Publication Date Title
WO2017196142A2 (en) System and method for optimizing dram bus switching using llc
US6564271B2 (en) Method and apparatus for automatically transferring I/O blocks between a host system and a host adapter
US20050235072A1 (en) Data storage controller
US6868087B1 (en) Request queue manager in transfer controller with hub and ports
US7480747B2 (en) Method and apparatus to reduce latency and improve throughput of input/output data in a processor
JPH071495B2 (ja) データ処理システム
US20140104967A1 (en) Inter-memory data transfer control unit
KR20000053380A (ko) 다양한 기능 모듈 접속용 포트 매니저 제어기
WO2013111975A1 (en) Resource allocation method and apparatus of gpu
CN110109847A (zh) Apb总线多个主设备的仲裁方法、系统及存储介质
US7617344B2 (en) Methods and apparatus for controlling access to resources in an information processing system
CA2007737C (en) Data transfer operations between two asynchronous buses
KR100630071B1 (ko) 다중 프로세서 환경에서의 dma를 이용한 고속 데이터전송 방법 및 그 장치
WO2023096118A1 (ko) 스토리지 노드 기반의 키-값 스토어를 이용하는 데이터 입출력 방법
US6317813B1 (en) Method for arbitrating multiple memory access requests in a unified memory architecture via a non unified memory controller
WO2021100900A1 (ko) 적응형 딥러닝 가속 장치 및 방법
WO2012138111A2 (en) Dynamic random access memory for a semiconductor storage device-based system
JP2591502B2 (ja) 情報処理システムおよびそのバス調停方式
US7774513B2 (en) DMA circuit and computer system
WO2020153513A1 (ko) 딥러닝 가속 하드웨어 장치
WO2013027951A1 (ko) 멀티 코어 시스템의 인터럽트 할당 방법 및 장치
CN114579319B (zh) 显存管理方法、显存管理模块、soc及电子设备
CN107085557A (zh) 直接存储器访问系统以及相关方法
US7480739B1 (en) Segregated caching of linked lists for USB
WO2015105250A1 (en) Method for processing data in storage device and storage device

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: 19953240

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19953240

Country of ref document: EP

Kind code of ref document: A1