KR20230134747A - Neural processing device and method for controlling same - Google Patents
Neural processing device and method for controlling same Download PDFInfo
- Publication number
- KR20230134747A KR20230134747A KR1020220031890A KR20220031890A KR20230134747A KR 20230134747 A KR20230134747 A KR 20230134747A KR 1020220031890 A KR1020220031890 A KR 1020220031890A KR 20220031890 A KR20220031890 A KR 20220031890A KR 20230134747 A KR20230134747 A KR 20230134747A
- Authority
- KR
- South Korea
- Prior art keywords
- cgra
- engine
- memory
- processing device
- interconnection
- Prior art date
Links
- 238000012545 processing Methods 0.000 title claims abstract description 139
- 230000001537 neural effect Effects 0.000 title claims abstract description 101
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000015654 memory Effects 0.000 claims abstract description 265
- 238000012544 monitoring process Methods 0.000 claims abstract description 38
- 230000006835 compression Effects 0.000 claims description 29
- 238000007906 compression Methods 0.000 claims description 29
- 239000012190 activator Substances 0.000 claims description 14
- 230000006837 decompression Effects 0.000 claims description 11
- 230000003213 activating effect Effects 0.000 claims description 6
- 230000006870 function Effects 0.000 claims 1
- 210000000118 neural pathway Anatomy 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 60
- 238000013135 deep learning Methods 0.000 description 32
- 238000013528 artificial neural network Methods 0.000 description 25
- 238000004364 calculation method Methods 0.000 description 24
- 230000036961 partial effect Effects 0.000 description 11
- 238000013519 translation Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 9
- 238000003062 neural network model Methods 0.000 description 9
- 238000005457 optimization Methods 0.000 description 7
- 230000006978 adaptation Effects 0.000 description 6
- 238000013473 artificial intelligence Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 5
- 238000012549 training Methods 0.000 description 5
- 238000012546 transfer Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 210000004027 cell Anatomy 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 4
- 238000010801 machine learning Methods 0.000 description 4
- 210000000225 synapse Anatomy 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000013529 biological neural network Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 2
- 238000013136 deep learning model Methods 0.000 description 2
- 238000006731 degradation reaction Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000013139 quantization Methods 0.000 description 2
- 241001522296 Erithacus rubecula Species 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000001149 cognitive effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000002071 nanotube Substances 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000002829 reductive effect Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- 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
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Quality & Reliability (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Neurology (AREA)
- Molecular Biology (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Advance Control (AREA)
Abstract
본 발명은 뉴럴 프로세싱 장치 및 그 제어 방법을 개시한다. 상기 뉴럴 프로세싱 장치는, 적어도 하나의 CGRA 엔진을 각각 포함하는 적어도 하나의 CGRA 엔진 그룹, 상기 적어도 하나의 CGRA 엔진 그룹이 서로 공유하는 L2 메모리, 상기 적어도 하나의 CGRA 엔진 그룹 및 상기 L2 메모리 사이에서 서로 데이터를 교환하는 L2 인터커넥션 및 상기 적어도 하나의 CGRA 엔진 및 상기 L2 인터커넥션과 상기 적어도 하나의 CGRA 엔진 사이의 퍼포먼스에 대한 모니터링 정보를 수신하고, 상기 모니터링 정보에 따라 상기 적어도 하나의 CGRA 엔진, 상기 L2 메모리 및 상기 L2 인터커넥션 중 적어도 하나에 대해 하드웨어 리소스를 개별적으로 제공하는 시퀀서를 포함한다.The present invention discloses a neural processing device and a control method thereof. The neural processing device includes at least one CGRA engine group each including at least one CGRA engine, an L2 memory shared by the at least one CGRA engine group, and an L2 memory shared between the at least one CGRA engine group and the L2 memory. Receive monitoring information about performance between an L2 interconnection and the at least one CGRA engine for exchanging data and the L2 interconnection and the at least one CGRA engine, and according to the monitoring information, the at least one CGRA engine, the It includes a sequencer that individually provides hardware resources for at least one of the L2 memory and the L2 interconnection.
Description
본 발명은 뉴럴 프로세싱 장치 및 그 제어 방법에 관한 것이다. 구체적으로, 본 발명은 하드웨어 리소스의 효율적인 배분이 가능한 뉴럴 프로세싱 장치 및 그 제어 방법에 관한 것이다.The present invention relates to a neural processing device and a control method thereof. Specifically, the present invention relates to a neural processing device capable of efficient distribution of hardware resources and a control method thereof.
지난 몇년간, 인공지능(Artificial Intelligence) 기술은 4차 산업혁명의 핵심 기술로 전세계적으로 가장 유망한 기술로 거론되고 있다. 이러한 인공지능 기술의 가장 큰 문제는 컴퓨팅 성능이다. 인간의 학습능력과 추론능력, 지각능력, 자연언어의 이행능력 등을 실현해내는 인공지능 기술은 많은 데이터를 빠르게 처리하는 것이 가장 중요하다.Over the past few years, artificial intelligence (AI) technology has been mentioned as the most promising technology worldwide as a core technology of the 4th Industrial Revolution. The biggest problem with these artificial intelligence technologies is computing performance. For artificial intelligence technology that realizes human learning, reasoning, perception, and natural language translation abilities, the most important thing is to quickly process a lot of data.
초기 인공지능의 딥러닝 학습과 추론에는 기성 컴퓨터의 중앙처리장치(CPU; Central processing unit)나 그래픽처리장치(GPU; Graphics Processing Unit)가 쓰였지만, 높은 워크 로드를 가지는 딥러닝 학습 및 추론의 작업에는 한계가 있어 구조적으로 딥러닝 작업에 특화된 신경망 처리 장치(NPU; Neural Processing Unit)가 각광받고 있다.The central processing unit (CPU) or graphics processing unit (GPU) of existing computers were used for deep learning learning and inference in early artificial intelligence, but deep learning learning and inference tasks with a high workload were used. Due to its limitations, the Neural Processing Unit (NPU), which is structurally specialized for deep learning tasks, is gaining attention.
이러한 신경망 처리 장치는 내부에 많은 수의 프로세싱 엘리먼트와 프로세서 구조를 포함하고 있고, 각각의 구조가 작업에 최적화되어 수행할 수 있도록 여러 레벨의 계층적 구조를 가질 수 있다. 이러한 계층적 구조는 딥러닝 작업에 최적화된 단위로 구성될 때 가장 높은 효율을 발휘할 수 있다.This neural network processing device contains a large number of processing elements and processor structures internally, and may have a hierarchical structure of several levels so that each structure can perform tasks optimally. This hierarchical structure can achieve the highest efficiency when composed of units optimized for deep learning tasks.
본 발명의 과제는, 재구성 가능한 하드웨어의 리소스를 실시간으로 제어하는 뉴럴 프로세싱 장치를 제공하는 것이다.The object of the present invention is to provide a neural processing device that controls reconfigurable hardware resources in real time.
또한, 본 발명의 다른 과제는, 재구성 가능한 하드웨어의 리소스를 실시간으로 제어하는 뉴럴 프로세싱 장치의 제어 방법을 제공하는 것이다.Additionally, another object of the present invention is to provide a control method for a neural processing device that controls reconfigurable hardware resources in real time.
본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the objects mentioned above, and other objects and advantages of the present invention that are not mentioned can be understood by the following description and will be more clearly understood by the examples of the present invention. Additionally, it will be readily apparent that the objects and advantages of the present invention can be realized by the means and combinations thereof indicated in the patent claims.
상기 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치는, 적어도 하나의 CGRA 엔진을 각각 포함하는 적어도 하나의 CGRA 엔진 그룹, 상기 적어도 하나의 CGRA 엔진 그룹이 서로 공유하는 L2 메모리, 상기 적어도 하나의 CGRA 엔진 그룹 및 상기 L2 메모리 사이에서 서로 데이터를 교환하는 L2 인터커넥션 및 상기 적어도 하나의 CGRA 엔진 및 상기 L2 인터커넥션과 상기 적어도 하나의 CGRA 엔진 사이의 퍼포먼스에 대한 모니터링 정보를 수신하고, 상기 모니터링 정보에 따라 상기 적어도 하나의 CGRA 엔진, 상기 L2 메모리 및 상기 L2 인터커넥션 중 적어도 하나에 대해 하드웨어 리소스를 개별적으로 제공하는 시퀀서를 포함한다.A neural processing device according to some embodiments of the present invention for solving the above problems includes at least one CGRA engine group each including at least one CGRA engine, an L2 memory shared by the at least one CGRA engine group, and Receive monitoring information about an L2 interconnection for exchanging data between at least one CGRA engine group and the L2 memory and performance between the at least one CGRA engine and the L2 interconnection and the at least one CGRA engine, and a sequencer that individually provides hardware resources to at least one of the at least one CGRA engine, the L2 memory, and the L2 interconnection according to the monitoring information.
또한, 상기 모니터링 정보는 상기 적어도 하나의 CGRA 엔진의 밴드위스, 레이턴시, 공급전력 및 온도 중 적어도 하나를 포함할 수 있다.Additionally, the monitoring information may include at least one of bandwidth, latency, supply power, and temperature of the at least one CGRA engine.
또한, 상기 시퀀서는, 상기 적어도 하나의 CGRA 엔진에 대한 모니터링 정보와 상기 L2 인터커넥션과 상기 적어도 하나의 CGRA 엔진 사이의 트래픽에 대한 모니터링 정보를 수신하여 성능 문제를 검출하는 모니터링 모듈과, 상기 성능 문제가 연산 성능 제한인 경우, 상기 적어도 하나의 CGRA 엔진의 성능 상승 제어를 수행하는 프로세서 컨트롤러와, 상기 성능 문제가 밴드위스 제한인 경우, 상기 L2 메모리 또는 상기 L2 메모리와 데이터를 교환하는 오프 칩 메모리의 트래픽 하향 제어를 수행하는 컴프레션 액티베이터와, 상기 성능 문제가 밴드위스 제한인 경우, 상기 L2 인터커넥션의 성능 상승 제어를 수행하는 인터커넥트 컨트롤러를 포함할 수 있다.Additionally, the sequencer includes a monitoring module configured to detect performance problems by receiving monitoring information about the at least one CGRA engine and monitoring information about traffic between the L2 interconnection and the at least one CGRA engine, and When the performance problem is limited by the computational performance, a processor controller that performs performance increase control of the at least one CGRA engine, and when the performance problem is a bandwidth limitation, the L2 memory or an off-chip memory that exchanges data with the L2 memory. It may include a compression activator that performs traffic downward control, and an interconnect controller that performs performance increase control of the L2 interconnection when the performance problem is bandwidth limitation.
또한, 상기 프로세서 컨트롤러는, 상기 적어도 하나의 CGRA 엔진의 공급전력 및 프리퀀시 중 적어도 하나를 높이는 프로세서 제어 신호를 생성할 수 있다.Additionally, the processor controller may generate a processor control signal that increases at least one of the supply power and frequency of the at least one CGRA engine.
또한, 상기 컴프레션 액티베이터는, 상기 L2 메모리 또는 상기 오프 칩 메모리의 트래픽을 압축시키는 트래픽 컴프레션 엔진과, 상기 트래픽을 압축해제하는 트래픽 디컴프레션 엔진 중 적어도 하나를 활성화시키는 메모리 제어 신호를 생성할 수 있다.Additionally, the compression activator may generate a memory control signal that activates at least one of a traffic compression engine that compresses traffic in the L2 memory or the off-chip memory and a traffic decompression engine that decompresses the traffic.
또한, 상기 시퀀서는 연산 작업의 작업 특성을 수신하고, 상기 작업 특성에 따라 상기 적어도 하나의 CGRA 엔진, 상기 L2 메모리 및 상기 L2 인터커넥션 중 적어도 하나에 대해 전압 및 프리퀀시 중 적어도 하나를 조절할 수 있다.Additionally, the sequencer may receive operation characteristics of an operation task and adjust at least one of voltage and frequency for at least one of the at least one CGRA engine, the L2 memory, and the L2 interconnection according to the operation characteristics.
또한, 상기 시퀀서는 가상 디바이스 현황을 수신하고, 상기 가상 디바이스 현황에 따라 상기 적어도 하나의 CGRA 엔진, 상기 L2 메모리 및 상기 L2 인터커넥션 중 적어도 하나에 대해 전압 및 프리퀀시 중 적어도 하나를 조절할 수 있다.Additionally, the sequencer may receive virtual device status and adjust at least one of voltage and frequency for at least one of the at least one CGRA engine, the L2 memory, and the L2 interconnection according to the virtual device status.
또한, 상기 적어도 하나의 CGRA 엔진 그룹을 포함하는 CGRA 엔진 클러스터(CGRA Engine Cluster)를 더 포함하고, 상기 시퀀서는, 상기 CGRA 엔진 클러스터 내의 상기 적어도 하나의 CGRA 엔진 그룹을 관리하는 상부 시퀀서와, 상기 적어도 하나의 CGRA 엔진 그룹 내의 상기 적어도 하나의 CGRA 엔진을 관리하는 하부 시퀀서를 포함할 수 있다.In addition, it further includes a CGRA Engine Cluster including the at least one CGRA engine group, wherein the sequencer includes an upper sequencer that manages the at least one CGRA engine group within the CGRA engine cluster, and the at least It may include a lower sequencer that manages the at least one CGRA engine within one CGRA engine group.
또한, 상기 CGRA 엔진 클러스터는 서로 다른 제1 및 제2 CGRA 엔진 그룹을 포함하고, 상기 하부 시퀀서는 상기 제1 및 제2 CGRA 엔진 그룹에 각각 대응되는 제1 및 제2 하부 시퀀서를 포함할 수 있다.In addition, the CGRA engine cluster may include different first and second CGRA engine groups, and the lower sequencer may include first and second lower sequencers corresponding to the first and second CGRA engine groups, respectively. .
상기 다른 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 제어 방법은, 적어도 하나의 CGRA 엔진을 각각 포함하는 제1 및 제2 CGRA 엔진 그룹과, 상기 제1 및 제2 CGRA 엔진 그룹이 공유하는 L2 메모리와, 상기 L2 메모리와 상기 제1 및 제2 CGRA 엔진 그룹 사이에서 데이터를 전송하는 L2 인터커넥션 중 적어도 하나와 관련된 모니터링 정보를 수신하고, 상기 모니터링 정보를 통해서 성능 문제를 검출하고, 상기 성능 문제가 상기 연산 성능 제한인 경우, 상기 적어도 하나의 CGRA 엔진의 성능 상승 제어를 수행하는 것을 포함할 수 있다.A control method of a neural processing device according to some embodiments of the present invention for solving the above other problems includes first and second CGRA engine groups each including at least one CGRA engine, and the first and second CGRA engines. Receive monitoring information related to at least one of an L2 memory shared by a group and an L2 interconnection that transmits data between the L2 memory and the first and second CGRA engine groups, and detect performance problems through the monitoring information. And, when the performance problem is the computational performance limitation, it may include performing performance increase control of the at least one CGRA engine.
또한, 상기 성능 문제가 오프 칩 메모리 제한인지를 판단하고, 상기 성능 문제가 상기 오프 칩 메모리 제한인 경우 상기 오프 칩 메모리 트래픽을 하향 제어하는 것을 더 포함할 수 있다.Additionally, the method may further include determining whether the performance problem is an off-chip memory limitation, and downwardly controlling the off-chip memory traffic if the performance problem is an off-chip memory limitation.
또한, 상기 오프 칩 메모리 트래픽을 하향 제어하는 것은, 상기 오프 칩 메모리 트래픽의 컴프레션 엔진을 활성화시키는 것을 포함할 수 있다.Additionally, downwardly controlling the off-chip memory traffic may include activating a compression engine of the off-chip memory traffic.
또한, 상기 성능 문제가 상기 L2 메모리 제한인지를 판단하고, 상기 성능 문제가 상기 L2 메모리 제한인 경우, 상기 L2 메모리 트래픽을 하향 제어하는 것을 더 포함할 수 있다.Additionally, the method may further include determining whether the performance problem is a limitation of the L2 memory and, if the performance problem is a limitation of the L2 memory, downwardly controlling the L2 memory traffic.
또한, 상기 L2 메모리 트래픽을 하향 제어하는 것은, 상기 L2 메모리 트래픽의 컴프레션 엔진을 활성화시키는 것을 포함할 수 있다.Additionally, downward controlling the L2 memory traffic may include activating a compression engine of the L2 memory traffic.
또한, 상기 성능 문제가 상기 L2 메모리 제한이 아닌 경우, 상기 L2 인터커넥션의 성능을 상승 제어하는 것을 더 포함할 수 있다.Additionally, if the performance problem is not the L2 memory limitation, the method may further include controlling the performance of the L2 interconnection to increase.
또한, 상기 L2 인터커넥션의 성능을 상승 제어하는 것은, 상기 L2 인터커넥션의 프리퀀시를 오버드라이브하는 것을 포함할 수 있다.Additionally, controlling the performance of the L2 interconnection to increase may include overdriving the frequency of the L2 interconnection.
상기 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치는, 적어도 하나의 CGRA 엔진을 각각 포함하는 적어도 하나의 CGRA 엔진 그룹으로서, 상기 적어도 하나의 CGRA 엔진은 적어도 하나의 VP(virtual Processor)를 구현하는, 적어도 하나의 CGRA 엔진 그룹, 상기 적어도 하나의 CGRA 엔진 그룹이 서로 공유하는 L2 메모리, 상기 적어도 하나의 CGRA 엔진 그룹 및 상기 L2 메모리 사이에서 서로 데이터를 교환하는 L2 인터커넥션 및 상기 VP의 현황에 따라서 상기 적어도 하나의 CGRA 엔진의 전압 및/또는 프리퀀시를 실시간으로 스케일링하는 시퀀서를 포함한다.A neural processing device according to some embodiments of the present invention for solving the above problems is at least one CGRA engine group, each including at least one CGRA engine, wherein the at least one CGRA engine includes at least one VP (virtual processor) ), at least one CGRA engine group, an L2 memory shared by the at least one CGRA engine group, an L2 interconnection for exchanging data between the at least one CGRA engine group and the L2 memory, and the VP and a sequencer that scales the voltage and/or frequency of the at least one CGRA engine in real time according to the status of.
또한, 상기 적어도 하나의 CGRA 엔진의 수는 상기 적어도 하나의 VP의 수와 서로 다를 수 있다.Additionally, the number of the at least one CGRA engine may be different from the number of the at least one VP.
또한, 상기 VP의 현황은 상기 적어도 하나의 VP와 상기 적어도 하나의 CGRA 엔진의 대응 관계에 따라 결정될 수 있다.Additionally, the status of the VP may be determined according to the correspondence relationship between the at least one VP and the at least one CGRA engine.
본 발명의 뉴럴 프로세싱 장치는 다양한 계층적 구조를 가지는 프로세서의 개별적인 중요도를 판별하여 하드웨어 리소스를 제공하므로 중요도에 따른 작업의 수행이 가능할 수 있다.The neural processing device of the present invention determines the individual importance of processors with various hierarchical structures and provides hardware resources, so it is possible to perform tasks according to importance.
또한, 제한된 하드웨어 리소스를 최적의 효율로 사용하여 연산 작업의 효율을 극대화시킬 수 있다.Additionally, the efficiency of computational tasks can be maximized by using limited hardware resources with optimal efficiency.
상술한 내용과 더불어 본 발명의 구체적인 효과는 이하 발명을 실시하기 위한 구체적인 사항을 설명하면서 함께 기술한다.In addition to the above-described content, specific effects of the present invention are described below while explaining specific details for carrying out the invention.
도 1은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템을 설명하기 위한 블록도이다.
도 2는 도 1의 뉴럴 프로세싱 장치를 세부적으로 설명하기 위한 블록도이다.
도 3은 도 2의 뉴럴 코어 SoC를 세부적으로 설명하기 위한 블록도이다.
도 4는 도 3의 CGRA 엔진 그룹(CGRA Engine Group)를 세부적으로 설명하기 위한 블록도이다.
도 5는 도 3의 CGRA 엔진 그룹의 하드웨어 구조를 설명하기 위한 개념도이다.
도 6은 뉴럴 코어 SoC의 계층적 구조를 설명하기 위한 개념도이다.
도 7은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명하기 위한 개념도이다.
도 8은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명하기 위한 개념도이다.
도 9는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명하기 위한 개념도이다.
도 10은 도 3의 시퀀서의 동작을 설명하기 위한 개념도이다.
도 11은 도 3의 시퀀서의 모니터링 및 제어 동작을 설명하기 위한 블록도이다.
도 12는 도 3의 시퀀서의 작업 특성에 따른 DVFS(Dynamic Voltage Frequency Scaling)을 설명하기 위한 개념도이다.
도 13은 도 3의 시퀀서의 가상 장치 상태에 따른 DVFS을 설명하기 위한 개념도이다.
도 14는 도 3의 시퀀서의 구조를 세부적으로 설명하기 위한 블록도이다.
도 15는 도 4의 CGRA 엔진의 구조를 세부적으로 설명하기 위한 블록도이다.
도 16은 도 15의 인스트럭션 메모리를 세부적으로 설명하기 위한 개념도이다.
도 17은 도 15의 프로세싱 엘리먼트를 세부적으로 설명하기 위한 도면이다.
도 18은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 ISA(Instruction Set Architecture)를 설명하기 위한 도면이다.
도 19는 도 4의 CGRA 엔진에서 인스트럭션 큐의 동작을 설명하기 위한 블록도이다.
도 20은 도 15의 LSU을 세부적으로 설명하기 위한 블록도이다.
도 21은 도 15의 L0 메모리를 세부적으로 설명하기 위한 블록도이다.
도 22는 도 21의 L0 메모리 뱅크를 세부적으로 설명하기 위한 블록도이다.
도 23은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조를 설명하기 위한 블록도이다.
도 24는 도 23의 CGRA 컴파일러의 구조를 세부적으로 설명하기 위한 블록도이다.
도 25는 도 24의 CGRA 엔진 스케쥴러의 구조를 세부적으로 설명하기 위한 블록도이다.
도 26은 도 25의 제한 모듈에 따라 컴파일된 CGRA 엔진을 설명하기 위한 블록도이다.
도 27은 도 23의 프론트엔드 컴파일러의 구조를 세부적으로 설명하기 위한 블록도이다.
도 28은 도 23의 백엔드 컴파일러의 구조를 세부적으로 설명하기 위한 블록도이다.
도 29는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치가 수행하는 딥 러닝 연산을 설명하기 위한 개념도이다.
도 30은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 뉴럴 네트워크의 학습 및 추론 동작을 설명하기 위한 개념도이다.
도 31은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 제어 방법을 설명하기 위한 순서도이다.
도 32는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 컴파일링 방법을 설명하기 위한 순서도이다.
도 33은 도 32의 저장 단계를 세부적으로 설명하기 위한 순서도이다.
도 34는 도 33의 저장 단계를 스케쥴링 단계를 세부적으로 설명하기 위한 순서도이다.
도 35는 도 32의 바이너리 코드 생성 단계를 세부적으로 설명하기 위한 순서도이다.1 is a block diagram for explaining a neural processing system according to some embodiments of the present invention.
FIG. 2 is a block diagram for explaining the neural processing device of FIG. 1 in detail.
FIG. 3 is a block diagram for explaining the neural core SoC of FIG. 2 in detail.
FIG. 4 is a block diagram for explaining in detail the CGRA Engine Group of FIG. 3.
FIG. 5 is a conceptual diagram for explaining the hardware structure of the CGRA engine group of FIG. 3.
Figure 6 is a conceptual diagram to explain the hierarchical structure of the neural core SoC.
Figure 7 is a conceptual diagram for explaining a neural processing device according to some embodiments of the present invention.
Figure 8 is a conceptual diagram for explaining a neural processing device according to some embodiments of the present invention.
Figure 9 is a conceptual diagram for explaining a neural processing device according to some embodiments of the present invention.
FIG. 10 is a conceptual diagram for explaining the operation of the sequencer of FIG. 3.
FIG. 11 is a block diagram for explaining monitoring and control operations of the sequencer of FIG. 3.
FIG. 12 is a conceptual diagram for explaining Dynamic Voltage Frequency Scaling (DVFS) according to the operation characteristics of the sequencer of FIG. 3.
FIG. 13 is a conceptual diagram for explaining DVFS according to the virtual device state of the sequencer of FIG. 3.
FIG. 14 is a block diagram for explaining in detail the structure of the sequencer of FIG. 3.
FIG. 15 is a block diagram for explaining in detail the structure of the CGRA engine of FIG. 4.
FIG. 16 is a conceptual diagram for explaining the instruction memory of FIG. 15 in detail.
FIG. 17 is a diagram for explaining the processing element of FIG. 15 in detail.
FIG. 18 is a diagram illustrating the Instruction Set Architecture (ISA) of a neural processing device according to some embodiments of the present invention.
FIG. 19 is a block diagram for explaining the operation of the instruction queue in the CGRA engine of FIG. 4.
FIG. 20 is a block diagram for explaining the LSU of FIG. 15 in detail.
FIG. 21 is a block diagram for explaining the L0 memory of FIG. 15 in detail.
FIG. 22 is a block diagram for explaining the L0 memory bank of FIG. 21 in detail.
FIG. 23 is a block diagram illustrating the software hierarchy of a neural processing device according to some embodiments of the present invention.
FIG. 24 is a block diagram to explain in detail the structure of the CGRA compiler of FIG. 23.
Figure 25 is a block diagram to explain in detail the structure of the CGRA engine scheduler of Figure 24.
FIG. 26 is a block diagram for explaining the CGRA engine compiled according to the restriction module of FIG. 25.
Figure 27 is a block diagram to explain in detail the structure of the front-end compiler of Figure 23.
FIG. 28 is a block diagram for explaining in detail the structure of the backend compiler of FIG. 23.
Figure 29 is a conceptual diagram to explain a deep learning operation performed by a neural processing device according to some embodiments of the present invention.
FIG. 30 is a conceptual diagram illustrating learning and inference operations of a neural network of a neural processing device according to some embodiments of the present invention.
31 is a flowchart illustrating a control method of a neural processing device according to some embodiments of the present invention.
Figure 32 is a flowchart for explaining a compilation method of a neural processing device according to some embodiments of the present invention.
FIG. 33 is a flowchart for explaining the storage step of FIG. 32 in detail.
FIG. 34 is a flowchart illustrating the scheduling step of the storage step of FIG. 33 in detail.
FIG. 35 is a flowchart illustrating in detail the binary code generation step of FIG. 32.
본 명세서 및 특허청구범위에서 사용된 용어나 단어는 일반적이거나 사전적인 의미로 한정하여 해석되어서는 아니된다. 발명자가 그 자신의 발명을 최선의 방법으로 설명하기 위해 용어나 단어의 개념을 정의할 수 있다는 원칙에 따라, 본 발명의 기술적 사상과 부합하는 의미와 개념으로 해석되어야 한다. 또한, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명이 실현되는 하나의 실시예에 불과하고, 본 발명의 기술적 사상을 전부 대변하는 것이 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형 및 응용 가능한 예들이 있을 수 있음을 이해하여야 한다.Terms or words used in this specification and patent claims should not be construed as limited to their general or dictionary meaning. According to the principle that the inventor can define terms or word concepts in order to explain his or her invention in the best way, it should be interpreted with a meaning and concept consistent with the technical idea of the present invention. In addition, the embodiments described in this specification and the configurations shown in the drawings are only one embodiment of the present invention and do not completely represent the technical idea of the present invention, so they cannot be replaced at the time of filing the present application. It should be understood that there may be various equivalents, variations, and applicable examples.
본 명세서 및 특허청구범위에서 사용된 제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. '및/또는' 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B used in the present specification and claims may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, a first component may be named a second component, and similarly, the second component may also be named a first component without departing from the scope of the present invention. The term 'and/or' includes any of a plurality of related stated items or a combination of a plurality of related stated items.
본 명세서 및 특허청구범위에서 사용된 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서 "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the specification and claims are merely used to describe specific embodiments and are not intended to limit the invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, terms such as "include" or "have" should be understood as not precluding the existence or addition possibility of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification. .
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해서 일반적으로 이해되는 것과 동일한 의미를 가지고 있다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as generally understood by a person of ordinary skill in the technical field to which the present invention pertains.
일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Terms defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related technology, and unless clearly defined in the present application, should not be interpreted in an ideal or excessively formal sense. No.
또한, 본 발명의 각 실시예에 포함된 각 구성, 과정, 공정 또는 방법 등은 기술적으로 상호 간 모순되지 않는 범위 내에서 공유될 수 있다. Additionally, each configuration, process, process, or method included in each embodiment of the present invention may be shared within the scope of not being technically contradictory to each other.
이하, 도 1 내지 도 30을 참조하여, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명한다.Hereinafter, a neural processing device according to some embodiments of the present invention will be described with reference to FIGS. 1 to 30.
도 1은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템을 설명하기 위한 블록도이다.1 is a block diagram for explaining a neural processing system according to some embodiments of the present invention.
도 1을 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 제1 뉴럴 프로세싱 장치(1), 제2 뉴럴 프로세싱 장치(2) 및 외부 인터페이스(3)를 포함할 수 있다.Referring to FIG. 1, a neural processing system (NPS) according to some embodiments of the present invention may include a first
제1 뉴럴 프로세싱 장치(1)는 인공 신경망을 이용하여 연산을 수행하는 장치일 수 있다. 제1 뉴럴 프로세싱 장치(1)는 예를 들어, 딥 러닝(deep learning) 연산 작업을 수행하는 것에 특화된 장치일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first
제2 뉴럴 프로세싱 장치(2)는 제1 뉴럴 프로세싱 장치(1)와 동일 내지 유사한 구성을 가지는 장치일 수 있다. 제1 뉴럴 프로세싱 장치(1) 및 제2 뉴럴 프로세싱 장치(2)는 서로 외부 인터페이스(3)를 통해서 연결되어 데이터 및 제어 신호를 공유할 수 있다.The second
도 1에서는 2개의 뉴럴 프로세싱 장치를 도시하였지만, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)이 이에 제한되는 것은 아니다. 즉, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 3개 이상의 뉴럴 프로세싱 장치가 외부 인터페이스(3)를 통해서 서로 연결될 수도 있다. 또한, 반대로, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 하나의 뉴럴 프로세싱 장치만을 포함할 수도 있다.Although FIG. 1 shows two neural processing devices, the neural processing system (NPS) according to some embodiments of the present invention is not limited thereto. That is, in the neural processing system (NPS) according to some embodiments of the present invention, three or more neural processing devices may be connected to each other through the
도 2는 도 1의 뉴럴 프로세싱 장치를 세부적으로 설명하기 위한 블록도이다.FIG. 2 is a block diagram for explaining the neural processing device of FIG. 1 in detail.
도 2를 참조하면, 제1 뉴럴 프로세싱 장치(1)는 뉴럴 코어 SoC(10), CPU(20), 오프 칩 메모리(30), 제1 비휘발성 메모리 인터페이스(40), 제1 휘발성 메모리 인터페이스(50), 제2 비휘발성 메모리 인터페이스(60) 및 제2 휘발성 메모리 인터페이스(70)를 포함할 수 있다.Referring to FIG. 2, the first
뉴럴 코어 SoC(10)는 시스템 온 칩(System on Chip) 장치일 수 있다. 뉴럴 코어 SoC(10)는 인공지능 연산 장치로 가속기(Accelerator)일 수 있다. 뉴럴 코어 SoC(10)는 예를 들어, GPU(graphics processing unit), FPGA(field programmable gate array) 및 ASIC(application-specific integrated circuit) 중 어느 하나일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The
뉴럴 코어 SoC(10)는 외부 인터페이스(3)를 통해서 다른 외부의 연산 장치들과 데이터를 교환할 수 있다. 또한, 뉴럴 코어 SoC(10)는 제1 비휘발성 메모리 인터페이스(40) 및 제1 휘발성 메모리 인터페이스(50)를 통해서 각각 비휘발성 메모리(31) 및 휘발성 메모리(32)와 연결될 수 있다.The neural core SoC (10) can exchange data with other external computing devices through the external interface (3). Additionally, the
CPU(20)는 제1 뉴럴 프로세싱 장치(1)의 시스템을 통제하고 프로그램의 연산을 실행하는 제어장치일 수 있다. CPU(20)는 범용 연산 장치로서 딥러닝에 많이 사용되는 병렬 단순 연산을 수행하기에는 효율이 낮을 수 있다. 따라서, 뉴럴 코어 SoC(10)가 딥러닝 추론 및 학습 작업에 연산을 수행하여 높은 효율을 가질 수 있다.The
CPU(20)는 외부 인터페이스(3)를 통해서 다른 외부의 연산 장치들과 데이터를 교환할 수 있다. 또한, CPU(20)는 제2 비휘발성 메모리 인터페이스(60) 및 제2 휘발성 메모리 인터페이스(70)를 통해서 각각 비휘발성 메모리(31) 및 휘발성 메모리(32)와 연결될 수 있다.The
오프 칩 메모리(30)는 뉴럴 코어 SoC(10)의 칩 외부에 배치된 메모리일 수 있다. 오프 칩 메모리(30)는 비휘발성 메모리(31) 및 휘발성 메모리(32)를 포함할 수 있다.The off-
비휘발성 메모리(31)는 전원이 공급되지 않아도 저장된 정보를 계속 유지하는 메모리일 수 있다. 비휘발성 메모리(31)는 예를 들어, ROM(Read-Only Memory), PROM(Programmable Read-Only Memory), EAROM(Erasable Alterable ROM), EPROM(Erasable Programmable Read-Only Memory), EEPROM(Electrically Erasable Programmable Read-Only Memory)(예를 들어, 낸드 플래시 메모리(NAND Flash memory), 노어 플래시 메모리(NOR Flash memory), UVEPROM(Ultra-Violet Erasable Programmable Read-Only Memory), FeRAM(Ferroelectric Random Access Memory), MRAM(Magnetoresistive Random Access Memory), PRAM(Phase-change Random Access Memory), SONOS(silicon-oxide-nitride-oxide-silicon), RRAM(Resistive Random Access Memory), NRAM(Nanotube Random Access Memory), 마그네틱 컴퓨터 기억 장치(예를 들면, 하드 디스크, 디스켓 드라이브, 마그네틱 테이프), 광디스크 드라이브 및 3D 크로스포인트 메모리(3D XPoint memory) 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The
휘발성 메모리(32)는 비휘발성 메모리(31)와 달리, 저장된 정보를 유지하기 위해서 전력을 지속적으로 필요로 하는 메모리일 수 있다. 휘발성 메모리(32)는 예를 들어, DRAM(Dynamic Random Access Memory), SRAM(Static Random Access Memory), SDRAM(Synchronous Dynamic Random Access Memory) 및 DDR SDRAM(Double Data Rate SDRAM) 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.Unlike the
제1 비휘발성 메모리 인터페이스(40) 및 제2 비휘발성 메모리 인터페이스(60)는 각각 예를 들어, PATA(Parallel Advanced Technology Attachment), SCSI(Small Computer System Interface), SAS(Serial Attached SCSI), SATA(Serial Advanced Technology Attachment) 및 PCIe(PCI Express) 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first
제1 휘발성 메모리 인터페이스(50) 및 제2 휘발성 메모리 인터페이스(70)는 각각 예를 들어, SDR(Single Data Rate), DDR(Double Data Rate), QDR(Quad Data Rate), 및 XDR(eXtreme Data Rate, Octal Data Rate) 중 적어도 하나일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first
도 3은 도 2의 뉴럴 코어 SoC를 세부적으로 설명하기 위한 블록도이다.FIG. 3 is a block diagram for explaining the neural core SoC of FIG. 2 in detail.
도 2 및 도 3을 참조하면, 뉴럴 코어 SoC(10)는 CGRA 엔진 클러스터(CGRA Engine Cluster)(100), L2 메모리(300), DMA(Direct Memory Access)(400), 비휘발성 메모리 컨트롤러(500), 휘발성 메모리 컨트롤러(600) 및 L2 인터커넥션(700)을 포함할 수 있다.2 and 3, the
CGRA 엔진 클러스터(100)는 복수의 CGRA 엔진 그룹(CGRA Engine Group)(110)를 포함할 수 있다. CGRA 엔진 클러스터(100)는 도면에서 1개인 것으로 도시되었지만, 본 실시예가 이에 제한되는 것은 아니다. The
CGRA 엔진 그룹(110)은 연산 작업을 직접 수행하는 연산 장치일 수 있다. CGRA 엔진 그룹(110)이 복수인 경우 연산 작업은 각각의 CGRA 엔진 그룹(110)로 할당될 수 있다. 각각의 CGRA 엔진 그룹(110)은 L2 인터커넥션(700)을 통해서 서로 연결될 수 있다.The
시퀀서(200)는 CGRA 엔진 그룹(110)에 대해서 개별적으로 하드웨어 리소스를 제공할 수 있다. 즉, 시퀀서(200)의 판단에 따라서 CGRA 엔진 그룹(110)의 작업의 중요도가 결정되고, 그에 따라서 하드웨어 리소스가 차등하여 제공될 수 있다. 이때, 하드웨어 리소스는 전압, 전력, 프리퀀시 및 밴드위스 중 적어도 하나를 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The
시퀀서(200)는 CGRA 엔진 클러스터(100) 내의 여러 CGRA 엔진 그룹(110)의 동작을 모니터링하고 그에 따라 하드웨어 리소스를 각각의 CGRA 엔진 그룹(110)에 제공할 수 있다. 시퀀서(200)는 CGRA 엔진 그룹(110)의 다양한 성능 파라미터를 모니터링할 수 있다. 시퀀서(200)는 모니터링에 의해서 판단된 성능 문제를 검출하고 그에 따른 하드웨어 리소스 제공을 수행할 수 있다. 이에 따라서, CGRA 엔진 그룹(110)은 다양한 연산 작업을 시퀀서(200)의 지시에 따라 효율적으로 수행할 수 있다.The
시퀀서(200)의 중요도 판단은 다양한 기준에 의해서 이루어질 수 있다. 먼저, 시퀀서는 QoS(Quality of Service)에 따라 중요도를 판단할 수 있다. 즉, 특정 수준의 성능을 보장하기 위한 우선 순위 선정 방식이 시퀀서(200)에 의해서 사용될 수 있다. The importance of the
또한, 시퀀서(200)는 SLO(Service Level Objectives)에 따라 중요도를 판단할 수 있다. 이러한 SLO는 미리 적절한 값으로 설정될 수 있고, 추후 다양한 방식으로 업데이트될 수 있다.Additionally, the
즉, 시퀀서(200)는 QoS 및/또는 SLO 등의 기준에 의해서 작업의 중요도를 판단하고, 그에 따라 하드웨어 리소스를 제공할 수 있다.That is, the
L2 메모리(300)는 여러 CGRA 엔진 그룹(110)에 의해서 공유되는 메모리일 수 있다. L2 메모리(300)는 각각의 CGRA 엔진 그룹(110)의 데이터를 저장할 수 있다. 또한, L2 메모리(300)는 오프 칩 메모리(30)로부터 데이터를 수신하여 일시적으로 저장하고 각각의 CGRA 엔진 그룹(110)로 전달할 수 있다. 반대로, L2 메모리(300)는 CGRA 엔진 그룹(110)로부터 데이터를 수신하여 일시적으로 저장하고 오프 칩 메모리(30)로 전달할 수도 있다. The
L2 메모리(300)는 상대적으로 속도가 빠른 메모리가 필요할 수 있다. 이에 따라서, L2 메모리(300)는 예를 들어, SRAM을 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 즉, L2 메모리(300)는 DRAM을 포함할 수도 있다.The
L2 메모리(300)는 SoC 레벨 즉, L2(level 2)에 해당하는 메모리일 수 있다. 즉, L2 메모리(300)는 계층적 구조의 level 2에서 동작할 수 있다. 계층적 구조에 대해서는 추후 더 자세히 설명한다.The
DMA(400)는 CGRA 엔진 그룹(110)이 데이터의 입출력을 제어할 필요 없게 직접 데이터의 이동을 제어할 수 있다. 이에 따라서, DMA(400)가 메모리 사이의 데이터 이동을 제어하여 CGRA 엔진 그룹(110)의 인터럽트의 횟수를 최소화시킬 수 있다.The
DMA(400)는 L2 메모리(300)와 오프 칩 메모리(30) 사이의 데이터 이동을 제어할 수 있다. DMA(400)의 권한을 통해서 비휘발성 메모리 컨트롤러(500) 및 휘발성 메모리 컨트롤러(600)가 데이터를 이동을 수행할 수 있다.The
비휘발성 메모리 컨트롤러(500)는 비휘발성 메모리(31)에 리드(read) 또는 라이트(Write) 작업을 제어할 수 있다. 비휘발성 메모리 컨트롤러(500)는 제1 비휘발성 메모리 인터페이스(40)를 통해서 비휘발성 메모리(31)를 제어할 수 있다.The
휘발성 메모리 컨트롤러(600)는 휘발성 메모리(32)에 리드 또는 라이트 작업을 제어할 수 있다. 또한, 휘발성 메모리 컨트롤러(600)는 휘발성 메모리(32)의 리프레쉬 작업을 수행할 수 있다. 휘발성 메모리 컨트롤러(600)는 제1 휘발성 메모리 인터페이스(50)를 통해서 비휘발성 메모리(31)를 제어할 수 있다.The
L2 인터커넥션(700)은 적어도 하나의 CGRA 엔진 그룹(110), L2 메모리(300), DMA(400), 비휘발성 메모리 컨트롤러(500) 및 휘발성 메모리 컨트롤러(600)를 서로 연결할 수 있다. 또한, 외부 인터페이스(3)도 L2 인터커넥션(700)에 연결될 수 있다. L2 인터커넥션(700)은 적어도 하나의 CGRA 엔진 그룹(110), L2 메모리(300), DMA(400), 비휘발성 메모리 컨트롤러(500), 휘발성 메모리 컨트롤러(600) 및 외부 인터페이스(3) 사이의 데이터가 이동하는 경로일 수 있다.The
L2 인터커넥션(700)은 데이터뿐만 아니라 제어 신호의 전송 및 동기화를 위한 신호를 전송할 수 있다. 즉, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 별도의 제어 프로세서가 동기화의 신호를 관리하는 것이 아니라 각각의 CGRA 엔진 그룹(110)이 직접 동기화 신호를 전송하고 수신할 수 있다. 이에 따라서, 제어 프로세서에 의해서 발생하는 동기화 신호의 레이턴시를 차단할 수 있다.The
즉, CGRA 엔진 그룹(110)이 복수일 때, 어느 CGRA 엔진 그룹(110)의 작업이 종료되어야 다음 CGRA 엔진 그룹(110)이 새로운 작업을 시작할 수 있는 개별 작업의 디펜던시가 존재할 수 있다. 따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 제어 프로세서 대신 각각의 CGRA 엔진 그룹(110)이 직접 동기화 신호를 작업의 디펜던시에 따라 다른 CGRA 엔진 그룹(110)로 전송할 수 있다. 이 경우 제어 프로세서에 의해서 관리되는 방식에 비해서 병렬적으로 여러 CGRA 엔진 그룹(110)이 동기화 작업을 수행할 수 있어 동기화에 따른 레이턴시를 최소화할 수 있다. That is, when there are multiple
도 4는 도 3의 CGRA 엔진 그룹을 세부적으로 설명하기 위한 블록도이다.FIG. 4 is a block diagram for explaining the CGRA engine group of FIG. 3 in detail.
도 3 및 도 4를 참조하면, CGRA 엔진 그룹(110)은 적어도 하나의 CGRA 엔진(111), L1 메모리(120) 및 L1 인터커넥션(130)을 포함할 수 있다.Referring to FIGS. 3 and 4 , the
적어도 하나의 CGRA 엔진(111)은 CGRA 엔진 그룹(110)의 작업을 분담하여 수행할 수 있다. CGRA 엔진(111)은 일종의 프로세서일 수 있다. 즉, CGRA 엔진(111)은 연산 작업을 수행하여 연산 결과를 도출할 수 있다.At least one
CGRA 엔진(111)은 복수일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 도 4에서는 여러 개의 CGRA 엔진(111)이 CGRA 엔진 그룹(110)에 포함되는 것으로 도시하였지만, 본 실시예가 이에 제한되는 것은 아니다. 즉, CGRA 엔진(111) 1개만으로 CGRA 엔진 그룹(110)이 구성될 수도 있다.There may be
L1 메모리(120)는 CGRA 엔진 그룹(110) 내에서 각각의 CGRA 엔진(111)들이 공유하는 메모리일 수 있다. L1 메모리(120)는 각각의 CGRA 엔진(111)의 데이터를 저장할 수 있다. 또한, L1 메모리(120)는 L2 메모리(300)로부터 데이터를 수신하여 일시적으로 저장하고 각각의 CGRA 엔진(111)로 전달할 수 있다. 반대로, L1 메모리(120)는 CGRA 엔진(111)로부터 데이터를 수신하여 일시적으로 저장하고 L2 메모리(300)로 전달할 수도 있다. The
L1 메모리(120)는 CGRA 엔진 그룹 레벨, 즉, L1(level 1)에 해당하는 메모리일 수 있다. 즉, L2 메모리(300)는 CGRA 엔진 그룹(110)에 의해서 공유되고, L1 메모리(120)는 CGRA 엔진(111)에 의해서 공유될 수 있다.The
L1 인터커넥션(130)은 적어도 하나의 CGRA 엔진(111) 및 L1 메모리(120)를 서로 연결할 수 있다. L1 인터커넥션(130)은 적어도 하나의 CGRA 엔진(111) 및 L1 메모리(120) 사이의 데이터가 이동하는 경로일 수 있다. L1 인터커넥션(130)은 L2 인터커넥션(700)과 연결되어 데이터를 전송할 수 있다.The
L1 인터커넥션(130)은 L2 인터커넥션(700)에 비해서 상대적으로 레이턴시 민감도가 높을 수 있다. 즉, L1 인터커넥션(130)의 데이터 전송이 L2 인터커넥션(700)보다 더 빠르게 수행될 수 있다. The
반대로, L2 인터커넥션(700)은 L1 인터커넥션(130)에 비해서 밴드위스가 더 클 수 있다. L2 인터커넥션(700)은 L1 인터커넥션(130)에 비해서 더 많은 데이터가 전송되어야 하므로, 밴드위스가 작은 경우 바틀넥 현상이 일어날 수 있고, 장치 전체의 성능을 저하시킬 수 있다. 따라서, L1 인터커넥션(130)과 L2 인터커넥션(700)은 서로 다른 성능 파라미터에 초점을 맞추어 설계될 수 있다. Conversely, the
추가적으로 L2 인터커넥션(700)은 확장 가능한 구조일 수 있다. 즉, CGRA 엔진(111)의 디멘젼이나 CGRA 엔진 그룹(110)의 디멘젼은 연산의 최적화를 위해서 어느정도 고정될 수 있다. 그에 반해서, CGRA 엔진 클러스터(100)의 디멘젼은 하드웨어 리소스가 허락하는 한 클수록 좋은 부분이므로 L2 인터커넥션(700)의 확장 가능성은 매우 중요한 특성 중 하나일 수 있다.Additionally, the
여기서, 디멘젼이란 CGRA 엔진(111)이나 CGRA 엔진 그룹(110)의 스케일을 의미할 수 있다. 즉, CGRA 엔진 그룹(110)은 적어도 하나의 CGRA 엔진(111)이 포함되므로 CGRA 엔진 그룹(110)이 포함하는 CGRA 엔진(111)의 수에 따라 CGRA 엔진 그룹(110)의 디멘젼이 결정될 수 있다. 유사하게, CGRA 엔진(111)도 내부에 프로세싱 엘리먼트, 인스트럭션 메모리, L0 메모리 및 LSU 등 적어도 하나의 구성요소를 포함하고 있으므로 이러한 구성요소의 개수에 따라 CGRA 엔진(111)의 디멘젼이 결정될 수 있다.Here, dimension may mean the scale of the
도 5는 도 3의 CGRA 엔진 그룹의 하드웨어 구조를 설명하기 위한 개념도이다.FIG. 5 is a conceptual diagram for explaining the hardware structure of the CGRA engine group of FIG. 3.
도 5를 참조하면, CGRA 엔진 클러스터(100)는 적어도 하나의 CGRA 엔진 그룹(110)을 포함할 수 있다. 각각의 CGRA 엔진 그룹(110)은 로컬 인터커넥션(701)을 통해서 서로 데이터를 전송할 수 있다. 로컬 인터커넥션(701)은 L2 인터커넥션(700)과 별도로 형성된 인터커넥션일 수 있다. 또는 로컬 인터커넥션(701)은 L2 인터커넥션(700) 내부에서 CGRA 엔진 그룹(110) 사이의 통신을 위한 별도의 전용 채널일 수도 있다.Referring to FIG. 5, the
CGRA 엔진 그룹(110)은 각각 적어도 하나의 CGRA 엔진(111)을 포함할 수 있다. CGRA 엔진(111)은 딥러닝 연산 작업에 최적화된 프로세싱 단위 유닛일 수 있다. CGRA 엔진(111)은 딥러닝 연산 작업의 하나의 오퍼레이션에 대응하는 프로세싱 단위 유닛일 수 있다. 즉, 딥러닝 연산 작업은 여러 오퍼레이션의 순차적 또는 병렬적 결합으로 표현 가능할 수 있다. CGRA 엔진(111)은 각각 하나의 오퍼레이션을 처리할 수 있는 프로세싱 단위 유닛으로서 컴파일러 입장에서 스케쥴링에 고려할 수 있는 최소한의 연산 단위일 수 있다. Each
본 실시예에 따른 뉴럴 프로세싱 장치는 컴파일러 스케쥴링 입장에서 고려되는 최소한의 연산 단위와 하드웨어 프로세싱 단위 유닛의 스케일을 동일하게 구성하여 빠르고 효율적인 스케쥴링 및 연산 작업의 수행을 도모할 수 있다.The neural processing device according to this embodiment can achieve fast and efficient scheduling and performance of calculation tasks by configuring the scale of the minimum calculation unit and hardware processing unit considered from a compiler scheduling perspective to be the same.
즉, 연산 작업에 비해서 하드웨어의 분할할 수 있는 프로세싱 단위 유닛이 지나치게 크다면 프로세싱 단위 유닛의 구동에서 연산 작업의 비효율이 발생할 수 있다. 반대로, 컴파일러의 스케쥴링 최소 단위인 오퍼레이션보다 더 작은 단위의 프로세싱 유닛을 매번 스케쥴링하는 것은 스케쥴링의 비효율이 발생할 수 있고, 하드웨어 설계 비용이 높아질 수 있어 적절하지 않다.In other words, if the processing unit that can be divided into hardware is too large compared to the computational task, inefficiency in the computational task may occur when driving the processing unit. Conversely, it is not appropriate to always schedule a processing unit smaller than the operation, which is the compiler's minimum scheduling unit, because scheduling inefficiencies may occur and hardware design costs may increase.
따라서, 본 실시예는 컴파일러의 스케쥴링 단위와 하드웨어 프로세싱 단위의 스케일을 유사하게 조율하여 빠른 연산 작업의 스케쥴링과 하드웨어 리소스의 낭비없이 효율적인 연산 작업 수행을 동시에 충족시킬 수 있다.Therefore, in this embodiment, the scale of the compiler's scheduling unit and the hardware processing unit can be similarly adjusted to simultaneously satisfy fast computational task scheduling and efficient computational task performance without wasting hardware resources.
도 6은 뉴럴 코어 SoC의 계층적 구조를 설명하기 위한 개념도이다.Figure 6 is a conceptual diagram to explain the hierarchical structure of the neural core SoC.
도 6을 참조하면, 뉴럴 코어 SoC(10)는 최상위 레벨에서 적어도 하나의 CGRA 엔진 클러스터(100)를 포함할 수 있다. 각각의 CGRA 엔진 클러스터(100)는 그 내부에 적어도 하나의 CGRA 엔진 그룹(110)을 포함할 수 있다. 나아가 각각의 CGRA 엔진 그룹(110)은 그 내부에 적어도 하나의 CGRA 엔진(111)을 포함할 수 있다.Referring to FIG. 6, the
이때, 가장 낮은 레벨인 CGRA 엔진(111)의 레벨은 L1 즉, 제1 레벨로 정의할 수 있다. 이에 따라서, 그 위의 CGRA 엔진 그룹(110) 레벨은 L2 즉, 제2 레벨로 정의할 수 있고, 그 위의 CGRA 엔진 클러스터(100) 레벨은 L3 즉, 제3 레벨로 정의할 수 있다. At this time, the level of the
도 6에서는 3개의 레벨로 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 계층적 구조를 도시하였지만, 본 실시예가 이에 제한되는 것은 아니다. 즉, 본 실시예는 CGRA 엔진 클러스터(100)보다 더 큰 상위 개념의 클러스터를 정의할 수 있어서 4개 이상의 레벨을 가지는 계층적 구조를 가지는 것도 얼마든지 가능할 수 있다.Although FIG. 6 shows a hierarchical structure of a neural processing device according to some embodiments of the present invention at three levels, the present embodiment is not limited thereto. That is, this embodiment can define a higher-level cluster larger than the
시퀀서(200)는 최상위 레벨에서 모든 CGRA 엔진 클러스터(100), CGRA 엔진 그룹(110) 및 CGRA 엔진(111)을 다 제어할 수 있다. 구체적으로, 시퀀서(200)는 CGRA 엔진 클러스터(100) 사이의 연산 작업의 분배 및 작업 수행을 제어하고, 이는 각각의 CGRA 엔진 그룹(110) 사이의 연산 작업의 분배 및 작업 수행을 제어를 통해서 수행될 수 있다. 나아가, 시퀀서(200)는 CGRA 엔진(111) 사이의 연산 작업의 분배 및 작업 수행을 제어를 통해서 CGRA 엔진 그룹(110)의 제어를 수행할 수 있다. 시퀀서(200)가 모든 CGRA 엔진 클러스터(100)를 다 제어할 수 있어서 전체적인 작업의 수행을 원활하게 제어할 수 있다.The
즉, 시퀀서(200)는 L1, L2 및 L3의 모든 레벨의 제어를 수행할 수 있다. 또한, 모든 레벨의 모니터링도 수행할 수 있다.That is, the
도 7은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명하기 위한 개념도이다.Figure 7 is a conceptual diagram for explaining a neural processing device according to some embodiments of the present invention.
도 3 및 도 7을 참조하면, 시퀀서(200)는 L3에서 각 CGRA 엔진 클러스터(100) 별로 나누어 관리할 수 있게 복수일 수 있다. 즉, 시퀀서(200)는 서로 다른 CGRA 엔진 클러스터(100)의 관리하는 제1 시퀀서(210), 제2 시퀀서(220) 및 제3 시퀀서(230)를 포함할 수 있다. 도 7에서는 3개의 CGRA 엔진 클러스터(100)와 제1 내지 제3 시퀀서(210, 220, 230)를 도시하였지만, 본 실시예가 이에 제한되는 것은 아니다. CGRA 엔진 클러스터(100)의 개수와 그에 대응하는 시퀀서(210, 220, 230)의 개수는 얼마든지 달라질 수 있다.Referring to FIGS. 3 and 7 , there may be a plurality of
각각의 CGRA 엔진 클러스터(100)는 제1 CGRA 엔진 그룹(110a), 제2 CGRA 엔진 그룹(110b) 및 제3 CGRA 엔진 그룹(110c)를 각각 포함할 수 있다. 제1 CGRA 엔진 그룹(110a), 제2 CGRA 엔진 그룹(110b) 및 제3 CGRA 엔진 그룹(110c)는 각각 복수일 수 있고, 하나일 수도 있다. 이때, 제1 시퀀서(210)는 제1 CGRA 엔진 그룹(110a)와 제1 CGRA 엔진 그룹(110a) 내부의 CGRA 엔진(111)의 동작을 제어하고 모니터링할 수 있다. 유사하게, 제2 시퀀서(220)는 제2 CGRA 엔진 그룹(110b)와 제2 CGRA 엔진 그룹(110b) 내부의 CGRA 엔진(111)의 동작을 제어하고 모니터링할 수 있다. 제3 시퀀서(230)는 제3 CGRA 엔진 그룹(110c)와 제3 CGRA 엔진 그룹(110c) 내부의 CGRA 엔진(111)의 동작을 제어하고 모니터링할 수 있다.Each
본 실시예는 하나의 시퀀서(200)에 집중되는 오버헤드를 분산할 수 있다. 이에 따라, 시퀀서(200)에 의한 레이턴시나 전체 장치의 성능 저하를 방지할 수 있고, CGRA 엔진 클러스터(100)별로 병렬적인 제어가 가능할 수 있다.This embodiment can distribute the overhead concentrated on one
도 8은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명하기 위한 개념도이다.Figure 8 is a conceptual diagram for explaining a neural processing device according to some embodiments of the present invention.
도 3 및 도 8을 참조하면, 하나의 CGRA 엔진 클러스터(100)에 대해서 복수의 시퀀서(210a, 210b, 210c)가 존재할 수 있다. 즉, 시퀀서(200)는 제1 영역 시퀀서(210a), 제2 영역 시퀀서(210b) 및 제3 영역 시퀀서(210c)를 포함할 수 있다. 이때, 제1 내지 제3 영역 시퀀서(210a, 210b, 210c)의 개수는 얼마든지 달라질 수 있다.Referring to FIGS. 3 and 8 , a plurality of
제1 영역 시퀀서(210a)는 하나의 CGRA 엔진 클러스터(100)의 제1 영역에 해당하는 제1 CGRA 엔진 그룹(110a)와 제1 CGRA 엔진 그룹(110a) 내부의 CGRA 엔진(111)을 관리할 수 있다. 제2 영역 시퀀서(210b)는 CGRA 엔진 클러스터(100)의 제2 영역에 해당하는 제2 CGRA 엔진 그룹(110b)와 제2 CGRA 엔진 그룹(110b) 내부의 CGRA 엔진(111)을 관리할 수 있다. 제3 영역 시퀀서(210c)는 하나의 CGRA 엔진 클러스터(100)의 제3 영역에 해당하는 제3 CGRA 엔진 그룹(110c)와 제3 CGRA 엔진 그룹(110c) 내부의 CGRA 엔진(111)을 관리할 수 있다. The
본 실시예는 CGRA 엔진 클러스터(100)를 구성하기 위한 하드웨어 설계를 별도로 하지 않고, 단순히 영역만을 구분하여 시퀀서의 업무를 분할할 수 있다. 즉, 하드웨어 리소스를 최소화하면서 하나의 시퀀서(200)에 집중되는 오버헤드를 분산할 수 있다. 이에 따라, 시퀀서(200)에 의한 레이턴시나 전체 장치의 성능 저하를 방지할 수 있고, CGRA 엔진 클러스터(100)별로 병렬적인 제어가 가능할 수 있다.In this embodiment, the work of the sequencer can be divided by simply dividing the area without separate hardware design for configuring the
도 9는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명하기 위한 개념도이다.Figure 9 is a conceptual diagram for explaining a neural processing device according to some embodiments of the present invention.
도 3 및 도 9를 참조하면, 각각의 CGRA 엔진 클러스터(100)는 제1 CGRA 엔진 그룹(110a), 제2 CGRA 엔진 그룹(110b) 및 제3 CGRA 엔진 그룹(110c)를 각각 포함할 수 있다. 제1 CGRA 엔진 그룹(110a), 제2 CGRA 엔진 그룹(110b) 및 제3 CGRA 엔진 그룹(110c)는 각각 복수일 수 있고, 하나일 수도 있다. 이때, 제1 시퀀서(210)는 제1 CGRA 엔진 그룹(110a)와 제1 CGRA 엔진 그룹(110a) 내부의 CGRA 엔진(111)의 동작을 제어하고 모니터링할 수 있다. 유사하게, 제2 시퀀서(220)는 제2 CGRA 엔진 그룹(110b)와 제2 CGRA 엔진 그룹(110b) 내부의 CGRA 엔진(111)의 동작을 제어하고 모니터링할 수 있다. 제3 시퀀서(230)는 제3 CGRA 엔진 그룹(110c)와 제3 CGRA 엔진 그룹(110c) 내부의 CGRA 엔진(111)의 동작을 제어하고 모니터링할 수 있다.Referring to FIGS. 3 and 9, each
이때, 제1 시퀀서(210), 제2 시퀀서(220) 및 제3 시퀀서(230)는 상부 시퀀서로서 CGRA 엔진 그룹(110)들의 동작을 제어할 수 있다. 제1 하부 시퀀서(211), 제2 하부 시퀀서(221) 및 제3 하부 시퀀서(231)는 각각 CGRA 엔진 그룹(110) 별로 존재하고, 각 CGRA 엔진 그룹(110)의 하부에 있는 CGRA 엔진(111)의 동작을 제어할 수 있다. 제1 시퀀서(210), 제2 시퀀서(220) 및 제3 시퀀서(230)는 각각 제1 하부 시퀀서(211), 제2 하부 시퀀서(221) 및 제3 하부 시퀀서(231)와 연계될 수 있다.At this time, the
이러한 상부와 하부로 나누어진 시퀀서는 각 레벨에 따른 동작 제어를 분산하여 하므로 오버헤드를 줄이고, 병렬적인 제어를 통해서 전체 장치의 속도를 향상시킬 수 있다.This sequencer, divided into upper and lower parts, distributes operation control for each level, thereby reducing overhead and improving the speed of the entire device through parallel control.
도 10은 도 3의 시퀀서의 동작을 설명하기 위한 개념도이다.FIG. 10 is a conceptual diagram for explaining the operation of the sequencer of FIG. 3.
도 10을 참조하면, 시퀀서(200)는 인풋 파라미터(In_p)를 모니터링하여 CGRA 엔진(111), L2 인터커넥션(700), L2 메모리(300) 및 오프 칩 메모리(30) 중 적어도 하나를 제어할 수 있다. 시퀀서(200)는 CGRA 엔진(111), L2 인터커넥션(700), L2 메모리(300) 및 오프 칩 메모리(30)의 밴드위스나 레이턴시와 같은 파라미터를 제어할 수 있다. 시퀀서(200)는 물론 L1 메모리(120), L1 인터커넥션(130) 및 로컬 인터커넥션(701)도 제어할 수도 있다. 다만, 설명의 편의를 위해서, 아래서는 CGRA 엔진(111), L2 인터커넥션(700), L2 메모리(300) 및 오프 칩 메모리(30)에 대한 제어만을 설명한다.Referring to FIG. 10, the
이때, 인풋 파라미터(In_p)는 밴드위스, 레이턴시, 공급전력 및 온도 중 적어도 하나를 포함할 수 있다. At this time, the input parameter (In_p) may include at least one of bandwidth, latency, supplied power, and temperature.
이때, 밴드위스란, 시간에 따른 CGRA 엔진(111)과 외부의 데이터 전송 트래픽의 크기를 의미할 수 있다. 밴드위스의 경우 CGRA 엔진(111)과 대응하는 메모리 즉, L2 메모리(300) 또는 오프 칩 메모리(30)의 상황이나 둘 사이를 연결하는 L2 인터커넥션(700)의 트래픽 등이 다각적으로 관련될 수 있다.At this time, bandwidth may mean the size of the
이때, 레이턴시란, CGRA 엔진(111)의 연산 성능의 파라미터 중 하나로 CGRA 엔진(111)이 처리한 결과가 지연되는 기간을 의미할 수 있다. 레이턴시의 경우 CGRA 엔진(111)의 프리퀀시를 높이거나 CGRA 엔진(111)의 공급전력을 높여서 최소화할 수 있다. 공급전력 및 온도는 하드웨어 동작 환경과 관련된 파라미터로서, 이를 제어하여 하드웨어의 성능을 극대화할 수 있다. At this time, latency is one of the parameters of the calculation performance of the
시퀀서(200)는 위와 같은 인풋 파라미터(In_p)를 이용하여 CGRA 엔진(111), L2 인터커넥션(700), L2 메모리(300) 및 오프 칩 메모리(30) 중 적어도 하나의 동작을 제어하고 성능 문제를 해결할 수 있다.The
도 11은 도 3의 시퀀서의 모니터링 및 제어 동작을 설명하기 위한 블록도이다.FIG. 11 is a block diagram for explaining monitoring and control operations of the sequencer of FIG. 3.
도 11을 참조하면, 각각의 CGRA 엔진(111)은 가상 디바이스(VP)에 매핑될 수 있다. 즉, 연산 작업의 특성에 따라 필요한 하드웨어 리소스를 효율적으로 제공하기 위해서 가상 디바이스(VP)가 구현될 수 있다. 2개 이상의 CGRA 엔진(111)이 하나의 가상 디바이스(VP)에 매핑될 수도 있고, 이 경우 하나의 가상 디바이스(VP)에 매핑된 2개 이상의 CGRA 엔진(111)은 하나의 유닛처럼 동작할 수 있다.Referring to FIG. 11, each
이에 따라서, 실제 CGRA 엔진(111)의 개수와 가상 디바이스(VP)의 개수는 서로 다를 수 있다. 이때, 가상 디바이스(VP)의 개수는 실제 CGRA 엔진(111)의 개수보다 같거나 적을 수 있다.Accordingly, the number of
가상 디바이스(VP)는 L2 인터커넥션(700)과 서로 데이터를 교환할 수 있다. 데이터 교환(Ex)은 가상 디바이스(VP) 및 L2 인터커넥션(700)을 통해서 기록될 수 있고, 시퀀서(200)에 의해서 모니터링될 수 있다.A virtual device (VP) may exchange data with the
시퀀서(200)는 CGRA 엔진(111)의 동작을 모니터링할 수 있다. 이때, CGRA 엔진(111)의 레이턴시, 공급전력 및 온도가 모니터링될 수 있다. 또한, 시퀀서(200)는 CGRA 엔진(111)과 L2 인터커넥션(700) 사이의 밴드위스를 모니터링할 수 있다. 즉, 시퀀서(200)는 데이터 교환(Ex)을 모니터링하여 밴드위스를 확인할 수 있다. 이때, 시퀀서(200)는 실시간으로 모니터링 정보(Im)를 수신할 수 있다. 이때, 모니터링 정보(Im)는 CGRA 엔진(111)의 레이턴시, CGRA 엔진(111)의 공급전력, CGRA 엔진(111)의 온도 및 CGRA 엔진(111)과 L2 인터커넥션(700) 사이의 밴드위스 중 적어도 하나를 포함할 수 있다.The
시퀀서(200)는 이러한 모니터링 정보(Im)를 수신하여 성능 문제를 검출할 수 있다. 상기 성능 문제는 하드웨어의 레이턴시나 밴드위스 등이 미리 설정된 기준치 이하로 검출되는 것을 의미할 수 있다. 구체적으로, 성능 문제는 밴드위스가 제한되는 문제 또는 연산 성능이 제한되는 문제 중 적어도 하나일 수 있다. The
이에 대응하여, 시퀀서(200)는 프로세서 제어 신호(Proc_Cont), 메모리 제어 신호(Mem_Cont) 및 인터커넥션 제어 신호(Inter_Cont) 중 적어도 하나를 생성하고 전달할 수 있다. 시퀀서(200)는 프로세서 제어 신호(Proc_Cont), 메모리 제어 신호(Mem_Cont) 및 인터커넥션 제어 신호(Inter_Cont) 중 적어도 하나를 CGRA 엔진(111)과 L2 인터커넥션(700)에 전달할 수 있다. 프로세서 제어 신호(Proc_Cont), 메모리 제어 신호(Mem_Cont) 및 인터커넥션 제어 신호(Inter_Cont)는 추후에 더 자세히 설명한다.Correspondingly, the
도 12는 도 3의 시퀀서의 작업 특성에 따른 DVFS(Dynamic Voltage Frequency Scaling)을 설명하기 위한 개념도이다.FIG. 12 is a conceptual diagram for explaining Dynamic Voltage Frequency Scaling (DVFS) according to the operation characteristics of the sequencer of FIG. 3.
도 12를 참조하면, 시퀀서(200)는 입력된 연산 작업(Task)의 특성, 즉 작업 특성(T_st)을 수신할 수 있다. 작업 특성(T_st)은 연산 작업(Task)의 오퍼레이션과 순서, 피연산자의 종류 및 개수 등을 포함할 수 있다.Referring to FIG. 12, the
시퀀서(200)는 작업 특성(T_st)에 따라서, 각 CGRA 엔진(111)에 연산 작업이 할당되면 실시간으로 전압 및/또는 프리퀀시를 조절하여 하드웨어의 성능을 최적화할 수 있다. 이때, 시퀀서(200)에 의해서 조절되는 하드웨어는 CGRA 엔진(111), L2 인터커넥션(700), L2 메모리(300) 및 오프 칩 메모리(30) 중 적어도 하나를 포함할 수 있다. 물론, 시퀀서(200)에 의해서 조절되는 하드웨어는 L1 인터커넥션(130), L1 메모리(120) 및 로컬 인터커넥션(701) 중 적어도 하나를 포함할 수도 있다.The
도 13은 도 3의 시퀀서의 가상 장치 상태에 따른 DVFS을 설명하기 위한 개념도이다.FIG. 13 is a conceptual diagram for explaining DVFS according to the virtual device state of the sequencer of FIG. 3.
도 11 및 도 13을 참조하면, 시퀀서(200)는 가상 디바이스(VP)의 현황 즉, 가상 디바이스 현황(V_st)을 수신할 수 있다. 가상 디바이스 현황(V_st)은 어떤 CGRA 엔진(111)이 어떤 가상 디바이스(VP)로 이용되고 있는지에 따른 정보일 수 있다. Referring to FIGS. 11 and 13 , the
시퀀서(200)는 가상 디바이스 현황(V_st)에 따라 각 CGRA 엔진(111)에 연산 작업이 할당되면 실시간으로 전압 및/또는 프리퀀시를 조절하여 하드웨어 성능을 최적화할 수 있다. 즉, 가상 디바이스 현황(V_st)에서 사용되지 않는 CGRA 엔진(111)과 대응되는 메모리의 공급전력을 낮추고, 가장 활발하게 사용되는 CGRA 엔진(111)나 메모리에 공급전력을 높이는 등의 실시간 스케일링이 가능할 수 있다.When a computation task is assigned to each
이때, 시퀀서(200)에 의해서 조절되는 하드웨어는 CGRA 엔진(111), L2 인터커넥션(700), L2 메모리(300) 및 오프 칩 메모리(30) 중 적어도 하나를 포함할 수 있다. 물론, 시퀀서(200)에 의해서 조절되는 하드웨어는 L1 인터커넥션(130), L1 메모리(120) 및 로컬 인터커넥션(701) 중 적어도 하나를 포함할 수도 있다.At this time, the hardware controlled by the
도 14는 도 3의 시퀀서의 구조를 세부적으로 설명하기 위한 블록도이다.FIG. 14 is a block diagram for explaining in detail the structure of the sequencer of FIG. 3.
도 11 및 도 14를 참조하면, 시퀀서(200)는 모니터링 모듈(250), 프로세서 컨트롤러(260), 컴프레션 액티베이터(270) 및 인터커넥트 컨트롤러(280)를 포함할 수 있다.Referring to FIGS. 11 and 14 , the
모니터링 모듈(250)은 모니터링 정보(Im)를 수신할 수 있다. 모니터링 모듈(250)은 모니터링 정보(Im)를 통해서, 어떠한 성능 문제가 있는지 검출할 수 있다. 예를 들어, 밴드위스가 제한되는지, 연산 성능이 제한되는지 등을 분석할 수 있다. 밴드위스가 제한되는 경우 오프 칩 메모리(30)가 제한되는지, L2 메모리(300)가 제한되는지 아니면, L2 인터커넥션(700)이 제한되는 건지를 식별할 수 있다.The
프로세서 컨트롤러(260)는 연산 성능이 제한되는 경우 CGRA 엔진(111)의 공급전력이나 프리퀀시를 상승 제어하는 프로세서 제어 신호(Proc_Cont)를 생성할 수 있다. 프로세서 컨트롤러(260)는 CGRA 엔진(111)로 프로세서 제어 신호(Proc_Cont)를 전송할 수 있다.The
컴프레션 액티베이터(270)는 밴드위스가 제한되고, 오프 칩 메모리(30) 또는 L2 메모리(300)가 제한되는 경우 데이터의 컴프레션 및 디컴프레션을 수행하게 할 수 있다. 즉, 컴프레션 액티베이터(270)는 오프 칩 메모리(30)가 제한되는 경우, 오프 칩 메모리(30)의 트래픽의 압축을 수행하고, 다시 압축 해제를 하게하는 메모리 제어 신호(Mem_Cont)를 생성할 수 있다. 이를 통해, 컴프레션 액티베이터(270)는 오프 칩 메모리(30)의 트래픽 문제를 해결할 수 있다. 메모리 제어 신호(Mem_Cont)는 컴프레션 엔진과 디컴프레션 엔진을 활성화시켜 압축과 압축해제를 수행할 수 있다. 이때, 압축 및 압축해제는 트래픽 하향 제어의 하나의 예시에 불과하고, 본 실시예가 이에 제한되는 것은 아니다.The
또한, 컴프레션 액티베이터(270)는 L2 메모리(300)가 제한되는 경우, L2 메모리(300)의 트래픽의 압축을 수행하고, 다시 압축 해제를 하게하는 메모리 제어 신호(Mem_Cont)를 생성할 수 있다. 이를 통해, 컴프레션 액티베이터(270)는 L2 메모리(300)의 트래픽 문제를 해결할 수 있다. 이때, 압축 및 압축해제는 트랙픽 하향 제어의 하나의 예시에 불과하고, 본 실시예가 이에 제한되는 것은 아니다.Additionally, when the
인터커넥트 컨트롤러(280)는 밴드위스가 제한되고, 오프 칩 메모리(30) 또는 L2 메모리(300)가 제한되는 경우, L2 인터커넥션(700)의 프리퀀시를 오버드라이브하게하는 인터커넥션 제어 신호(Inter_Cont)를 생성할 수 있다. 인터커넥션 제어 신호(Inter_Cont)는 L2 인터커넥션(700)의 프리퀀시를 상승시켜 밴드위스 제한 문제를 해결할 수 있다. 이때, 프리퀀시 오버드라이브는 인터커넥션 성능 상승 제어의 하나의 예시에 불과하고, 본 실시예가 이에 제한되는 것은 아니다.The
도 15는 도 4의 CGRA 엔진의 구조를 세부적으로 설명하기 위한 블록도이다.FIG. 15 is a block diagram for explaining in detail the structure of the CGRA engine of FIG. 4.
도 15를 참조하면, CGRA 엔진(111)은 인스트럭션 메모리(111_1), L0 메모리(111_2), PE 어레이(111_3), LSU(Load/Store Unit)(111_4)를 포함할 수 있다.Referring to FIG. 15, the
도 16은 도 15의 인스트럭션 메모리를 세부적으로 설명하기 위한 개념도이다.FIG. 16 is a conceptual diagram for explaining the instruction memory of FIG. 15 in detail.
도 16을 참조하면, 인스트럭션 메모리(111_1)는 인스트럭션을 수신하여 저장할 수 있다. 인스트럭션 메모리(111_1)는 인스트럭션을 내부에 순차적으로 저장하고, 저장된 인스트럭션을 PE 어레이(111_3)로 제공할 수 있다. 이때, 인스트럭션은 각 PE 어레이(111_3)에 포함된 프로세싱 엘리먼트(111_3a)의 동작을 지시할 수 있다.Referring to FIG. 16, the instruction memory 111_1 can receive and store instructions. The instruction memory 111_1 may sequentially store instructions internally and provide the stored instructions to the PE array 111_3. At this time, the instruction may direct the operation of the processing element 111_3a included in each PE array 111_3.
다시, 도 15를 참조하면, L0 메모리(111_2)는 CGRA 엔진(111) 내부에 위치한 메모리로서, CGRA 엔진(111)이 작업에 필요한 모든 입력 데이터를 외부로부터 수신하여 임시로 저장할 수 있다. 또한, L0 메모리(111_2)는 CGRA 엔진(111)에 의해서 연산된 출력 데이터를 외부로 전송하기 위해서 일시적으로 저장할 수 있다. L0 메모리(111_2)는 CGRA 엔진(111)의 캐시 메모리 역할을 수행할 수 있다.Referring again to FIG. 15, the L0 memory 111_2 is a memory located inside the
L0 메모리(111_2)는 PE 어레이(111_3)와 데이터를 송수신할 수 있다. L0 메모리(111_2)는 L1 보다 낮은 L0(level 0)에 해당하는 메모리일 수 있다. 이때, L0 메모리는 L1 메모리(120) 및 L2 메모리(300)와는 달리 공유되지 않는 CGRA 엔진(111)의 전용(private) 메모리일 수 있다. L0 메모리(111_2)는 액티베이션이나 웨이트 같은 데이터와 프로그램 등을 PE 어레이(111_3)로 전송할 수 있다. The L0 memory 111_2 can transmit and receive data with the PE array 111_3. The L0 memory 111_2 may be a memory corresponding to L0 (level 0), which is lower than L1. At this time, the L0 memory may be a private memory of the
PE 어레이(111_3)는 연산을 수행하는 모듈일 수 있다. PE 어레이(111_3)는 1차원 연산뿐만 아니라 2차원 이상의 매트릭스/텐서 연산도 수행할 수 있다. PE 어레이(111_3)는 내부에 복수의 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)를 포함할 수 있다.The PE array 111_3 may be a module that performs calculations. The PE array 111_3 can perform not only one-dimensional operations but also two-dimensional or more matrix/tensor operations. The PE array 111_3 may include a plurality of processing elements 111_3a and a specific processing element 111_3b therein.
프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 행과 열로 정렬될 수 있다. 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 m 열로 정렬될 수 있다. 또한, 프로세싱 엘리먼트(111_3a)는 n 행으로 정렬되고, 특정 프로세싱 엘리먼트(111_3b)는 l행으로 정렬될 수 있다. 이에 따라서, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 (n+l)행과 m열로 정렬될 수 있다.The processing element 111_3a and the specific processing element 111_3b may be arranged in rows and columns. The processing element 111_3a and the specific processing element 111_3b may be arranged in m columns. Additionally, the processing element 111_3a may be arranged in n rows, and the specific processing element 111_3b may be arranged in l rows. Accordingly, the processing element 111_3a and the specific processing element 111_3b may be arranged in (n+l) rows and m columns.
LSU(111_4)는 L1 인터커넥션(130)을 통해서 외부에서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 수신할 수 있다. LSU(111_4)은 L0 메모리(111_2)로 수신한 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 전송할 수 있다. 유사하게 LSU(111_4)는 L1 인터커넥션(130)을 통해서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 외부로 전달 수 있다. The LSU 111_4 may receive at least one of data, control signals, and synchronization signals from the outside through the
CGRA 엔진(111)은 CGRA(Coarse Grained Reconfigurable Architecture) 구조를 가질 수 있다. 이에 따라서, CGRA 엔진(111)은 PE 어레이(111_3)의 각각의 프로세싱 엘리먼트(111_3a)와 특정 프로세싱 엘리먼트(111_3b)가 각각 L0 메모리(111_2), 인스트럭션 메모리(111_1) 및 LSU(111_4) 중 적어도 하나와 연결될 수 있다. 즉, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 L0 메모리(111_2), 인스트럭션 메모리(111_1) 및 LSU(111_4)의 전부와 연결되어야 하는 것은 아니고 일부와 연결될 수도 있다.The
또한, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 서로 다른 종류의 프로세싱 소자일 수 있다. 이에 따라서, L0 메모리(111_2), 인스트럭션 메모리(111_1) 및 LSU(111_4) 중 프로세싱 엘리먼트(111_3a)와 연결되는 소자와 특정 프로세싱 엘리먼트(111_3b)와 연결되는 소자는 서로 다를 수 있다.Additionally, the processing element 111_3a and the specific processing element 111_3b may be different types of processing elements. Accordingly, among the L0 memory 111_2, the instruction memory 111_1, and the LSU 111_4, elements connected to the processing element 111_3a and elements connected to the specific processing element 111_3b may be different.
CGRA 구조를 가지는 본 발명의 CGRA 엔진(111)은 높은 수준의 병렬 연산이 가능하고, 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b) 사이의 직접적인 데이터 교환이 가능하므로 전력 소모가 낮을 수 있다. 또한, 2개 이상의 종류의 프로세싱 엘리먼트(111_3a)를 포함하여 다양한 연산 작업에 따른 최적화도 가능할 수 있다.The
예를 들어, 프로세싱 엘리먼트(111_3a)가 2차원 연산을 수행하는 프로세싱 엘리먼트인 경우 특정 프로세싱 엘리먼트(111_3b)는 1차원 연산을 수행하는 프로세싱 엘리먼트일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.For example, if the processing element 111_3a is a processing element that performs a two-dimensional operation, the specific processing element 111_3b may be a processing element that performs a one-dimensional operation. However, this embodiment is not limited to this.
도 17은 도 15의 프로세싱 엘리먼트를 세부적으로 설명하기 위한 도면이다.FIG. 17 is a diagram for explaining the processing element of FIG. 15 in detail.
도 17을 참조하면, 프로세싱 엘리먼트(111_3a)는 인스트럭션 큐(IQ), 제1 레지스터(R1), 제2 레지스터(R2), 제3 레지스터(R3), 인풋 포매터(I_Form) 및 아웃풋 포매터(O_Form)를 포함할 수 있다.Referring to FIG. 17, the processing element 111_3a includes an instruction queue (IQ), a first register (R1), a second register (R2), a third register (R3), an input formatter (I_Form), and an output formatter (O_Form). may include.
인스트럭션 큐(IQ)는 인스트럭션 메모리(111_1)로부터 받은 인스트럭션을 수신하고 분할하여 제1 레지스터(R1), 제2 레지스터(R2) 및 제3 레지스터(R3)에 순차적으로 제공할 수 있다. 제1 레지스터(R1)는 소스(src) 정보와 컨버팅(CVT) 정보를 수신할 수 있다. 제2 레지스터(R2)는 오피코드(opcode) 정보를 수신할 수 있다. 제3 레지스터(R3)는 데스티네이션(dst) 정보와 컨버팅(CVT) 정보를 수신할 수 있다. The instruction queue (IQ) may receive instructions received from the instruction memory 111_1, divide them, and sequentially provide them to the first register (R1), the second register (R2), and the third register (R3). The first register (R1) can receive source (src) information and converting (CVT) information. The second register (R2) can receive opcode information. The third register (R3) can receive destination (dst) information and converting (CVT) information.
이때, 오피코드(opcode)는 해당 인스트럭션의 오퍼레이션의 코드 즉, 연산자를 의미할 수 있다. 오피코드는 예를 들어, ADD, SUB, MUL, DIV, 산술 쉬프트 등의 산술 연산과 AND, OR, NOT, XOR, 논리 쉬프트, 로테이션 쉬프트, Complement, Clear 등의 논리 연산을 포함할 수 있다.At this time, the opcode may mean the operation code of the corresponding instruction, that is, the operator. Opcodes may include, for example, arithmetic operations such as ADD, SUB, MUL, DIV, and arithmetic shift, and logical operations such as AND, OR, NOT, XOR, logical shift, rotation shift, Complement, and Clear.
인풋 포매터(I_Form)는 제1 레지스터(R1)로부터 소스(src) 정보를 수신하여 피연산자를 확정할 수 있다. 또한, 인풋 포매터(I_Form)는 제1 레지스터(R1)로부터 컨버팅(CVT) 정보를 수신하여 피연산자의 프리시젼을 변환할 수 있다. 즉, 입력 데이터의 프리시젼과 연산에 필요한 프리시젼이 다를 수 있으므로 인풋 포매터(I_Form)가 프리시젼을 변환할 수 있다. 이때, 소스(src) 정보는 노스(N), 이스트(E), 사우스(S), 웨스트(W), 글로벌 레지스터 파일(GRF) 및 바이패스(Bypass) 중 적어도 하나를 포함할 수 있다. 바이패스(Bypass)는 아웃풋 포매터(O_Form)에서 전달되는 경로일 수 있다.The input formatter (I_Form) can determine the operand by receiving source (src) information from the first register (R1). Additionally, the input formatter (I_Form) can receive conversion (CVT) information from the first register (R1) and convert the precision of the operand. In other words, the precision of the input data and the precision required for calculation may be different, so the input formatter (I_Form) can convert the precision. At this time, the source (src) information may include at least one of North (N), East (E), South (S), West (W), Global Register File (GRF), and Bypass. Bypass may be a path transmitted from the output formatter (O_Form).
제2 레지스터(R2)는 오피코드(opcode) 정보를 수신하여 연산자를 생성할 수 있다. 연산자는 피연산자를 이용하여 연산 결과인 출력을 생성할 수 잇다. 아웃풋 포매터(O_Form)는 출력을 수신할 수 있다. 아웃풋 포매터(O_Form)는 제3 레지스터(R3)로부터 데스티네이션(dst) 정보를 수신하여 출력를 전송할 수 있다. 또한, 아웃풋 포매터(O_Form)는 제3 레지스터(R3)로부터 컨버팅(CVT) 정보를 수신하여 출력의 프리시젼을 변환할 수 있다. 즉, 연산에 필요한 프리시젼과 출력에 요구되는 프리시젼이 다를 수 있으므로 아웃풋 포매터(O_Form)가 프리시젼을 변환할 수 있다. The second register (R2) can receive opcode information and generate an operator. An operator can use operands to generate output, which is the result of the operation. The output formatter (O_Form) can receive output. The output formatter (O_Form) can receive destination (dst) information from the third register (R3) and transmit output. Additionally, the output formatter (O_Form) can receive conversion (CVT) information from the third register (R3) and convert the output precision. In other words, the precision required for calculation and the precision required for output may be different, so the output formatter (O_Form) can convert the precision.
이때, 데스티네이션(dst) 정보는 노스(N), 이스트(E), 사우스(S) 및 웨스트(W) 중 적어도 하나를 포함할 수 있다. 또한, 아웃풋 포매터(O_Form)는 바이패스(Bypass)를 통해 출력을 인풋 포매터(I_Form)로 전달할 수도 있다.At this time, destination (dst) information may include at least one of North (N), East (E), South (S), and West (W). Additionally, the output formatter (O_Form) can transfer output to the input formatter (I_Form) through bypass.
본 실시예에 따른 프로세싱 엘리먼트는 별도의 프리시젼 컨버전 디바이스가 있는 것이 아니라 인스트럭션 큐에서 바로 프리시젼 컨버전을 수행하므로 하드웨어 효율성을 높일 수 있다.The processing element according to this embodiment does not have a separate precision conversion device but performs precision conversion directly from the instruction queue, thereby improving hardware efficiency.
도 18은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 ISA(Instruction Set Architecture)를 설명하기 위한 도면이다.FIG. 18 is a diagram illustrating the Instruction Set Architecture (ISA) of a neural processing device according to some embodiments of the present invention.
도 17 및 도 18을 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 ISA는 프리시젼(precision), 오피코드(opcode), 소스(src0~2) 및 데스티네이션(dst) 정보를 포함할 수 있다.17 and 18, the ISA of the neural processing device according to some embodiments of the present invention includes precision, opcode, source (src0~2), and destination (dst) information. can do.
프리시젼은 인풋 포매터(I_Form) 및 아웃풋 포매터(O_Form)에게 컨버팅(CVT) 정보를 생성하기 위해서 포함될 수 있다. 오피코드는 연산자, 소스는 피연산자를 확정하는 것에 사용되고, 데스티네이션은 출력의 전송을 위해서 ISA에 포함될 수 있다.Precision can be included to generate conversion (CVT) information in the input formatter (I_Form) and output formatter (O_Form). The opcode is used to determine the operator, the source is used to determine the operand, and the destination can be included in the ISA for transmission of output.
도 19는 도 4의 CGRA 엔진에서 인스트럭션 큐의 동작을 설명하기 위한 블록도이다.FIG. 19 is a block diagram for explaining the operation of the instruction queue in the CGRA engine of FIG. 4.
도 17 내지 도 19를 참조하면, 인스트럭션 큐(IQ)는 LSU(111_4)를 통해서 로드되어 각 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)로 전달될 수 있다. 각각의 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)는 인스트럭션 큐(IQ)를 전달받아 연산 작업을 수행할 수 있다.17 to 19, the instruction queue (IQ) may be loaded through the LSU 111_4 and transmitted to each processing element 111_3a and a specific processing element 111_3b. Each processing element 111_3a and the specific processing element 111_3b may receive an instruction queue (IQ) and perform calculation tasks.
도 20은 도 15의 LSU을 세부적으로 설명하기 위한 블록도이다.FIG. 20 is a block diagram for explaining the LSU of FIG. 15 in detail.
도 20을 참조하면, LSU(111_4)은 로컬 메모리 로드 유닛(LMLU), 로컬 메모리 스토어 유닛(LMSU), 뉴럴 코어 로드 유닛(NCLU), 뉴럴 코어 스토어 유닛(NCSU), 로드 버퍼(LB), 스토어 버퍼(SB), 로드 엔진(LE), 스토어 엔진(SE) 및 변환 색인 버퍼(TLB)를 포함할 수 있다.Referring to FIG. 20, the LSU 111_4 includes a local memory load unit (LMLU), a local memory store unit (LMSU), a neural core load unit (NCLU), a neural core store unit (NCSU), a load buffer (LB), and a store unit. It may include a buffer (SB), load engine (LE), store engine (SE), and translation lookaside buffer (TLB).
로컬 메모리 로드 유닛(LMLU)은 L0 메모리(111_2)에 대한 로드 인스트럭션을 페치(fetch)하고, 로드 인스트럭션을 이슈(issue)할 수 있다. 로컬 메모리 로드 유닛(LMLU)이 이슈된 로드 인스트럭션을 로드 버퍼(LB)에 제공하면 로드 버퍼(LB)가 입력된 순서에 따라서 순차적으로 로드 엔진(LE)으로 메모리 액세스 요청을 전송할 수 있다.The local memory load unit (LMLU) may fetch a load instruction for the L0 memory 111_2 and issue the load instruction. When the local memory load unit (LMLU) provides an issued load instruction to the load buffer (LB), memory access requests can be sequentially transmitted to the load engine (LE) according to the order in which the load buffer (LB) was input.
또한, 로컬 메모리 스토어 유닛(LMSU)은 L0 메모리(111_2)에 대한 스토어 인스트럭션을 페치하고, 스토어 인스트럭션을 이슈할 수 있다. 로컬 메모리 스토어 유닛(LMSU)이 이슈된 스토어 인스트럭션을 스토어 버퍼(SB)에 제공하면 스토어 버퍼(SB)가 입력된 순서에 따라서 순차적으로 스토어 엔진(SE)으로 메모리 액세스 요청을 전송할 수 있다.Additionally, the local memory store unit (LMSU) may fetch a store instruction for the L0 memory 111_2 and issue the store instruction. When the local memory store unit (LMSU) provides the issue store instruction to the store buffer (SB), memory access requests can be sequentially transmitted to the store engine (SE) according to the order in which the store buffer (SB) was input.
뉴럴 코어 로드 유닛(NCLU)은 CGRA 엔진(111)에 대한 로드 인스트럭션을 페치하고, 로드 인스트럭션을 이슈할 수 있다. 뉴럴 코어 로드 유닛(NCLU)이 이슈된 로드 인스트럭션을 로드 버퍼(LB)에 제공하면 로드 버퍼(LB)가 입력된 순서에 따라서 순차적으로 로드 엔진(LE)으로 메모리 액세스 요청을 전송할 수 있다.The neural core load unit (NCLU) can fetch load instructions for the
또한, 뉴럴 코어 스토어 유닛(NCSU)은 CGRA 엔진(111)에 대한 스토어 인스트럭션을 페치하고, 스토어 인스트럭션을 이슈할 수 있다. 뉴럴 코어 스토어 유닛(NCSU)이 이슈된 스토어 인스트럭션을 스토어 버퍼(SB)에 제공하면 스토어 버퍼(SB)가 입력된 순서에 따라서 순차적으로 스토어 엔진(SE)으로 메모리 액세스 요청을 전송할 수 있다.Additionally, the neural core store unit (NCSU) can fetch store instructions for the
로드 엔진(LE)은 메모리 액세스 요청을 수신하여 L2 인터커넥션(700)을 통해서 데이터를 불러올 수 있다. 이때, 로드 엔진(LE)은 변환 색인 버퍼(TLB)에서 최근에 사용된 가상 주소와 물리 주소의 변환 테이블을 이용하여 빠르게 데이터를 찾을 수 있다. 로드 엔진(LE)의 가상 주소가 변환 색인 버퍼(TLB)에 없는 경우에는 다른 메모리에서 주소 변환 정보를 찾을 수 있다.The load engine (LE) may receive a memory access request and load data through the
스토어 엔진(SE)은 메모리 액세스 요청을 수신하여 L2 인터커넥션(700)를 통해서 데이터를 불러올 수 있다. 이때, 스토어 엔진(SE)은 변환 색인 버퍼(TLB)에서 최근에 사용된 가상 주소와 물리 주소의 변환 테이블을 이용하여 빠르게 데이터를 찾을 수 있다. 스토어 엔진(SE)의 가상 주소가 변환 색인 버퍼(TLB)에 없는 경우에는 다른 메모리에서 주소 변환 정보를 찾을 수 있다.The store engine (SE) may receive a memory access request and load data through the
도 21은 도 15의 L0 메모리를 세부적으로 설명하기 위한 블록도이다.FIG. 21 is a block diagram for explaining the L0 memory of FIG. 15 in detail.
도 21을 참조하면, L0 메모리(111_2)는 아비터(Arb) 및 적어도 하나의 메모리 뱅크(bk)를 포함할 수 있다.Referring to FIG. 21, the L0 memory 111_2 may include an arbiter (Arb) and at least one memory bank (bk).
데이터가 L0 메모리(111_2)로 저장될 때, 아비터(Arb)는 로드 엔진(LE)으로부터 데이터를 수신할 수 있다. 이때, 데이터는 라운드 로빈(round robin) 방식으로 메모리 뱅크(bk)를 할당 받을 수 있다. 이에 따라서, 데이터는 적어도 하나의 메모리 뱅크(bk) 중 어느 하나에 저장될 수 있다.When data is stored in the L0 memory 111_2, the arbiter (Arb) can receive data from the load engine (LE). At this time, data can be allocated to a memory bank (bk) in a round robin manner. Accordingly, data may be stored in any one of at least one memory bank (bk).
반대로, 데이터가 L0 메모리(111_2)에서 로드될 때, 아비터(Arb)는 메모리 뱅크(bk)로부터 데이터를 수신하여 스토어 엔진(SE)으로 전달될 수 있다. 스토어 엔진(SE)은 로컬 인터커넥션(200)을 통해서 외부로 데이터를 저장시킬 수 있다.Conversely, when data is loaded from the L0 memory 111_2, the arbiter (Arb) may receive data from the memory bank (bk) and transfer it to the store engine (SE). The store engine (SE) can store data externally through the
도 22는 도 21의 L0 메모리 뱅크를 세부적으로 설명하기 위한 블록도이다.FIG. 22 is a block diagram for explaining the L0 memory bank of FIG. 21 in detail.
도 22를 참조하면, 메모리 뱅크(bk)는 뱅크 컨트롤러(bkc) 및 뱅크 셀 어레이(bkca)를 포함할 수 있다.Referring to FIG. 22, the memory bank (bk) may include a bank controller (bkc) and a bank cell array (bkca).
뱅크 컨트롤러(bkc)는 메모리 뱅크(bk)에 저장되는 데이터의 어드레스를 통해서 리드 및 라이트 동작을 관리할 수 있다. 즉, 뱅크 컨트롤러(bkc)는 데이터의 입출력을 전체적으로 관리할 수 있다.The bank controller (bkc) can manage read and write operations through the address of data stored in the memory bank (bk). In other words, the bank controller (bkc) can manage the overall input and output of data.
뱅크 셀 어레이(bkca)는 데이터가 직접 저장되는 셀이 행과 열을 맞춰 정렬된 구조일 수 있다. 뱅크 셀 어레이(bkca)는 뱅크 컨트롤러(bkc)에 의해서 제어될 수 있다.The bank cell array (bkca) may have a structure in which cells in which data is directly stored are aligned in rows and columns. The bank cell array (bkca) can be controlled by the bank controller (bkc).
도 23은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조를 설명하기 위한 블록도이다.Figure 23 is a block diagram to explain the software hierarchy of a neural processing device according to some embodiments of the present invention.
도 23을 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조는 DL 프레임워크(10000), 컴파일러 스택(20000) 및 백엔드 모듈(30000)을 포함할 수 있다.Referring to FIG. 23, the software layer structure of a neural processing device according to some embodiments of the present invention may include a DL framework 10000, a compiler stack 20000, and a backend module 30000.
DL 프레임워크(10000)는 사용자가 사용하는 딥러닝 모델 네트워크에 대한 프레임워크를 의미할 수 있다. 예를 들어, 텐서플로우나 파이토치와 같은 프로그램을 이용하여 학습이 완료된 뉴럴 네트워크 즉, 딥러닝 그래프가 생성될 수 있다. 딥러닝 그래프는 연산 작업의 코드 형태 표현일 수 있다.The DL framework (10000) may refer to a framework for a deep learning model network used by users. For example, a trained neural network, that is, a deep learning graph, can be created using programs such as TensorFlow or PyTorch. A deep learning graph can be a code-type representation of a computational task.
컴파일러 스택(20000)은 CGRA 컴파일러(CGCP) 및 메인 컴파일러(Mcp)를 포함할 수 있다. CGRA 컴파일러(CGCP)는 CGRA 엔진 레벨 컴파일링을 수행할 수 있다. 즉, CGRA 컴파일러(CGCP)는 CGRA 엔진(111) 내부의 최적화를 수행할 수 있다. CGRA 컴파일러(CGCP)는 CGRA 엔진 레벨 컴파일링을 통해서 컴퓨트 라이브러리(22000)에 연산 코드를 저장할 수 있다.The compiler stack 20000 may include a CGRA compiler (CGCP) and a main compiler (Mcp). The CGRA compiler (CGCP) can perform CGRA engine level compilation. That is, the CGRA compiler (CGCP) can perform internal optimization of the
이와 달리 메인 컴파일러(Mcp)는 L2 레벨 즉, CGRA 엔진 그룹 레벨 컴파일링을 수행할 수 있다. 즉, 메인 컴파일러(Mcp)는 CGRA 엔진 그룹(110), L2 메모리(300) 및 L2 인터커넥션(700) 사이의 작업 스케쥴링 등의 컴파일링을 수행할 수 있다. 본 실시예는 CGRA 컴파일링과 메인 컴파일링을 통해서 2번의 최적화를 수행할 수 있다.In contrast, the main compiler (Mcp) can perform L2 level compilation, that is, CGRA engine group level compilation. That is, the main compiler (Mcp) can perform compilation such as task scheduling between the
메인 컴파일러(Mcp)는 어댑테이션 레이어(21000), 컴퓨트 라이브러리(22000), 프론트엔드 컴파일러(23000), 백엔드 컴파일러(24000) 및 런타임 드라이버(25000)를 포함할 수 있다.The main compiler (Mcp) may include an adaptation layer (21000), a compute library (22000), a front-end compiler (23000), a back-end compiler (24000), and a runtime driver (25000).
어댑테이션 레이어(21000)는 DL 프레임워크(10000)에 접하는 레이어일 수 있다. 어댑테이션 레이어(21000)는 DL 프레임워크(10000)에서 생성된 유저의 신경망 모델 즉, 딥러닝 그래프를 양자화시키고 양자화 모델을 생성할 수 있다. 또한, 어댑테이션 레이어(21000)는 모델의 타입을 필요한 타입으로 변환시킬 수 있다. 양자화 모델 역시 딥러닝 그래프 형태일 수 있다.The adaptation layer (21000) may be a layer in contact with the DL framework (10000). The adaptation layer (21000) can quantize the user's neural network model, that is, the deep learning graph, created in the DL framework (10000) and generate a quantized model. Additionally, the adaptation layer 21000 can convert the model type into a required type. The quantization model may also be in the form of a deep learning graph.
프론트엔드 컴파일러(23000)는 어댑테이션 레이어(21000)에서 전달받은 양자화 모델을 일정한 중간 표현(intermediate representation, IR)으로 변환해줄 수 있다. 변환된 IR은 추후 백엔드 컴파일러(24000)에서 다루기 쉬운 미리 설정된 표현일 수 있다. The front-end compiler (23000) can convert the quantization model received from the adaptation layer (21000) into a certain intermediate representation (IR). The converted IR may be a preset expression that is easy to handle later in the
이러한, 프론트엔드 컴파일러(23000)의 IR은 그래프 차원에서 미리 할 수 있는 최적화가 수행될 수 있다. 또한, 프론트엔드 컴파일러(23000)는 하드웨어에 최적화된 레이아웃으로 변환시키는 작업을 통해서 최종적으로 IR을 생성할 수 있다.The IR of the front-
벡엔드 컴파일러(24000)는 프론트엔드 컴파일러(23000)에서 변환된 IR을 최적화하고 바이너리 파일로 변환하여 런타임 드라이버가 사용할 수 있게 한다. 백엔드 컴파일러(24000)는 하드웨어의 세부 사항에 맞는 스케일로 잡(job)을 분할하여 최적화된 코드를 생성할 수 있다. The backend compiler (24000) optimizes the IR converted from the frontend compiler (23000) and converts it into a binary file so that the runtime driver can use it. The back-end compiler (24000) can generate optimized code by dividing the job at a scale that matches the details of the hardware.
컴퓨트 라이브러리(22000)는 여러가지 오퍼레이션 중에 하드웨어에 적합한 형태로 설계된 템플릿 오퍼레이션을 저장할 수 있다. 컴퓨트 라이브러리(22000)는 하드웨어가 필요한 여러 템플릿 오퍼레이션을 벡엔드 컴파일러(24000)에 제공하여 최적화된 코드가 생성될 수 있게 한다. 이때, 컴퓨트 라이브러리(22000)는 CGRA 컴파일러(CGCP)로부터 연산 코드를 받아 템플릿 오퍼레이션으로 저장할 수 있다. 이에 따라서, 본 실시예는 이미 최적화를 수행한 템플릿 오퍼레이션이 다시 백엔드 컴파일러(24000)를 통해서 최적화되므로 2번의 최적화가 수행되는 것으로 볼 수 있다.The compute library 22000 can store template operations designed in a form suitable for hardware among various operations. The compute library 22000 provides several template operations that require hardware to the
런타임 드라이버(25000)는 구동 중에 계속해서 모니터링을 수행하여 본 발명의 몇몇 실시예들에 따른 뉴럴 네트워크 장치의 구동을 수행할 수 있다. 구체적으로, 뉴럴 네트워크 장치의 인터페이스의 실행을 담당할 수 있다.The runtime driver 25000 may continuously perform monitoring while driving to drive the neural network device according to some embodiments of the present invention. Specifically, it may be responsible for executing the interface of the neural network device.
백엔드 모듈(30000)는 ASIC(Application Specific Integrated Circuit)(31000), FPGA(Field programmable gate array)(32000) 및 C-model(33000)을 포함할 수 있다. ASIC(31000)은 미리 결정된 설계 방식에 따라 결정되는 하드웨어 칩을 의미할 수 있다. FPGA(32000)는 프로그래밍이 가능한 하드웨어 칩일 수 있다. C-model(33000)은 소프트웨어 상에 하드웨어를 모사하여 구현한 모델을 의미할 수 있다.The backend module 30000 may include an application specific integrated circuit (ASIC) 31000, a field programmable gate array (FPGA) 32000, and a C-model (33000). ASIC (31000) may refer to a hardware chip determined according to a predetermined design method. FPGA 32000 may be a programmable hardware chip. C-model (33000) may refer to a model implemented by simulating hardware in software.
백엔드 모듈(30000)은 컴파일러 스택(20000)을 통해서 생성된 바이너리 코드를 이용하여 다양한 작업을 수행하고 결과를 도출할 수 있다.The backend module 30000 can perform various tasks and derive results using binary code generated through the compiler stack 20000.
도 24는 도 23의 CGRA 컴파일러의 구조를 세부적으로 설명하기 위한 블록도이다.FIG. 24 is a block diagram to explain in detail the structure of the CGRA compiler of FIG. 23.
도 5 및 도 24를 참조하면, CGRA 컴파일러(CGCP)는 CE 디멘젼 결정기(26000) 및 CE 스케쥴러(27000)를 포함할 수 있다.5 and 24, the CGRA compiler (CGCP) may include a CE dimension determiner (26000) and a CE scheduler (27000).
CE 디멘젼 결정기(26000)는 입력된 연산 작업에 따라 CGRA 엔진(111)의 스케일을 결정할 수 있다. 즉, CGRA 엔진(111)에 포함되는 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)의 개수를 CE 디멘젼 결정기(26000)가 결정하여 최적의 연산 작업을 수행할 수 있다.The
나아가, CE 디멘젼 결정기(26000)는 CGRA 엔진 그룹(110)가 포함하는 CGRA 엔진(111)의 개수를 결정할 수도 있다. 즉, CGRA 엔진(111)의 디멘젼과 CGRA 엔진 그룹(110)의 디멘젼이 결정되어 최종적인 계층 구조의 단위 구조와 클러스터 구조가 확정될 수 있다.Furthermore, the
CE 스케쥴러(27000)는 CP 레벨 스케쥴링을 수행할 수 있다. CE 스케쥴러(27000)는 즉, CGRA 엔진(111) 내부의 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)의 작업 스케쥴링을 수행할 수 있다. 이에 따라서, 각 작업의 연산에 대한 연산 코드가 생성될 수 있다.The CE scheduler (27000) can perform CP level scheduling. The
도 25는 도 24의 CGRA 엔진 스케쥴러의 구조를 세부적으로 설명하기 위한 블록도이다.Figure 25 is a block diagram to explain in detail the structure of the CGRA engine scheduler of Figure 24.
도 25를 참조하면, CGRA 엔진 스케쥴러(27000)는 CFG(Control-Flow Graph) 생성 모듈(27100), 언롤링 모듈(27200), 하이퍼블로킹 모듈(27300), 제한 모듈(27500) 및 스케쥴링 모듈(27400)을 포함할 수 있다.Referring to FIG. 25, the CGRA engine scheduler (27000) includes a Control-Flow Graph (CFG) generation module (27100), an unrolling module (27200), a hyperblocking module (27300), a limiting module (27500), and a scheduling module (27400). ) may include.
CFG 생성 모듈(27100)은 딥러닝 DL 프레임워크(10000)로부터 딥러닝 그래프를 수신할 수 있다. 딥러닝 그래프는 DL 프레임워크에 의해서 작성된 코드 형태로 표현될 수 있다. CFG 생성 모듈(27100)은 딥러닝 그래프를 오퍼레이션 단위의 노드와 엣지로 구성된 CFG(CFG)로 변환할 수 있다. CFG(CFG)는 지정된 횟수만큼 반복하여 처리되는 루프를 포함할 수 있고, 조건에 따라 분기되는 조건 분기 구조를 포함할 수도 있다.The CFG generation module 27100 may receive a deep learning graph from the deep learning DL framework 10000. Deep learning graphs can be expressed in the form of code written by a DL framework. The CFG generation module 27100 can convert a deep learning graph into a CFG (CFG) consisting of nodes and edges in operation units. CFG (CFG) may include a loop that is processed repeatedly a specified number of times, and may also include a conditional branch structure that branches according to a condition.
언롤링 모듈(27200)은 CFG(CFG)에 포함된 루프를 언롤링할 수 있다. 추가적으로, 언롤링 모듈은 루프 필링, 루프 플랫트닝 및 인라이닝을 수행할 수도 있다. 언롤링 모듈(27200)은 CFG(CFG)에 포함된 루프를 언롤링하여 언롤 CFG(UCFG)를 생성할 수 있다.The unrolling module 27200 can unroll a loop included in CFG (CFG). Additionally, the unrolling module may perform loop peeling, loop flattening, and inlining. The unrolling module 27200 may generate an unrolled CFG (UCFG) by unrolling a loop included in the CFG (CFG).
하이퍼블로킹 모듈(27300)은 언롤 CFG(UCFG)를 수신하여 조건 분기 구조를 재구성하여 하이퍼블럭을 생성할 수 있다. 하이퍼블럭은 서로 다른 블록 중 동일한 조건에 대한 블록을 병합하여 생성될 수 있다. 하이퍼블로킹 모듈(27300)은 하이퍼블로킹 CFG(HCFG)를 생성할 수 있다.The hyperblocking module 27300 can generate a hyperblock by receiving an unroll CFG (UCFG) and reconstructing the conditional branch structure. Hyperblocks can be created by merging blocks with the same conditions among different blocks. The hyperblocking module 27300 can generate hyperblocking CFG (HCFG).
제한 모듈(27500)은 미리 작성된 전문가들의 지식을 기반으로 생성된 하드웨어 제한(Cst)을 저장할 수 있다. 하드웨어 제한(Cst)은 특정 오퍼레이션을 최적화하여 미리 설계해둔 정보를 포함할 수 있다. 즉, 하드웨어 제한은 특정 인풋 연산을 수행할 때, 어떤 방식으로 CGRA 엔진(111)을 재구성할지에 대한 가이드라인으로 작용할 수 있다.The constraint module 27500 may store a hardware constraint (Cst) created based on pre-written experts' knowledge. Hardware limits (Cst) may include information designed in advance to optimize specific operations. In other words, hardware limitations can serve as a guideline on how to reconfigure the
스케쥴링 모듈(27400)은 하이퍼블로킹 CFG(HCFG)를 수신하고, 하드웨어 제한(Cst)을 수신할 수 있다. 스케쥴링 모듈(27400)은 하드웨어 제한(Cst)을 기반으로 하이퍼블로킹 CFG(HCFG)를 연산 코드(SC)로 변환하여 생성할 수 있다.The scheduling module 27400 may receive a hyperblocking CFG (HCFG) and receive a hardware limit (Cst). The scheduling module 27400 can generate hyperblocking CFG (HCFG) by converting it into operation code (SC) based on the hardware limit (Cst).
도 26은 도 25의 제한 모듈에 따라 컴파일된 CGRA 엔진을 설명하기 위한 블록도이다.FIG. 26 is a block diagram for explaining the CGRA engine compiled according to the restriction module of FIG. 25.
도 26을 참조하면, CGRA 엔진(111)의 PE 어레이(111_3)는 매트릭스 멀티플리케이션을 수행할 때 프로세싱 엘리먼트(111_3a)를 멀티플라이어로 구성하고, 특정 프로세싱 엘리먼트(111_3b)를 어큐뮬레이터로 구성할 수 있다. 이러한 구성은 기존의 하드웨어 구현의 이력을 통해서 설정될 수 있다. 즉, 하드웨어 제한(Cst)은 피연산자와 연산자의 구성을 어떤 방식으로 할지에 대한 가이드를 제공할 수 있다.Referring to FIG. 26, when performing matrix multiplication, the PE array 111_3 of the
도 27은 도 23의 프론트엔드 컴파일러의 구조를 세부적으로 설명하기 위한 블록도이다.Figure 27 is a block diagram to explain in detail the structure of the front-end compiler of Figure 23.
도 27을 참조하면, 프론트엔드 컴파일러(23000)는 L2 스케쥴러(23100)를 포함할 수 있다. Referring to FIG. 27, the front-
L2 스케쥴러(23100)는 L2 레벨 즉, CGRA 엔진 그룹 레벨의 스케쥴링을 수행할 수 있다. 즉, L2 스케쥴러(23100)는 딥러닝 그래프를 수신하고, 그 연산 작업을 타일링하여 각각의 CGRA 엔진 클러스터(100)와 CGRA 엔진 그룹(110)의 레벨에서 스케쥴링을 수행할 수 있다. 본 실시예는, CGRA 엔진 레벨의 스케쥴링과 CGRA 엔진 그룹 레벨의 스케쥴링이 모두 존재하여 최적화의 효율을 극대화시킬 수 있다.The
도 28은 도 23의 백엔드 컴파일러의 구조를 세부적으로 설명하기 위한 블록도이다.FIG. 28 is a block diagram to explain in detail the structure of the backend compiler of FIG. 23.
도 28을 참조하면, 백엔드 컴파일러(24000)는 코드 제네레이터(24100) 및 CE 코드 제네레이터(24200)를 포함할 수 있다. Referring to FIG. 28, the
코드 제네레이터(24100)는 컴퓨트 라이브러리(22000)를 참조할 수 있다. 코드 제네레이터(24100)는 컴퓨트 라이브러리(22000)에 저장된 연산 코드(SC)를 기반으로 파셜 바이너리 코드를 생성할 수 있다. 파셜 바이너리 코드는 추후에 합산되어 바이너리 코드를 구성하는 코드일 수 있다. 연산 코드(SC)는 오퍼레이션 기반으로 저장되어 있으므로 파셜 바이너리 코드도 오퍼레이션 기반으로 생성될 수 있다.The
CE 코드 제네레이터(24200)는 파셜 바이너리 코드를 수신할 수 있다. CE 코드 제네레이터(24200)는 여러 파셜 바이너리 코드를 합산하여 최종적인 바이너리 코드를 생성할 수 있다. CE 코드 제네레이터(24200)는 바이너리 코드를 런타임 드라이버(25000)로 전송할 수 있다.The
도 29는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치가 수행하는 딥 러닝 연산을 설명하기 위한 개념도이다.Figure 29 is a conceptual diagram to explain a deep learning operation performed by a neural processing device according to some embodiments of the present invention.
도 29를 참조하면, 인공신경망 모델(40000)은, 기계학습 모델의 일 예로서, 기계학습(Machine Learning) 기술과 인지과학에서, 생물학적 신경망의 구조에 기초하여 구현된 통계학적 학습 알고리즘 또는 그 알고리즘을 실행하는 구조이다.Referring to FIG. 29, the artificial
인공신경망 모델(40000)은, 생물학적 신경망에서와 같이 시냅스의 결합으로 네트워크를 형성한 인공 뉴런인 노드(Node)들이 시냅스의 가중치를 반복적으로 조정하여, 특정 입력에 대응한 올바른 출력과 추론된 출력 사이의 오차가 감소되도록 학습함으로써, 문제 해결 능력을 가지는 기계학습 모델을 나타낼 수 있다. 예를 들어, 인공신경망 모델(40000)은 기계 학습, 딥러닝 등의 인공지능 학습법에 사용되는 임의의 확률 모델, 뉴럴 네트워크 모델 등을 포함할 수 있다.In the artificial neural network model (40000), as in a biological neural network, nodes, which are artificial neurons that form a network through the combination of synapses, repeatedly adjust the weights of the synapses to determine the difference between the correct output corresponding to a specific input and the inferred output. By learning to reduce the error of , a machine learning model with problem-solving capabilities can be expressed. For example, the artificial
본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 이러한 인공신경망 모델(40000)의 형태를 구현하여 연산을 수행할 수 있다. 예를 들어, 인공신경망 모델(40000)은 입력 영상을 수신하고, 입력 영상에 포함된 대상의 적어도 일부에 대한 정보를 출력할 수 있다.A neural processing device according to some embodiments of the present invention may perform calculations by implementing this type of artificial neural network model (40000). For example, the artificial
인공신경망 모델(40000)은 다층의 노드들과 이들 사이의 연결로 구성된 다층 퍼셉트론(MLP: multilayer perceptron)으로 구현된다. 본 실시예에 따른 인공신경망 모델(40000)은 MLP를 포함하는 다양한 인공신경망 모델 구조들 중의 하나를 이용하여 구현될 수 있다. 도 25에 도시된 바와 같이, 인공신경망 모델(40000)은, 외부로부터 입력 신호 또는 데이터(40100)를 수신하는 입력층(41000), 입력 데이터에 대응한 출력 신호 또는 데이터(40200)를 출력하는 출력층(44000), 입력층(41000)과 출력층(44000) 사이에 위치하며 입력층(41000)으로부터 신호를 받아 특성을 추출하여 출력층(44000)으로 전달하는 n개(여기서, n은 양의 정수)의 은닉층(42000 내지 43000)으로 구성된다. 여기서, 출력층(44000)은 은닉층(42000 내지 43000)으로부터 신호를 받아 외부로 출력한다.The artificial neural network model (40000) is implemented as a multilayer perceptron (MLP) consisting of multiple layers of nodes and connections between them. The artificial
인공신경망 모델(40000)의 학습 방법에는, 교사 신호(정답)의 입력에 의해서 문제의 해결에 최적화되도록 학습하는 지도 학습(Supervised Learning) 방법과, 교사 신호를 필요로 하지 않는 비지도 학습(Unsupervised Learning) 방법이 있다. The learning methods of the artificial neural network model (40000) include supervised learning, which learns to optimize problem solving by inputting teacher signals (correct answers), and unsupervised learning, which does not require teacher signals. ) There is a way.
뉴럴 프로세싱 장치는 인공신경망 모델(40000)을 학습시키기 위한 학습 데이터를 시뮬레이션을 통해 직접 생성할 수 있다. 이와 같이, 인공신경망 모델(40000)의 입력층(41000)과 출력층(44000)에 복수의 입력변수와 대응되는 복수의 출력변수가 각각 매칭되고, 입력층(41000), 은닉층(42000 내지 43000) 및 출력층(44000)에 포함된 노드들 사이의 시냅스 값이 조정됨으로써, 특정 입력에 대응한 올바른 출력이 추출될 수 있도록 학습될 수 있다. 이러한 학습 과정을 통해, 인공신경망 모델(40000)의 입력변수에 숨겨져 있는 특성을 파악할 수 있고, 입력변수에 기초하여 계산된 출력변수와 목표 출력 간의 오차가 줄어들도록 인공신경망 모델(40000)의 노드들 사이의 시냅스 값(또는 웨이트)을 조정할 수 있다. The neural processing device can directly generate learning data for training the artificial neural network model (40000) through simulation. In this way, a plurality of input variables and a plurality of output variables corresponding to the
도 30은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 뉴럴 네트워크의 학습 및 추론 동작을 설명하기 위한 개념도이다.FIG. 30 is a conceptual diagram illustrating learning and inference operations of a neural network of a neural processing device according to some embodiments of the present invention.
도 30을 참조하면, 학습 과정(Training Phase)에서는 다수의 학습 자료(TD)들이 인공신경망 모델(NN)로 포워딩되고, 다시 백워딩되는 과정을 거칠 수 있다. 이를 통해서 인공신경망 모델(NN)의 각 노드의 웨이트와 바이어스들이 조율되고 이를 통해서 점점 더욱 정확한 결과를 도출할 수 있게 학습이 수행될 수 있다. 이렇게 학습 과정(Training Phase)을 통해서 인공신경망 모델(NN)은 학습된 신경망 모델(NN_T)로 변환될 수 있다. Referring to FIG. 30, in the training phase, a number of learning data (TD) may be forwarded to an artificial neural network model (NN) and then forwarded back again. Through this, the weights and biases of each node of the artificial neural network model (NN) are adjusted, and through this, learning can be performed to produce increasingly accurate results. Through this learning process (Training Phase), the artificial neural network model (NN) can be converted into a learned neural network model (NN_T).
추론 과정(Inference Phase)에서는 새로운 데이터(ND)가 다시 학습된 신경망 모델(NN_T)로 입력될 수 있다. 학습된 신경망 모델(NN_T)은 새로운 데이터(ND)를 입력으로 하여 이미 학습된 웨이트와 바이어스를 통해서 결과 데이터(RD)를 도출할 수 있다. 이러한 결과 데이터(RD)는 학습 과정(Training Phase)에서 어떤 학습 자료(TD)로 학습하였는지와, 얼마나 많은 학습 자료(TD)를 이용하였는지가 중요할 수 있다.In the inference phase, new data (ND) can be input back into the learned neural network model (NN_T). The learned neural network model (NN_T) can take new data (ND) as input and derive result data (RD) through already learned weights and biases. This result data (RD) may be important in terms of which learning materials (TD) were used in the training process (Training Phase) and how much learning materials (TD) were used.
이하, 도 11, 도 14 및 도 31을 참조하여 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 제어 방법을 설명한다. 상술한 실시예와 중복되는 부분은 생략하거나 간략히 한다.Hereinafter, a control method of a neural processing device according to some embodiments of the present invention will be described with reference to FIGS. 11, 14, and 31. Parts that overlap with the above-described embodiments are omitted or simplified.
도 31은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 제어 방법을 설명하기 위한 순서도이다.31 is a flowchart illustrating a control method of a neural processing device according to some embodiments of the present invention.
도 31을 참조하면, 모니터링 정보를 수신하여 성능 문제를 검출한다(S100).Referring to FIG. 31, monitoring information is received and performance problems are detected (S100).
구체적으로, 도 11 및 도 14를 참조하면, 시퀀서(200)는 이러한 모니터링 정보(Im)를 수신하여 성능 문제를 검출할 수 있다. 구체적으로, 성능 문제는 밴드위스가 제한되는 문제 또는 연산 성능이 제한되는 문제 중 적어도 하나일 수 있다.Specifically, referring to FIGS. 11 and 14 , the
모니터링 모듈(250)은 모니터링 정보(Im)를 수신할 수 있다. 모니터링 모듈(250)은 모니터링 정보(Im)를 통해서, 어떠한 성능 문제가 있는지 검출할 수 있다. 예를 들어, 밴드위스가 제한되는지, 연산 성능이 제한되는지 등을 분석할 수 있다. 밴드위스가 제한되는 경우 오프 칩 메모리(30)가 제한되는지, L2 메모리(300)가 제한되는지 아니면, L2 인터커넥션(700)이 제한되는 건지를 식별할 수 있다.The
다시, 도 31을 참조하면, 밴드위스가 제한되었는지를 판단한다(S200).Again, referring to FIG. 31, it is determined whether the bandwidth is limited (S200).
만일 밴드위스가 제한된 것이 아닌 경우, 연산 성능이 제한되었는지를 판단한다(S300). 만일 그렇다면 CGRA 엔진 성능을 상승시키는 제어를 수행한다(S500).If the bandwidth is not limited, it is determined whether the computational performance is limited (S300). If so, control to increase CGRA engine performance is performed (S500).
구체적으로, 도 14를 참조하면, 프로세서 컨트롤러(260)는 연산 성능이 제한되는 경우 CGRA 엔진(111)의 공급전력이나 프리퀀시를 상승 제어하는 프로세서 제어 신호(Proc_Cont)를 생성할 수 있다. 프로세서 컨트롤러(260)는 CGRA 엔진(111)로 프로세서 제어 신호(Proc_Cont)를 전송할 수 있다.Specifically, referring to FIG. 14 , the
다시, 도 31을 참조하면, S200 단계에서 밴드위스가 제한된 것인 경우, 오프 칩 메모리가 제한되었는지를 판단한다(S400). 만일 그렇다면, 오프 칩 메모리 트래픽을 하향 제어한다(S600).Again, referring to FIG. 31, if the bandwidth is limited in step S200, it is determined whether the off-chip memory is limited (S400). If so, off-chip memory traffic is controlled downward (S600).
구체적으로, 도 14를 참조하면, 컴프레션 액티베이터(270)는 오프 칩 메모리(30)가 제한되는 경우, 오프 칩 메모리(30)의 트래픽의 압축을 수행하고, 다시 압축 해제를 하게하는 메모리 제어 신호(Mem_Cont)를 생성할 수 있다. 이를 통해, 컴프레션 액티베이터(270)는 오프 칩 메모리(30)의 트래픽 문제를 해결할 수 있다. 메모리 제어 신호(Mem_Cont)는 컴프레션 엔진과 디컴프레션 엔진을 활성화시켜 압축과 압축해제를 수행할 수 있다. 이때, 압축 및 압축해제는 트랙픽 하향 제어의 하나의 예시에 불과하고, 본 실시예가 이에 제한되는 것은 아니다.Specifically, referring to FIG. 14, when the off-
다시, 도 31을 참조하면, 만일 S400 단계에서 오프 칩 메모리가 제한된 것이 아닌 경우, L2 메모리가 제한되었는지를 판단한다(S700). 만일 그렇다면, L2 메모리 트랙픽을 하향 제어한다(S800).Again, referring to FIG. 31, if the off-chip memory is not restricted in step S400, it is determined whether the L2 memory is restricted (S700). If so, L2 memory traffic is controlled downward (S800).
구체적으로, 도 14를 참조하면, 컴프레션 액티베이터(270)는 L2 메모리(300)가 제한되는 경우, L2 메모리(300)의 트래픽의 압축을 수행하고, 다시 압축 해제를 하게하는 메모리 제어 신호(Mem_Cont)를 생성할 수 있다. 이를 통해, 컴프레션 액티베이터(270)는 L2 메모리(300)의 트래픽 문제를 해결할 수 있다. 이때, 압축 및 압축해제는 트랙픽 하향 제어의 하나의 예시에 불과하고, 본 실시예가 이에 제한되는 것은 아니다.Specifically, referring to FIG. 14, when the
다시, 도 31을 참조하면, S700 단계에서 L2 메모리가 제한된 것이 아닌 경우, 인터커넥션 성능을 상승시키는 제어를 수행한다(S900).Again, referring to FIG. 31, if the L2 memory is not limited in step S700, control to increase interconnection performance is performed (S900).
구체적으로, 도 14를 참조하면, 인터커넥트 컨트롤러(280)는 밴드위스가 제한되고, 오프 칩 메모리(30) 또는 L2 메모리(300)가 제한되는 경우, L2 인터커넥션(700)의 프리퀀시를 오버드라이브하게하는 인터커넥션 제어 신호(Inter_Cont)를 생성할 수 있다. 인터커넥션 제어 신호(Inter_Cont)는 L2 인터커넥션(700)의 프리퀀시를 상승시켜 밴드위스 제한 문제를 해결할 수 있다. 이때, 프리퀀시 오버드라이브는 인터커넥션 성능 상승 제어의 하나의 예시에 불과하고, 본 실시예가 이에 제한되는 것은 아니다.Specifically, referring to FIG. 14, the
이하, 도 23 내지 도 25, 도 27 및 도 32 내지 도 35를 참조하여 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 제어 방법을 설명한다. 상술한 실시예와 중복되는 부분은 생략하거나 간략히 한다.Hereinafter, a control method of a neural processing device according to some embodiments of the present invention will be described with reference to FIGS. 23 to 25, 27, and 32 to 35. Parts that overlap with the above-described embodiments are omitted or simplified.
도 32는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 컴파일링 방법을 설명하기 위한 순서도이고, 도 33은 도 32의 저장 단계를 세부적으로 설명하기 위한 순서도이다. 도 34는 도 33의 저장 단계를 스케쥴링 단계를 세부적으로 설명하기 위한 순서도이고, 도 35는 도 32의 바이너리 코드 생성 단계를 세부적으로 설명하기 위한 순서도이다.FIG. 32 is a flowchart for explaining a compilation method of a neural processing device according to some embodiments of the present invention, and FIG. 33 is a flowchart for explaining the storage step of FIG. 32 in detail. FIG. 34 is a flowchart for explaining in detail the storage step of FIG. 33 and the scheduling step, and FIG. 35 is a flowchart for explaining the binary code generation step of FIG. 32 in detail.
도 32를 참조하면, 딥러닝 프레임워크로 작성된 딥러닝 그래프를 수신한다(S1100).Referring to Figure 32, a deep learning graph created with a deep learning framework is received (S1100).
구체적으로, 도 23을 참조하면, DL 프레임워크(10000)는 사용자가 사용하는 딥러닝 모델 네트워크에 대한 프레임워크를 의미할 수 있다. 예를 들어, 텐서플로우나 파이토치와 같은 프로그램을 이용하여 학습이 완료된 뉴럴 네트워크 즉, 딥러닝 그래프가 생성될 수 있다. 딥러닝 그래프는 연산 작업의 코드 형태 표현일 수 있다.Specifically, referring to FIG. 23, the DL framework 10000 may refer to a framework for a deep learning model network used by a user. For example, a trained neural network, that is, a deep learning graph, can be created using programs such as TensorFlow or PyTorch. A deep learning graph can be a code-type representation of a computational task.
다시, 도 32를 참조하면, CGRA 컴파일을 통한 연산 코드를 컴퓨트 라이브러리에 저장한다(S1200).Again, referring to FIG. 32, the operation code through CGRA compilation is stored in the compute library (S1200).
세부적으로, 도 33을 참조하면, CGRA 엔진의 디멘젼을 결정한다(S1210).In detail, referring to FIG. 33, the dimensions of the CGRA engine are determined (S1210).
구체적으로, 도 24를 참조하면, CE 디멘젼 결정기(26000)는 입력된 연산 작업에 따라 CGRA 엔진(111)의 스케일 즉, 디멘젼을 결정할 수 있다. 즉, CGRA 엔진(111)에 포함되는 프로세싱 엘리먼트(111_3a) 및 특정 프로세싱 엘리먼트(111_3b)의 개수를 CE 디멘젼 결정기(26000)가 결정하여 최적의 연산 작업을 수행할 수 있다.Specifically, referring to FIG. 24, the
나아가, CE 디멘젼 결정기(26000)는 CGRA 엔진 그룹(110)이 포함하는 CGRA 엔진(111)의 개수를 결정할 수도 있다. 즉, CGRA 엔진(111)의 디멘젼과 CGRA 엔진 그룹(110)의 디멘젼이 결정되어 최종적인 계층 구조의 단위 구조와 클러스터 구조가 확정될 수 있다.Furthermore, the
다시, 도 33을 참조하면, CGRA 엔진 레벨 스케쥴링을 수행한다(S1220).Again, referring to FIG. 33, CGRA engine level scheduling is performed (S1220).
세부적으로 도 34를 참조하면, CFG를 생성한다(S1221).Referring to FIG. 34 in detail, CFG is created (S1221).
구체적으로, 도 25를 참조하면, CFG 생성 모듈(27100)은 딥러닝 DL 프레임워크(10000)로부터 딥러닝 그래프를 수신할 수 있다. 딥러닝 그래프는 DL 프레임워크에 의해서 작성된 코드 형태로 표현될 수 있다. CFG 생성 모듈(27100)은 딥러닝 그래프를 오퍼레이션 단위의 노드와 엣지로 구성된 CFG(CFG)로 변환할 수 있다. CFG(CFG)는 지정된 횟수만큼 반복하여 처리되는 루프를 포함할 수 있고, 조건에 따라 분기되는 조건 분기 구조를 포함할 수도 있다.Specifically, referring to FIG. 25, the CFG generation module 27100 may receive a deep learning graph from the deep learning DL framework 10000. Deep learning graphs can be expressed in the form of code written by a DL framework. The CFG generation module 27100 can convert a deep learning graph into a CFG (CFG) consisting of nodes and edges in operation units. CFG (CFG) may include a loop that is processed repeatedly a specified number of times, and may also include a conditional branch structure that branches according to a condition.
다시, 도 34를 참조하면, CFG 언롤링을 수행한다(S1222).Again, referring to FIG. 34, CFG unrolling is performed (S1222).
구체적으로, 도 25를 참조하면, 언롤링 모듈(27200)은 CFG(CFG)에 포함된 루프를 언롤링할 수 있다. 추가적으로, 언롤링 모듈은 루프 필링, 루프 플랫트닝 및 인라이닝을 수행할 수도 있다. 언롤링 모듈(27200)은 CFG(CFG)에 포함된 루프를 언롤링하여 언롤 CFG(UCFG)를 생성할 수 있다.Specifically, referring to FIG. 25, the unrolling module 27200 can unroll a loop included in CFG (CFG). Additionally, the unrolling module may perform loop peeling, loop flattening, and inlining. The unrolling module 27200 may generate an unrolled CFG (UCFG) by unrolling a loop included in the CFG (CFG).
다시, 도 34를 참조하면, 하이퍼블럭을 형성한다(S1223).Again, referring to FIG. 34, a hyperblock is formed (S1223).
구체적으로, 도 25를 참조하면, 하이퍼블로킹 모듈(27300)은 언롤 CFG(UCFG)를 수신하여 조건 분기 구조를 재구성하여 하이퍼블럭을 생성할 수 있다. 하이퍼블럭은 서로 다른 블록 중 동일한 조건에 대한 블록을 병합하여 생성될 수 있다. 하이퍼블로킹 모듈(27300)은 하이퍼블로킹 CFG(HCFG)를 생성할 수 있다.Specifically, referring to FIG. 25, the hyperblocking module 27300 may receive an unroll CFG (UCFG) and reconstruct the conditional branch structure to generate a hyperblock. Hyperblocks can be created by merging blocks with the same conditions among different blocks. The hyperblocking module 27300 can generate hyperblocking CFG (HCFG).
다시, 도 34를 참조하면, 미리 설정된 하드웨어 제한에 따른 CGRA 엔진 레벨 스케쥴링을 수행한다(S1224). 이어서, 연산 코드를 생성한다(S1225).Again, referring to FIG. 34, CGRA engine level scheduling is performed according to preset hardware limitations (S1224). Next, an operation code is generated (S1225).
구체적으로, 도 25를 참조하면, 제한 모듈(27500)은 미리 작성된 전문가들의 지식을 기반으로 생성된 하드웨어 제한(Cst)을 저장할 수 있다. 하드웨어 제한(Cst)은 특정 오퍼레이션을 최적화할 때, 어떤 방식으로 구현할지에 대해서 미리 설계해둔 정보일 수 있다. 즉, 하드웨어 제한은 특정 인풋 연산을 수행할 때, 어떤 방식으로 CGRA 엔진(111)을 재구성할지에 대한 가이드라인으로 작용할 수 있다.Specifically, referring to FIG. 25, the constraint module 27500 may store a hardware constraint (Cst) generated based on pre-written experts' knowledge. Hardware limitations (Cst) may be information designed in advance about how to implement a specific operation when optimizing it. In other words, hardware limitations can serve as a guideline on how to reconfigure the
스케쥴링 모듈(27400)은 하이퍼블로킹 CFG(HCFG)를 수신하고, 하드웨어 제한(Cst)을 수신할 수 있다. 스케쥴링 모듈(27400)은 하드웨어 제한(Cst)을 기반으로 하이퍼블로킹 CFG(HCFG)를 연산 코드(SC)로 변환하여 생성할 수 있다. CGRA 컴파일러(CGCP)는 CGRA 엔진 레벨 컴파일링을 통해서 컴퓨트 라이브러리(22000)에 연산 코드를 저장할 수 있다.The scheduling module 27400 may receive a hyperblocking CFG (HCFG) and receive a hardware limit (Cst). The scheduling module 27400 can generate hyperblocking CFG (HCFG) by converting it into operation code (SC) based on the hardware limit (Cst). The CGRA compiler (CGCP) can store operation codes in the compute library 22000 through CGRA engine level compilation.
다시, 도 32를 참조하면, 딥러닝 그래프를 최적화하여 IR을 생성한다(S1300).Again, referring to FIG. 32, the deep learning graph is optimized to generate IR (S1300).
구체적으로, 도 23을 참조하면, 프론트엔드 컴파일러(23000)는 어댑테이션 레이어(21000)에서 전달받은 다양한 신경망 모델 및 그래프를 일정한 중간 표현(intermediate representation, IR)으로 변환해줄 수 있다. 변환된 IR은 추후 백엔드 컴파일러(24000)에서 다루기 쉬운 미리 설정된 표현일 수 있다. Specifically, referring to FIG. 23, the front-
다시, 도 32를 참조하면, IR에 따라 L2 레벨 스케쥴링을 수행한다(S1400).Again, referring to FIG. 32, L2 level scheduling is performed according to IR (S1400).
도 27을 참조하면, L2 스케쥴러(23100)는 L2 레벨 즉, CGRA 엔진 그룹 레벨의 스케쥴링을 수행할 수 있다. 즉, L2 스케쥴러(23100)는 딥러닝 그래프를 수신하고, 그 연산 작업을 타일링하여 각각의 CGRA 엔진 클러스터(100)와 CGRA 엔진 그룹(110)의 레벨에서 스케쥴링을 수행할 수 있다. 본 실시예는, CGRA 엔진 레벨의 스케쥴링과 CGRA 엔진 그룹 레벨의 스케쥴링이 모두 존재하여 최적화의 효율을 극대화시킬 수 있다.Referring to FIG. 27, the
다시, 도 32를 참조하면, 컴퓨트 라이브러리에 따른 바이너리 코드를 생성한다(S1500).Again, referring to FIG. 32, binary code according to the compute library is generated (S1500).
세부적으로, 도 35를 참조하면, 파셜 바이너리 코드를 생성한다(S1510).In detail, referring to FIG. 35, a partial binary code is generated (S1510).
도 28을 참조하면, 코드 제네레이터(24100)는 컴퓨트 라이브러리(22000)를 참조할 수 있다. 코드 제네레이터(24100)는 컴퓨트 라이브러리(22000)에 저장된 연산 코드(SC)를 기반으로 파셜 바이너리 코드를 생성할 수 있다. 파셜 바이너리 코드는 추후에 합산되어 바이너리 코드를 구성하는 코드일 수 있다. 연산 코드(SC)는 오퍼레이션 기반으로 저장되어 있으므로 파셜 바이너리 코드도 오퍼레이션 기반으로 생성될 수 있다.Referring to FIG. 28, the
다시, 도 35를 참조하면, 바이너리 코드를 생성한다(S1520).Again, referring to FIG. 35, binary code is generated (S1520).
도 28을 참조하면, CE 코드 제네레이터(24200)는 파셜 바이너리 코드를 수신할 수 있다. CE 코드 제네레이터(24200)는 여러 파셜 바이너리 코드를 합산하여 최종적인 바이너리 코드를 생성할 수 있다. CE 코드 제네레이터(24200)는 바이너리 코드를 런타임 드라이버(25000)로 전송할 수 있다.Referring to FIG. 28, the
이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely an illustrative explanation of the technical idea of this embodiment, and those skilled in the art will be able to make various modifications and variations without departing from the essential characteristics of this embodiment. Accordingly, the present embodiments are not intended to limit the technical idea of the present embodiment, but rather to explain it, and the scope of the technical idea of the present embodiment is not limited by these examples. The scope of protection of this embodiment should be interpreted in accordance with the claims below, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of rights of this embodiment.
Claims (20)
상기 적어도 하나의 CGRA 엔진 그룹이 서로 공유하는 L2 메모리;
상기 적어도 하나의 CGRA 엔진 그룹 및 상기 L2 메모리 사이에서 서로 데이터를 교환하는 L2 인터커넥션; 및
상기 적어도 하나의 CGRA 엔진 및 상기 L2 인터커넥션과 상기 적어도 하나의 CGRA 엔진 사이의 퍼포먼스에 대한 모니터링 정보를 수신하고, 상기 모니터링 정보에 따라 상기 적어도 하나의 CGRA 엔진, 상기 L2 메모리 및 상기 L2 인터커넥션 중 적어도 하나에 대해 하드웨어 리소스를 개별적으로 제공하는 시퀀서를 포함하는,
뉴럴 프로세싱 장치.
At least one CGRA Engine Group, each including at least one CGRA Engine;
L2 memory shared by the at least one CGRA engine group;
an L2 interconnection for exchanging data between the at least one CGRA engine group and the L2 memory; and
Receive monitoring information about performance between the at least one CGRA engine and the L2 interconnection and the at least one CGRA engine, and perform a function among the at least one CGRA engine, the L2 memory, and the L2 interconnection according to the monitoring information. Comprising a sequencer that individually provides hardware resources for at least one,
Neural processing device.
상기 모니터링 정보는 상기 적어도 하나의 CGRA 엔진의 밴드위스, 레이턴시, 공급전력 및 온도 중 적어도 하나를 포함하는,
뉴럴 프로세싱 장치.
According to claim 1,
The monitoring information includes at least one of bandwidth, latency, supply power, and temperature of the at least one CGRA engine.
Neural processing device.
상기 시퀀서는,
상기 적어도 하나의 CGRA 엔진에 대한 모니터링 정보와 상기 L2 인터커넥션과 상기 적어도 하나의 CGRA 엔진 사이의 트래픽에 대한 모니터링 정보를 수신하여 성능 문제를 검출하는 모니터링 모듈과,
상기 성능 문제가 연산 성능 제한인 경우, 상기 적어도 하나의 CGRA 엔진의 성능 상승 제어를 수행하는 프로세서 컨트롤러와,
상기 성능 문제가 밴드위스 제한인 경우, 상기 L2 메모리 또는 상기 L2 메모리와 데이터를 교환하는 오프 칩 메모리의 트래픽 하향 제어를 수행하는 컴프레션 액티베이터와,
상기 성능 문제가 밴드위스 제한인 경우, 상기 L2 인터커넥션의 성능 상승 제어를 수행하는 인터커넥트 컨트롤러를 포함하는,
뉴럴 프로세싱 장치.
According to claim 1,
The sequencer,
a monitoring module configured to detect performance problems by receiving monitoring information about the at least one CGRA engine and monitoring information about traffic between the L2 interconnection and the at least one CGRA engine;
a processor controller that performs performance increase control of the at least one CGRA engine when the performance problem is a limitation in computational performance;
When the performance problem is bandwidth limitation, a compression activator that performs traffic downward control of the L2 memory or an off-chip memory that exchanges data with the L2 memory;
When the performance problem is bandwidth limitation, comprising an interconnect controller that performs performance increase control of the L2 interconnection,
Neural processing device.
상기 프로세서 컨트롤러는, 상기 적어도 하나의 CGRA 엔진의 공급전력 및 프리퀀시 중 적어도 하나를 높이는 프로세서 제어 신호를 생성하는,
뉴럴 프로세싱 장치.
According to clause 3,
The processor controller generates a processor control signal to increase at least one of the supply power and frequency of the at least one CGRA engine,
Neural processing device.
상기 컴프레션 액티베이터는, 상기 L2 메모리 또는 상기 오프 칩 메모리의 트래픽을 압축시키는 트래픽 컴프레션 엔진과, 상기 트래픽을 압축해제하는 트래픽 디컴프레션 엔진_중 적어도 하나를 활성화시키는 메모리 제어 신호를 생성하는,
뉴럴 프로세싱 장치.
According to clause 3,
The compression activator generates a memory control signal that activates at least one of a traffic compression engine that compresses traffic in the L2 memory or the off-chip memory, and a traffic decompression engine that decompresses the traffic,
Neural processing device.
상기 인터커넥트 컨트롤러는, 상기 L2 인터커넥션의 프리퀀시를 높이는 인터커넥션 제어 신호를 생성하는,
뉴럴 프로세싱 장치.
According to clause 3,
The interconnect controller generates an interconnection control signal that increases the frequency of the L2 interconnection.
Neural processing device.
상기 시퀀서는 연산 작업의 작업 특성을 수신하고, 상기 작업 특성에 따라 상기 적어도 하나의 CGRA 엔진, 상기 L2 메모리 및 상기 L2 인터커넥션 중 적어도 하나에 대해 전압 및 프리퀀시 중 적어도 하나를 조절하는,
뉴럴 프로세싱 장치.
According to claim 1,
The sequencer receives operational characteristics of the computational task and adjusts at least one of voltage and frequency for at least one of the at least one CGRA engine, the L2 memory, and the L2 interconnection according to the operational characteristics,
Neural processing device.
상기 시퀀서는 가상 디바이스 현황을 수신하고, 상기 가상 디바이스 현황에 따라 상기 적어도 하나의 CGRA 엔진, 상기 L2 메모리 및 상기 L2 인터커넥션 중 적어도 하나에 대해 전압 및 프리퀀시 중 적어도 하나를 조절하는,
뉴럴 프로세싱 장치.
According to claim 1,
The sequencer receives virtual device status and adjusts at least one of voltage and frequency for at least one of the at least one CGRA engine, the L2 memory, and the L2 interconnection according to the virtual device status,
Neural processing device.
상기 적어도 하나의 CGRA 엔진 그룹을 포함하는 CGRA 엔진 클러스터(CGRA Engine Cluster)를 더 포함하고,
상기 시퀀서는,
상기 CGRA 엔진 클러스터 내의 상기 적어도 하나의 CGRA 엔진 그룹을 관리하는 상부 시퀀서와,
상기 적어도 하나의 CGRA 엔진 그룹 내의 상기 적어도 하나의 CGRA 엔진을 관리하는 하부 시퀀서를 포함하는,
뉴럴 프로세싱 장치.
According to claim 1,
Further comprising a CGRA Engine Cluster including the at least one CGRA engine group,
The sequencer,
an upper sequencer that manages the at least one CGRA engine group within the CGRA engine cluster;
Comprising a lower sequencer that manages the at least one CGRA engine in the at least one CGRA engine group,
Neural processing device.
상기 CGRA 엔진 클러스터는 서로 다른 제1 및 제2 CGRA 엔진 그룹을 포함하고,
상기 하부 시퀀서는 상기 제1 및 제2 CGRA 엔진 그룹에 각각 대응되는 제1 및 제2 하부 시퀀서를 포함하는,
뉴럴 프로세싱 장치.
According to clause 9,
The CGRA engine cluster includes different first and second CGRA engine groups,
The lower sequencer includes first and second lower sequencers corresponding to the first and second CGRA engine groups, respectively.
Neural processing device.
상기 모니터링 정보를 통해서 성능 문제를 검출하고,
상기 성능 문제가 상기 연산 성능 제한인 경우, 상기 적어도 하나의 CGRA 엔진의 성능 상승 제어를 수행하는 것을 포함하는,
뉴럴 프로세싱 장치의 제어 방법.
First and second CGRA engine groups each including at least one CGRA engine, L2 memory shared by the first and second CGRA engine groups, and between the L2 memory and the first and second CGRA engine groups Receive monitoring information related to at least one of the L2 interconnections transmitting data,
Detect performance problems through the monitoring information,
When the performance problem is the computational performance limitation, performing performance increase control of the at least one CGRA engine,
Control method of a neural processing device.
상기 성능 문제가 오프 칩 메모리 제한인지를 판단하고,
상기 성능 문제가 상기 오프 칩 메모리 제한인 경우 상기 오프 칩 메모리 트래픽을 하향 제어하는 것을 더 포함하는,
뉴럴 프로세싱 장치의 제어 방법.
According to claim 11,
Determine whether the performance issue is an off-chip memory limitation,
Further comprising downward controlling the off-chip memory traffic when the performance problem is the off-chip memory limitation,
Control method of a neural processing device.
상기 오프 칩 메모리 트래픽을 하향 제어하는 것은,
상기 오프 칩 메모리 트래픽의 컴프레션 엔진을 활성화시키는 것을 포함하는,
뉴럴 프로세싱 장치의 제어 방법.
According to claim 12,
Downwardly controlling the off-chip memory traffic,
Including activating a compression engine of the off-chip memory traffic,
Control method of a neural processing device.
상기 성능 문제가 상기 L2 메모리 제한인지를 판단하고,
상기 성능 문제가 상기 L2 메모리 제한인 경우, 상기 L2 메모리 트래픽을 하향 제어하는 것을 더 포함하는,
뉴럴 프로세싱 장치의 제어 방법.
According to claim 12,
Determine whether the performance problem is the L2 memory limitation,
If the performance problem is the L2 memory limitation, further comprising downward controlling the L2 memory traffic,
Control method of a neural processing device.
상기 L2 메모리 트래픽을 하향 제어하는 것은,
상기 L2 메모리 트래픽의 컴프레션 엔진을 활성화시키는 것을 포함하는,
뉴럴 프로세싱 장치의 제어 방법.
According to claim 14,
Downward controlling the L2 memory traffic,
Including activating a compression engine of the L2 memory traffic,
Control method of a neural processing device.
상기 성능 문제가 상기 L2 메모리 제한이 아닌 경우, 상기 L2 인터커넥션의 성능을 상승 제어하는 것을 더 포함하는,
뉴럴 프로세싱 장치의 제어 방법.
According to claim 14,
If the performance problem is not the L2 memory limitation, further comprising controlling the performance of the L2 interconnection to increase,
Control method of a neural processing device.
상기 L2 인터커넥션의 성능을 상승 제어하는 것은,
상기 L2 인터커넥션의 프리퀀시를 오버드라이브하는 것을 포함하는,
뉴럴 프로세싱 장치의 제어 방법.
According to claim 16,
Increasing the performance of the L2 interconnection is controlled by:
Including overdriving the frequency of the L2 interconnection,
Control method of a neural processing device.
상기 적어도 하나의 CGRA 엔진 그룹이 서로 공유하는 L2 메모리;
상기 적어도 하나의 CGRA 엔진 그룹 및 상기 L2 메모리 사이에서 서로 데이터를 교환하는 L2 인터커넥션; 및
상기 VP의 현황에 따라서 상기 적어도 하나의 CGRA 엔진의 전압 및/또는 프리퀀시를 실시간으로 스케일링하는 시퀀서를 포함하는,
뉴럴 프로세싱 장치.
At least one CGRA engine group, each including at least one CGRA engine, wherein the at least one CGRA engine implements at least one virtual processor (VP);
L2 memory shared by the at least one CGRA engine group;
an L2 interconnection for exchanging data between the at least one CGRA engine group and the L2 memory; and
Comprising a sequencer that scales the voltage and/or frequency of the at least one CGRA engine in real time according to the status of the VP,
Neural processing device.
상기 적어도 하나의 CGRA 엔진의 수는 상기 적어도 하나의 VP의 수와 서로 다른,
뉴럴 프로세싱 장치.
According to clause 18,
The number of the at least one CGRA engine is different from the number of the at least one VP,
Neural processing device.
상기 VP의 현황은 상기 적어도 하나의 VP와 상기 적어도 하나의 CGRA 엔진의 대응 관계에 따라 결정되는,
뉴럴 프로세싱 장치.
According to clause 18,
The status of the VP is determined according to the correspondence relationship between the at least one VP and the at least one CGRA engine,
Neural processing device.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020220031890A KR20230134747A (en) | 2022-03-15 | 2022-03-15 | Neural processing device and method for controlling same |
US18/184,550 US20230297818A1 (en) | 2022-03-15 | 2023-03-15 | Neural processing device and method for controlling the same |
US18/184,543 US11934942B2 (en) | 2022-03-15 | 2023-03-15 | Neural processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020220031890A KR20230134747A (en) | 2022-03-15 | 2022-03-15 | Neural processing device and method for controlling same |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20230134747A true KR20230134747A (en) | 2023-09-22 |
Family
ID=88190286
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020220031890A KR20230134747A (en) | 2022-03-15 | 2022-03-15 | Neural processing device and method for controlling same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20230134747A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102258566B1 (en) | 2021-03-22 | 2021-06-01 | 리벨리온 주식회사 | Processing element, method of operation thereof, and accelerator including the same |
-
2022
- 2022-03-15 KR KR1020220031890A patent/KR20230134747A/en not_active Application Discontinuation
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102258566B1 (en) | 2021-03-22 | 2021-06-01 | 리벨리온 주식회사 | Processing element, method of operation thereof, and accelerator including the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11544548B2 (en) | Processing element and neural processing device including same | |
US11650793B2 (en) | Processing element, neural processing device including same, and method for calculating thereof | |
Li et al. | An automated quantization framework for high-utilization rram-based pim | |
KR102480300B1 (en) | Neural processing device and Method for job scheduling thereof | |
KR20230134747A (en) | Neural processing device and method for controlling same | |
KR20230134745A (en) | Neural processing device and method of compiling for computing device | |
KR20230134741A (en) | Neural processing device and Processing element included therein | |
US20230297818A1 (en) | Neural processing device and method for controlling the same | |
KR20230102224A (en) | Neural processing device and Method for synchronization thereof | |
US20240185045A1 (en) | Neural processing device | |
KR102622420B1 (en) | Neural processing device and Method for dynamic frequency scaling thereof | |
US11734552B1 (en) | Neural processing device | |
US11966358B1 (en) | Neural processor | |
US11915001B1 (en) | Neural processor and method for fetching instructions thereof | |
KR102548582B1 (en) | Neural processor and instruction fetch method thereof | |
US11836082B2 (en) | Neural processing device and load/store method of neural processing device | |
KR102509472B1 (en) | Neural processing device and Method for using shared page table thereof | |
KR102480287B1 (en) | DAG modification module, processing device including same and DAG modification method of processing device | |
KR102506622B1 (en) | Method for measuring performance of neural processing device and Device for measuring performance | |
US11789791B1 (en) | Neural processing device and method for using shared page table thereof | |
US20220300817A1 (en) | Neural processing device and method for pruning thereof | |
US11907098B2 (en) | Method for measuring performance of neural processing device and device for measuring performance | |
US11954584B2 (en) | Neural core, neural processing device including same, and method for loading data of neural processing device | |
KR20230133504A (en) | Processing element, Neural processing device including same and Method for calculating thereof | |
KR20230164549A (en) | Neural processing device and Method for job scheduling thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal |