[go: up one dir, main page]

WO2023128009A1 - Neural processing device and synchronization method thereof - Google Patents

Neural processing device and synchronization method thereof Download PDF

Info

Publication number
WO2023128009A1
WO2023128009A1 PCT/KR2021/020253 KR2021020253W WO2023128009A1 WO 2023128009 A1 WO2023128009 A1 WO 2023128009A1 KR 2021020253 W KR2021020253 W KR 2021020253W WO 2023128009 A1 WO2023128009 A1 WO 2023128009A1
Authority
WO
WIPO (PCT)
Prior art keywords
neural
sync
memory
synchronization
core
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/KR2021/020253
Other languages
French (fr)
Korean (ko)
Inventor
오진욱
김진석
봉경렬
신원규
유창호
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rebellions Inc
Original Assignee
Rebellions Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rebellions Inc filed Critical Rebellions Inc
Priority to JP2024533970A priority Critical patent/JP7751861B2/en
Priority to PCT/KR2021/020253 priority patent/WO2023128009A1/en
Publication of WO2023128009A1 publication Critical patent/WO2023128009A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means

Definitions

  • the present invention relates to a neural processing apparatus and a synchronization method thereof. Specifically, the present invention relates to a neural processing apparatus and a synchronization method thereof in which each processor performs synchronization instead of a central control processor.
  • AI artificial intelligence
  • CPU central processing unit
  • GPU graphics processing unit
  • Such a neural network processing device includes a large number of processing units and cores therein, and synchronization of these modules is a part that must be clearly handled according to task dependencies.
  • a control processor or centralized controller
  • An object of the present invention is to provide a neural processing apparatus capable of fast and efficient synchronization processing.
  • Another object of the present invention is to provide a method for synchronizing a neural processing device capable of fast and efficient synchronization processing.
  • a neural processing apparatus provides first and second neural processors, a shared memory shared by the first and second neural processors, and each of the first and second neural processors.
  • first and second semaphore memories corresponding to each other and receiving and storing an L3 sync target, wherein synchronization of the first and second neural processors is performed according to the L3 sync target; and a global interconnection including an L3 sync channel connecting the second neural processor and the shared memory and transmitting a synchronization signal according to the L3 sync target.
  • the global interconnection includes a data channel for transmitting data between the L3 sync channel, the shared memory, and the first and second neural processors, and a control signal for transmitting a control signal to the first and second neural processors.
  • the first semaphore memory may include first and second fields respectively corresponding to the first and second neural processors.
  • the method may further include a first FIFO buffer that sequentially transfers values of the first field to the first neural processor.
  • the processor may further include a second FIFO buffer that sequentially transfers values of the second field to the first neural processor.
  • the L3 sync target includes first and second L3 sync targets
  • the first neural processor generates the first L3 sync target
  • the second neural processor generates the second L3 sync target.
  • the L3 sync target includes first and second sync target fields corresponding to the first and second neural processors, respectively, and the first and second sync target fields are configured by the first and second neural processors. It may include information on whether a synchronization signal according to the L3 sync target is received.
  • first and second sync target fields may be arranged in the order of virtual IDs of the first and second neural processors, respectively.
  • the first neural processor identifies a physical ID of a neural processor receiving a synchronization signal according to the L3 sync target by using the L3 sync target and the VPID table, and the VPID table identifies the virtual ID and the physical ID. It may contain information for conversion.
  • the physical ID of the first and second neural processors and the virtual ID of the first and second neural processors may correspond 1:1 to each other.
  • the L3 sync target may be included in an instruction set architecture (ISA).
  • ISA instruction set architecture
  • the neural processor may include at least one neural core and a local interconnection for transmitting data between the at least one neural core.
  • the neural processor may further include an L2 sync pass through which a synchronization signal according to an L2 sync target for performing synchronization between the at least one neural core is transmitted.
  • the L2 sync target may be included in the instruction set structure.
  • each of the at least one neural core includes a processing unit that receives input activations and weights, performs deep learning operations, and outputs output activations, and a local area that temporarily stores the input activations, the weights, and the output activations. may contain memory.
  • each of the at least one neural core may further include an activation buffer temporarily storing the input activation and the output activation between the processing unit and the local memory.
  • each of the at least one neural core may further include an activation load/store unit (LSU) for moving the input activation and the output activation between the activation buffer and the local memory.
  • LSU activation load/store unit
  • each of the at least one neural core may further include a weight buffer temporarily storing the weight between the local memory and the processing unit.
  • each of the at least one neural core may further include an LSU for moving data between the local memory and the local interconnection.
  • the LSU may include a local memory store unit for storing the local memory and a local memory load unit for loading the local memory.
  • the LSU may include a neural core store unit that performs external storage in the neural core and a neural core load unit that externally loads the neural core.
  • an L1 sync pass through which a synchronization signal according to an L1 sync target for synchronization between the local memory and other elements is transmitted may be further included.
  • the L1 sync target may be included in the instruction set structure.
  • the processing unit may include a processing element array that performs a two-dimensional operation and a vector unit that performs a one-dimensional operation.
  • the processing unit includes a row register for supplying a first input to each row of the array of processing elements and a column register for receiving and supplying a second input to each column of the array of processing elements.
  • the first and second inputs may each include any one of weight and input activation.
  • a neural processing apparatus connects at least one neural processor, a shared memory, and the at least one neural processor and a shared memory, and a global used for L3 synchronization of the neural processor.
  • an interconnection wherein the neural processor includes at least one neural core, a local interconnection connecting the at least one neural core, and an L2 sync pass used for L2 synchronization of the at least one neural core;
  • the neural core includes a processing unit that performs arithmetic operations, a local memory that temporarily stores data, and an L1 sync pass used for L1 synchronization of the local memory and the processing unit.
  • the global interconnection includes a data channel for transmitting data between the at least one neural processor and the shared memory, a control channel for transmitting a control signal between the at least one neural processor, and used for L3 synchronization.
  • a sync channel may be included.
  • the neural processor may further include a local interconnection for transmitting data between the at least one neural core.
  • a data path used for data exchange between the local memory and elements including the processing unit may be included.
  • the processing unit may include a processing element array that performs a two-dimensional operation and a vector unit that performs a one-dimensional operation.
  • the processing element array includes a plurality of processing elements arranged in rows and columns, and each of the plurality of processing elements may perform multiplication.
  • the at least one neural processor includes first and second neural processors, and first and second neural processors receive and store a synchronization signal corresponding to the first and second neural processors and corresponding to an L3 sync target.
  • the second semaphore memory may further include first and second semaphore memories in which synchronization of the first and second neural processors is performed according to the L3 sync target.
  • the first semaphore memory includes first and second fields respectively corresponding to the first and second neural processors, and sequentially transfers values of the first fields to the first neural processor.
  • a first FIFO It may contain more buffers.
  • the first neural processor transmits an instruction set structure, and the instruction set structure includes an operation code, an L3 sync target for the L3 synchronization, an L2 sync target for the L2 synchronization, and an L1 sync target for the L1 synchronization.
  • the instruction set structure includes an operation code, an L3 sync target for the L3 synchronization, an L2 sync target for the L2 synchronization, and an L1 sync target for the L1 synchronization.
  • a method for synchronizing a neural processing device is a method for synchronizing a neural processing device including first and second neural processors, wherein the first neural processor performs L3 synchronization.
  • the VPID table is a conversion table of the virtual ID and the physical ID of the neural processor, and a synchronization signal according to the L3 sync target is transmitted to the first semaphore memory of the second neural processor through the L3 sync channel of the global interconnection. and performing the L3 synchronization according to the value of the first semaphore memory by the second neural processor.
  • the first semaphore memory may include first and second fields respectively corresponding to the first and second neural processors.
  • the performing of the L3 synchronization may include providing a value of the first field to the second neural processor in a FIFO manner and providing a value of the second field to the second neural processor in a FIFO manner.
  • the virtual ID may include first and second virtual IDs respectively corresponding to the first and second neural processors.
  • the first neural processor may also configure first and second neural cores, a local interconnection for transmitting data between the first and second neural cores, and a synchronization signal between the first and second neural cores. It may include an L2 sync pass for transmitting a synchronization signal according to an L2 sync target for
  • the first neural core includes a first processing unit that receives a first input activation and a first weight, performs a deep learning operation, and outputs a first output activation; the first input activation and the first weight; and a first local memory temporarily storing the first output activation and a first L1 sync pass transmitting a synchronization signal according to an L1 sync target for synchronization between the first local memory and the first processing unit.
  • the second neural core comprises a second processing unit that receives second input activation and a second weight, performs a deep learning operation, and outputs a second output activation; the second input activation and the second weight; and a second L1 sync pass for transmitting a second local memory temporarily storing the second output activation and a synchronization signal according to the L1 sync target for synchronization between the second local memory and the second processing unit.
  • a second processing unit that receives second input activation and a second weight, performs a deep learning operation, and outputs a second output activation; the second input activation and the second weight; and a second L1 sync pass for transmitting a second local memory temporarily storing the second output activation and a synchronization signal according to the L1 sync target for synchronization between the second local memory and the second processing unit.
  • data is stored in the first local memory, a synchronization signal according to the L1 sync target is transmitted through the first L1 sync pass in the first neural core, and the first neural core transmits a synchronization signal according to the second L1 sync pass.
  • the method may further include transmitting a synchronization signal according to the L2 sync target to the second neural core through an L2 sync pass, and the second neural core receiving data through the local interconnection.
  • the first neural core may further include a first LSU for moving data between the first local memory and the first local interconnection
  • the second neural core may include the second local memory and the second local interconnection. It may further include a second LSU for moving data between interconnections.
  • the first LSU includes a first local memory store unit for storing the first local memory, a first local memory load unit for loading the first local memory, and the first neural core. It may include a first neural core store unit that performs external storage and a first neural core load unit that externally loads the first neural core.
  • transmitting the synchronization signal according to the L1 sync target through the first L1 sync pass causes the first local memory store unit to store the L1 sync target in the first neural core store.
  • the second LSU includes a second local memory store unit for storing the second local memory, a second local memory load unit for loading the second local memory, and the second neural core.
  • a second neural core store unit that performs external storage and a second neural core load unit that externally loads the second neural core.
  • Transmitting the synchronization signal according to the L2 sync target may include the first neural core store unit transmitting the synchronization signal according to the L2 sync target to the second neural core load unit.
  • the second neural core load unit requests the data from the first local memory through the local interconnection, and the second neural core load unit receives the data from the local interconnection. and receiving the data from the first local memory through an interconnection.
  • a synchronization method of a neural processing apparatus for solving the above other problems includes first and second neural cores, a local interconnection connecting the first and second neural cores, and the first and second neural cores. and an L2 sync pass used for L2 synchronization of a second neural core, wherein the first neural core includes a first processing unit that performs a calculation task and data input/output to the first processing unit.
  • a first local memory for temporarily storing and a first L1 sync pass used for L1 synchronization of the first local memory and the first processing unit, wherein the second neural core includes a second neural core that performs calculation tasks.
  • a neural circuit comprising a processing unit, a second local memory temporarily storing data input/output to the second processing unit, and a second L1 sync pass used for L1 synchronization of the second local memory and the second processing unit.
  • a synchronization method of a processing device storing data in the first local memory, transmitting a synchronization signal according to the L1 sync target through the first L1 sync pass in the first neural core, and The neural core may transmit a synchronization signal according to the L2 sync target to the second neural core through the second L2 sync pass, and the second neural core may receive data through the local interconnection. .
  • the first neural core may further include a first LSU for moving data between the first local memory and the first local interconnection, wherein the first LSU performs storage of the first local memory.
  • Transmitting the synchronization signal according to may include transmitting, by the first local memory store unit, a synchronization signal according to the L1 sync target to the first neural core store unit.
  • the second neural core further includes a second LSU for moving data between the second local memory and the second local interconnection, and the second LSU includes an external load in the second neural core. and transmitting the synchronization signal according to the L2 sync target means that the first neural core store unit transmits the synchronization signal according to the L2 sync target to the second neural core load unit. It may include sending to
  • the neural processing apparatus may further include: a first neural processor including the first and second neural cores, the local interconnection, and the L2 sync path; a second neural processor different from the first neural processor; a global interconnection for transmitting data between the first and second neural processors, and first and second semaphore memories respectively corresponding to the first and second neural processors, wherein the global interconnection comprises the first and second semaphore memories; and a data channel, a control channel, and an L3 sync channel through which data, a control signal, and a synchronization signal according to an L3 sync target are respectively transmitted between a second neural processor, wherein the first neural processor generates the L3 sync target;
  • the L3 sync target may be stored in the second semaphore memory, and the second neural processor may perform synchronization through a synchronization signal according to the L3 sync target.
  • the neural processing apparatus and synchronization method thereof of the present invention can minimize latency according to the synchronization request transmitted to the control processor because each processor, core, and memory elements transmit synchronization requests to each other to perform synchronization instead of a centralized control processor. there is.
  • FIG. 1 is a block diagram illustrating a neural processing system according to some embodiments of the present invention.
  • FIG. 2 is a block diagram for explaining the neural processing apparatus of FIG. 1 in detail.
  • FIG. 3 is a block diagram illustrating the neural core SoC of FIG. 2 in detail.
  • FIG. 4 is a structural diagram for explaining the global interconnection of FIG. 3 in detail.
  • FIG. 5 is a block diagram for explaining the neural processor of FIG. 3 in detail.
  • FIG. 6 is a block diagram for explaining the neural core of FIG. 5 in detail.
  • FIG. 7 is a block diagram for explaining the LSU of FIG. 6 in detail.
  • FIG. 8 is a block diagram for explaining the processing unit of FIG. 6 in detail.
  • FIG. 9 is a block diagram for explaining the local memory of FIG. 6 in detail.
  • FIG. 10 is a block diagram for explaining the local memory bank of FIG. 9 in detail.
  • FIG. 11 is a block diagram illustrating memory reconfiguration of a neural processing system according to some embodiments of the present invention.
  • FIG. 12 is a block diagram illustrating an example of memory reorganization of a neural processing system in accordance with some embodiments of the present invention.
  • FIG. 13 is an enlarged block diagram of part A of FIG. 11 .
  • FIG. 14 is a diagram for explaining the first bank of FIG. 13 in detail.
  • 15 is a conceptual diagram for explaining virtual ID assignment of a neural processing apparatus according to some embodiments of the present invention.
  • 16 is a diagram for explaining a virtual ID allocation and a VPID table of a neural processing apparatus according to some embodiments of the present invention.
  • 17 is a diagram for explaining a process of identifying a physical ID through a sync target and a VPID table.
  • 18 is a directed acyclic graph for explaining the sequence of deep learning tasks.
  • 19 is a conceptual diagram illustrating a synchronization signal transmission operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.
  • 20 is a conceptual diagram for explaining a synchronization signal reception operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.
  • 21 is a block diagram for explaining L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention.
  • 22 is a ladder diagram for explaining L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention.
  • FIG. 23 is a diagram for explaining an instruction set structure of a neural processing apparatus according to some embodiments of the present invention.
  • 24 is a block diagram for explaining a software layer structure of a neural processing apparatus according to some embodiments of the present invention.
  • 25 is a conceptual diagram for explaining a deep learning operation performed by a neural processing apparatus according to some embodiments of the present invention.
  • 26 is a conceptual diagram for explaining learning and reasoning operations of a neural network of a neural processing apparatus according to some embodiments of the present invention.
  • FIG. 27 is a flowchart illustrating a synchronization method of a neural processing apparatus according to some embodiments of the present invention.
  • FIG. 28 is a flowchart for explaining in detail the step of storing the L3 sync target of FIG. 27 and the step of providing it in a FIFO method.
  • 29 is a flowchart illustrating a method for synchronizing L1 and L2 levels of a neural processing apparatus according to some embodiments of the present invention.
  • FIG. 30 is a flowchart for explaining the data request step of FIG. 29 in detail.
  • first, second, A, and B used in this specification and claims may be used to describe various components, but the components should not be limited by the terms. These terms are only used for the purpose of distinguishing one component from another. For example, a first element may be termed a second element, and similarly, a second element may be termed a first element, without departing from the scope of the present invention.
  • the term 'and/or' includes a combination of a plurality of related recited items or any one of a plurality of related recited items.
  • each configuration, process, process or method included in each embodiment of the present invention may be shared within a range that does not contradict each other technically.
  • FIGS. 1 to 26 a neural processing apparatus according to some embodiments of the present invention will be described with reference to FIGS. 1 to 26 .
  • FIG. 1 is a block diagram illustrating a neural processing system according to some embodiments of the present invention.
  • a neural processing system may include a first neural processing device 1, a second neural processing device 2, and an external interface 3. .
  • the first neural processing device 1 may be a device that performs calculations using an artificial neural network.
  • the first neural processing device 1 may be, for example, a device specialized for performing a deep learning calculation task. However, this embodiment is not limited thereto.
  • the second neural processing device 2 may have a configuration identical to or similar to that of the first neural processing device 1 .
  • the first neural processing device 1 and the second neural processing device 2 may be connected to each other through an external interface 3 to share data and control signals.
  • FIG. 1 shows two neural processing devices
  • a 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 external interface 3. Also, conversely, a neural processing system (NPS) according to some embodiments of the present invention may include only one neural processing device.
  • FIG. 2 is a block diagram for explaining the neural processing apparatus of FIG. 1 in detail.
  • the first neural processing device 1 includes a neural core SoC 10, a CPU 20, an off-chip memory 30, a first non-volatile memory interface 40, and a first volatile memory interface ( 50), a second non-volatile memory interface 60 and a second volatile memory interface 70.
  • the neural core SoC 10 may be a system on chip device.
  • the neural core SoC 10 is an artificial intelligence computing device and may be an accelerator.
  • the neural core SoC 10 may be, for example, any one of a graphics processing unit (GPU), a field programmable gate array (FPGA), and an application-specific integrated circuit (ASIC). However, this embodiment is not limited thereto.
  • the neural core SoC 10 may exchange data with other external computing devices through the external interface 3 .
  • the neural core SoC 10 may be connected to the non-volatile memory 31 and the volatile memory 32 through the first non-volatile memory interface 40 and the first volatile memory interface 50 , respectively.
  • the CPU 20 may be a controller that controls the system of the first neural processing device 1 and executes program operations.
  • the CPU 20 is a general purpose arithmetic unit and may have low efficiency to perform parallel simple arithmetic operations frequently used in deep learning. Accordingly, the neural core SoC 10 may perform calculations for deep learning reasoning and learning tasks, thereby achieving high efficiency.
  • the CPU 20 may exchange data with other external computing devices through the external interface 3 .
  • the CPU 20 may be connected to the non-volatile memory 31 and the volatile memory 32 through the second non-volatile memory interface 60 and the second volatile memory interface 70, respectively.
  • the off-chip memory 30 may be a memory disposed outside a chip of the neural core SoC 10 .
  • the off-chip memory 30 may include a non-volatile memory 31 and a volatile memory 32 .
  • the non-volatile memory 31 may be a memory that continuously retains stored information even when power is not supplied.
  • the non-volatile memory 31 includes, for example, a read-only memory (ROM), a programmable read-only memory (PROM), an erasable alterable ROM (EAROM), an erasable programmable read-only memory (EPROM), and an electrically erasable programmable memory (EEPROM).
  • ROM read-only memory
  • PROM programmable read-only memory
  • EAROM erasable alterable ROM
  • EPROM erasable programmable read-only memory
  • EEPROM electrically erasable programmable memory
  • Read-Only Memory e.g., NAND Flash memory, NOR Flash memory), Ultra-Violet Erasable Programmable Read-Only Memory (UVEPROM), Ferroelectric Random Access Memory (FeRAM), 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), magnetic computer memory It may include at least one of a device (eg, hard disk, diskette drive, magnetic tape), an optical disk drive, and a 3D XPoint memory. However, this embodiment is not limited thereto.
  • the volatile memory 32 may be a memory that continuously requires power to maintain stored information.
  • the volatile memory 32 may include, for example, at least one of Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Synchronous Dynamic Random Access Memory (SDRAM), and Double Data Rate SDRAM (DDR SDRAM).
  • DRAM Dynamic Random Access Memory
  • SRAM Static Random Access Memory
  • SDRAM Synchronous Dynamic Random Access Memory
  • DDR SDRAM Double Data Rate SDRAM
  • the first non-volatile memory interface 40 and the second non-volatile memory interface 60 may be, for example, PATA (Parallel Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), SATA ( Serial Advanced Technology Attachment) and PCI Express (PCIe).
  • PATA Parallel Advanced Technology Attachment
  • SCSI Serial Computer System Interface
  • SAS Serial Attached SCSI
  • SATA Serial Advanced Technology Attachment
  • PCIe PCI Express
  • the first volatile memory interface 50 and the second volatile memory interface 70 are respectively, for example, SDR (Single Data Rate), DDR (Double Data Rate), QDR (Quad Data Rate), and XDR (eXtreme Data Rate) , Octal Data Rate).
  • SDR Single Data Rate
  • DDR Double Data Rate
  • QDR Quad Data Rate
  • XDR eXtreme Data Rate
  • FIG. 3 is a block diagram illustrating the neural core SoC of FIG. 2 in detail.
  • the neural core SoC 10 includes at least one neural processor 1000, a shared memory 2000, a direct memory access (DMA) 3000, a non-volatile memory controller 4000, a volatile A memory controller 5000 and a global interconnection 6000 may be included.
  • DMA direct memory access
  • the neural processor 1000 may be an arithmetic device that directly performs an arithmetic task. When there are a plurality of neural processors 1000 , calculation tasks may be allocated to each of the neural processors 1000 . Each of the neural processors 1000 may be connected to each other through the global interconnection 6000 .
  • the shared memory 2000 may be a memory shared by several neural processors 1000 .
  • the shared memory 2000 may store data of each neural processor 1000 .
  • the shared memory 2000 may receive data from the off-chip memory 30, temporarily store the data, and transfer the data to each neural processor 1000.
  • the shared memory 2000 may receive data from the neural processor 1000, temporarily store the data, and transfer the data to the off-chip memory 30 of FIG. 2 .
  • the shared memory 2000 may require a relatively fast memory. Accordingly, the shared memory 2000 may include SRAM, for example. However, this embodiment is not limited thereto. That is, the shared memory 2000 may include DRAM.
  • the shared memory 2000 may be a memory corresponding to an SoC level, that is, level 3 (L3). Accordingly, the shared memory 2000 may be defined as an L3 shared memory.
  • the DMA 3000 can directly control the movement of data without the need for the neural processor 1000 to control input/output of data. Accordingly, the number of interrupts of the neural processor 1000 can be minimized by the DMA 3000 controlling data movement between memories.
  • the DMA 3000 may control movement of data between the shared memory 2000 and the off-chip memory 30 .
  • the non-volatile memory controller 4000 and the volatile memory controller 5000 may transfer data through the authority of the DMA 3000 .
  • the nonvolatile memory controller 4000 may control a read or write operation of the nonvolatile memory 31 .
  • the nonvolatile memory controller 4000 may control the nonvolatile memory 31 through the first nonvolatile memory interface 40 .
  • the volatile memory controller 5000 may control a read or write operation of the volatile memory 32 . Also, the volatile memory controller 5000 may perform a refresh operation of the volatile memory 32 . The volatile memory controller 5000 may control the non-volatile memory 31 through the first volatile memory interface 50 .
  • the global interconnection 6000 may connect at least one of the neural processor 1000 , the shared memory 2000 , the DMA 3000 , the nonvolatile memory controller 4000 and the volatile memory controller 5000 to each other.
  • the external interface 3 may also be connected to the global interconnection 6000 .
  • the global interconnection 6000 is data communication between at least one neural processor 1000, a shared memory 2000, a DMA 3000, a non-volatile memory controller 4000, a volatile memory controller 5000, and an external interface 3. may be a moving path.
  • the global interconnection 6000 may transmit data as well as control signals and signals for synchronization. That is, in the neural processing apparatus according to some embodiments of the present invention, each neural processor 1000 may directly transmit and receive a synchronization signal, rather than a separate control processor managing synchronization signals. Accordingly, it is possible to block the latency of the synchronization signal generated by the control processor.
  • the control processor performs the reception of the synchronization signal and the instruction to start a new task.
  • each neural processor 1000 may directly transmit a synchronization signal to other neural processors 1000 according to task dependencies instead of a control processor.
  • several neural processors 1000 can perform synchronization tasks in parallel, so that latency due to synchronization can be minimized.
  • control processor needs to perform task scheduling of the neural processors 1000 according to task dependencies, and the overhead of such scheduling can greatly increase as the number of the neural processors 1000 increases. Therefore, in the neural processing device according to some embodiments of the present invention, the scheduling task is also performed by the individual neural processor 1000, and thus the performance of the device can be improved without the scheduling burden.
  • FIG. 4 is a structural diagram for explaining the global interconnection of FIG. 3 in detail.
  • a global interconnection 6000 may include a data channel 6100 , a control channel 6200 and an L3 sync channel 6300 .
  • the data channel 6100 may be a dedicated channel for transmitting data. At least one of the neural processor 1000, the shared memory 2000, the DMA 3000, the non-volatile memory controller 4000, the volatile memory controller 5000, and the external interface 3 communicate data to each other through the data channel 6100. can be exchanged.
  • the control channel 6200 may be a dedicated channel for transmitting a control signal. At least one of the neural processor 1000, the shared memory 2000, the DMA 3000, the non-volatile memory controller 4000, the volatile memory controller 5000, and the external interface 3 control each other through the control channel 6200 signals can be exchanged.
  • the L3 sync channel 6300 may be a dedicated channel for transmitting a synchronization signal.
  • At least one neural processor 1000, a shared memory 2000, a DMA 3000, a non-volatile memory controller 4000, a volatile memory controller 5000, and an external interface 3 communicate with each other through the L3 sync channel 6300. Synchronization signals can be exchanged.
  • the L3 sync channel 6300 is set as a dedicated channel within the global interconnection 6000 so that a synchronization signal can be quickly transmitted without overlapping with other channels. Accordingly, the neural processing apparatus according to some embodiments of the present invention does not require a new wiring work and can smoothly perform synchronization work using the existing global interconnection 6000 .
  • FIG. 5 is a block diagram for explaining the neural processor of FIG. 3 in detail.
  • the neural processor 1000 may include at least one neural core 100, an L2 shared memory 400, a local interconnection 200, and an L2 sync path 300.
  • At least one neural core 100 may divide and perform tasks of the neural processor 1000 .
  • the number of neural cores 100 may be, for example, 8. However, this embodiment is not limited thereto. 4 and 5 show that several neural cores 100 are included in the neural processor 1000, but the present embodiment is not limited thereto. That is, the neural processor 1000 may be configured with only one neural core 100 .
  • the L2 shared memory 400 may be a memory shared by each of the neural cores 100 in the neural processor 1000 .
  • the L2 shared memory 400 may store data of each neural core 100 .
  • the L2 shared memory 400 may receive data from the shared memory 2000 of FIG. 3 , temporarily store the data, and transfer the data to each neural core 100 .
  • the L2 shared memory 400 may receive data from the neural core 100, temporarily store the data, and transfer the data to the shared memory 2000 of FIG. 3 .
  • the L2 shared memory 400 may be memory corresponding to a neural processor level, that is, level 2 (L2).
  • L2 shared memory that is, the shared memory 2000 may be shared by the neural processor 1000 and the L2 shared memory 400 may be shared by the neural core 100 .
  • the local interconnection 200 may connect at least one neural core 100 and the L2 shared memory 400 to each other.
  • the local interconnection 200 may be a path through which data moves between at least one neural core 100 and the L2 shared memory 400 .
  • the local interconnection 200 may be connected to the global interconnection 6000 of FIG. 3 to transmit data.
  • the L2 sync pass 300 may connect at least one neural core 100 and the L2 shared memory 400 to each other.
  • the L2 sync path 300 may be a path along which synchronization signals of at least one neural core 100 and the L2 shared memory 400 move.
  • the L2 sync path 300 may be formed physically separately from the local interconnection 200 . In the case of the local interconnection 200, unlike the global interconnection 6000, sufficient internal channels may not be formed. In this case, the L2 sync path 300 is formed separately so that synchronization signal transmission can be performed quickly and without delay. The L2 sync pass 300 may be used for synchronization performed at a level lower than that of the L3 sync channel 6300 of the global interconnection 6000.
  • FIG. 6 is a block diagram for explaining the neural core of FIG. 5 in detail.
  • the neural core 100 includes a load/store unit (LSU) 110, a local memory 120, a weight buffer 130, an activation LSU 140, an activation buffer 150, and a processing unit ( 160) may be included.
  • LSU load/store unit
  • 160 processing unit
  • the LSU 110 may receive at least one of data, a control signal, and a synchronization signal from the outside through the local interconnection 200 and the L2 sync path 300 .
  • the LSU 110 may transmit at least one of received data, a control signal, and a synchronization signal to the local memory 120 .
  • the LSU 110 may transfer at least one of data, control signals, and synchronization signals to the outside through the local interconnection 200 and the L2 sync path 300 .
  • FIG. 7 is a block diagram for explaining the LSU of FIG. 6 in detail.
  • the LSU 110 includes a local memory load unit 111a, a local memory store unit 111b, a neural core load unit 112a, a neural core store unit 112b, a load buffer LB, and a store. It may include a buffer SB, a load engine 113a, a store engine 113b and a conversion lookaside buffer 114.
  • the local memory load unit 111a may fetch a load instruction for the local memory 120 and issue the load instruction.
  • the load buffer LB may sequentially transmit memory access requests to the load engine 113a according to the input order.
  • the local memory store unit 111b may fetch a store instruction for the local memory 120 and issue the store instruction.
  • the store buffer SB may sequentially transmit memory access requests to the store engine 113b according to the input order.
  • the neural core load unit 112a may fetch load instructions for the neural core 100 and issue load instructions.
  • the load buffer LB may sequentially transmit memory access requests to the load engine 113a according to the input order.
  • the neural core store unit 112b may fetch a store instruction for the neural core 100 and issue the store instruction.
  • the store buffer SB may sequentially transmit memory access requests to the store engine 113b according to the input order.
  • the load engine 113a may receive a memory access request and load data through the local interconnection 200 . At this time, the load engine 113a can quickly find data by using a translation table of recently used virtual addresses and physical addresses in the translation lookaside buffer 114 . When the virtual address of the load engine 113a does not exist in the translation lookaside buffer 114, address translation information may be found in another memory.
  • the store engine 113b may receive a memory access request and load data through the local interconnection 200 . At this time, the store engine 113b can quickly find data by using a translation table of recently used virtual addresses and physical addresses in the translation lookaside buffer 114 . When the virtual address of the store engine 113b does not exist in the translation lookaside buffer 114, address translation information may be found in another memory.
  • the load engine 113a and the store engine 113b may send synchronization signals to the L2 sync path 300 .
  • the synchronization signal may have a meaning that the work is finished.
  • the local memory 120 is a memory located inside the neural core 100 and can receive all input data necessary for the neural core 100 to work from the outside and temporarily store them. In addition, the local memory 120 may temporarily store output data calculated by the neural core 100 in order to transmit them to the outside.
  • the local memory 120 may serve as a cache memory of the neural core 100 .
  • the local memory 120 may transmit the input activation (Act_In) to the activation buffer 150 and receive the output activation (Act_Out) by the activation LSU 140 .
  • the local memory 120 may directly transmit/receive data with the processing unit 160 . That is, the local memory 120 may exchange data with each of the PE array 163 and the vector unit 164 .
  • the local memory 120 may be a memory corresponding to a neural core level, that is, level 1 (L1). Accordingly, the local memory 120 may also be defined as an L1 memory. However, unlike the L2 shared memory 400 and the L3 shared memory, that is, the shared memory 2000, the L1 memory is not shared and may be a private memory of the neural core.
  • the local memory 120 may transmit data such as activation or weight through a data path.
  • the local memory 120 may transmit and receive synchronization signals through an L1 sync path, which is a separate dedicated path.
  • the local memory 120 may exchange synchronization signals with, for example, the LSU 110, the weight buffer 130, the activation LSU 140, and the processing unit 160 through an L1 sync path. .
  • the weight buffer 130 may receive a weight from the local memory 120 .
  • the weight buffer 130 may transfer the weight to the processing unit 160 .
  • the weight buffer 130 may temporarily store weights before transferring them.
  • the input activation (Act_In) and the output activation (Act_Out) may refer to an input value and an output value of a layer of a neural network.
  • the output activation value of the previous layer becomes the input value of the next layer, so the output activation (Act_Out) of the previous layer may be used as the input activation (Act_In) of the next layer.
  • the weight may mean a parameter that is multiplied with the input activation (Act_In) input in each layer.
  • the weight is adjusted and determined in the deep learning step, and may be used to derive the output activation (Act_Out) through a fixed value in the inference step.
  • the activation LSU 140 may transfer an input activation (Act_In) from the local memory 120 to the activation buffer 150 and transfer an output activation (Act_Out) from the activation buffer 150 to the on-chip buffer. That is, the activation LSU 140 may perform both a load operation and a store operation of activation.
  • the activation buffer 150 may provide an input activation (Act_In) to the processing unit 160 and receive an output activation (Act_Out) from the processing unit 160.
  • the activation buffer 150 may temporarily store input activation (Act_In) and output activation (Act_Out).
  • the activation buffer 150 can quickly provide activation to the processing unit 160 , particularly the PE array 163 , which requires a large amount of computation, and quickly receive the activation, thereby increasing the computational speed of the neural core 100 .
  • the processing unit 160 may be a module that performs calculations.
  • the processing unit 160 may perform not only a 1-dimensional operation but also a 2-dimensional matrix operation, that is, a convolution operation.
  • the processing unit 160 may generate an output activation (Act_Out) by receiving the input activation (Act_In), multiplying the received input activation (Act_In), and then adding the result.
  • FIG. 8 is a block diagram for explaining the processing unit of FIG. 6 in detail.
  • the processing unit 160 may include a PE array 163 , a vector unit 164 , a column register 161 and a row register 162 .
  • the PE array 163 may perform multiplication by receiving the input activation (Act_In) and the weight (Weight). In this case, the input activation (Act_In) and the weight (Weight) may be calculated through convolution in the form of a matrix. Through this, the PE array 163 may generate an output activation (Act_Out). However, this embodiment is not limited thereto. The PE array 163 can also generate other types of outputs other than the output activation (Act_Out).
  • the PE array 163 may include at least one processing element (PE).
  • the processing elements PE may be aligned with each other to perform multiplication of one input activation (Act_In) and one weight (Weight).
  • the PE array 163 may produce a subtotal sum of values for each multiplication. This subtotal can be utilized as an output activation (Act_Out). Since the PE array 163 performs 2D matrix multiplication, it may also be referred to as a 2D matrix compute unit.
  • the vector unit 164 may perform primarily one-dimensional operations.
  • the vector unit 164 may perform deep learning operations together with the PE array 163 .
  • the processing unit 160 may be specialized for necessary operations. That is, the neural core 100 can efficiently perform deep learning tasks because each of the calculation modules that performs a large amount of 2D matrix multiplication and 1D calculation is performed.
  • the column register 161 may receive the first input I1.
  • the column register 161 may receive the first input I1, divide it, and provide it to each column of the processing element PE.
  • the low register 162 may receive the second input I2.
  • the row register 162 may receive the second input I2, divide it, and provide it to each row of the processing element PE.
  • the first input (I1) may be an input activation (Act_In) or a weight (Weight).
  • the second input I2 may be a value other than the first input I1 among input activation Act_In or weight.
  • the first input I1 and the second input I2 may be values other than the input activation Act_In and the weight.
  • FIG. 9 is a block diagram for explaining the local memory of FIG. 6 in detail.
  • the local memory 120 may include a scheduler 121 and at least one local memory bank 122 .
  • the scheduler 121 may receive the data from the load engine 113a. At this time, data may be allocated to the local memory bank 122 in a round robin manner. Accordingly, data may be stored in any one of the at least one local memory bank 122 .
  • the scheduler 121 may receive data from the local memory bank 122 and transfer the data to the store engine 113b.
  • the store engine 113b may store data externally through the local interconnection 200 .
  • FIG. 10 is a block diagram for explaining the local memory bank of FIG. 9 in detail.
  • the local memory bank 122 may include a local memory bank controller 122_1 and a local memory bank cell array 122_2.
  • the local memory bank controller 122_1 may manage read and write operations through addresses of data stored in the local memory bank 122 . That is, the local memory bank controller 122_1 may manage the input/output of data as a whole.
  • the local memory bank cell array 122_2 may have a structure in which cells directly storing data are aligned in rows and columns.
  • the local memory bank cell array 122_2 may be controlled by the local memory bank controller 122_1.
  • FIG. 11 is a block diagram illustrating memory reconfiguration of a neural processing system according to some embodiments of the present invention.
  • the neural core SoC 10 may include first to eighth neural cores 100a to 100h and an on-chip memory (OCM). 11 shows 8 neural cores as an example, but this is just an example and the number of neural cores may vary.
  • OCM on-chip memory
  • the on-chip memory OCM may include first to eighth local memories 120a to 120h and a shared memory 2000 .
  • the first to eighth local memories 120a to 120h may be used as dedicated memories of the first to eighth neural cores 100a to 100h, respectively. That is, the first to eighth neural cores 100a to 100h and the first to eighth local memories 120a to 120h may correspond 1:1 to each other.
  • the shared memory 2000 may include first to eighth memory units 2100a to 2100h.
  • the first to eighth memory units 2100a to 2100h may respectively correspond to the first to eighth neural cores 100a to 100h and the first to eighth local memories 120a to 120h. That is, the number of memory units may be eight, the same as the number of neural cores and local memories.
  • the shared memory 2000 may operate in one of two types of on-chip memory formats. That is, the shared memory 2000 may operate in either a local memory format or a global memory format. That is, the shared memory 2000 can implement two types of logical memories with one hardware.
  • the shared memory 2000 When the shared memory 2000 is implemented in a local memory format, the shared memory 2000 is a dedicated memory for each of the first to eighth neural cores 100a to 100h, such as the first to eighth local memories 120a to 120h. (private memory) can operate.
  • the local memory can operate at a relatively high-speed clock compared to the global memory, and when the shared memory 2000 operates in the form of a local memory, it can use a relatively faster clock.
  • the shared memory 2000 may operate as a common memory used by the first neural core 100a and the second neural core 100b. there is. In this case, the shared memory 2000 may be shared not only by the first to eighth neural cores 100a to 100h but also by the first to eighth local memories 120a to 120h.
  • the global memory may generally use a lower clock than the local memory, but is not limited thereto.
  • the first to eighth neural cores 100a to 100h may share the shared memory 2000 .
  • the shared memory 2000 is connected to the volatile memory 32 of FIG. 2 through the global interconnection 6000 and may operate as a buffer of the volatile memory 32 .
  • At least a part of the shared memory 2000 may operate in a local memory format and the rest may operate in a global memory format. That is, the entire shared memory 2000 may operate in a local memory format or the entire shared memory 2000 may operate in a global memory format. Alternatively, a part of the shared memory 2000 may operate in a local memory format and the remaining part may operate in a global memory format.
  • FIG. 12 is a block diagram illustrating an example of memory reorganization of a neural processing system in accordance with some embodiments of the present invention.
  • AE5, and AE7 may include only the first, third, fifth, and seventh local memories 120a, 120c, 120e, and 120g, respectively.
  • the second, fourth, sixth, and eighth dedicated regions AE2, AE4, AE6, and AE8 of the second, fourth, sixth, and eighth neural cores 100b, 100d, 100f, and 100h, respectively, Second, fourth, sixth, and eighth local memories 120b, 120d, 120f, and 120h may be included.
  • the second, fourth, sixth, and eighth dedicated areas AE2 , AE4 , AE6 , and AE8 may include second, fourth, sixth, and eighth memory units 2100b, 2100d, 2100f, and 2100h.
  • the first, third, fifth, and seventh memory units 2100a, 2100c, 2100e, and 2100g of the shared memory 2000 may be used as a common area AC.
  • the common area AC may be a memory shared by the first to eighth neural cores 100a to 100h.
  • the second dedicated area AE2 may include a second local memory 120b and a second memory unit 2100b.
  • the second dedicated area AE2 may be an area in which the hardware-separated second local memory 120b and the second memory unit 210b operate in the same way and logically operate as one local memory.
  • the fourth, sixth, and eighth dedicated areas AE4, AE6, and AE8 may also operate in the same manner as the second dedicated area AE2.
  • the shared memory 2000 can be used by converting an area corresponding to each neural core into a logical local memory and a logical global memory at an optimized ratio.
  • the shared memory 2000 can adjust this ratio at run time.
  • each neural core may perform the same task in some cases, but may also perform different tasks in other cases.
  • the capacity of local memory and the capacity of global memory required for the work performed by each neural core are inevitably different each time. Accordingly, in the case where the composition ratio of the local memory and the shared memory is fixedly set as in the case of the conventional on-chip memory, inefficiency may occur due to calculation tasks allocated to each neural core.
  • the shared memory 2000 of the neural processing apparatus can set an optimal ratio of local memory and global memory according to a computational task during run time, and can improve efficiency and speed of computation.
  • FIG. 13 is an enlarged block diagram of part A of FIG. 11 .
  • the shared memory 2000 includes a first local memory controller 122_1a, a second local memory controller 122_1b, a fifth local memory controller 122_1e, and a sixth local memory controller 122_1f. , first to eighth memory units 2100a to 2100h and a global controller 2200 .
  • Other local memory controllers not shown may also be included in the present embodiment, but descriptions thereof are omitted for convenience.
  • the first local memory controller 122_1a may control the first local memory 120a. Also, the first local memory controller 122_1a may control the first memory unit 2100a. Specifically, when the first memory unit 2100a is implemented in a logical local memory format, control by the first local memory controller 122_1a may be performed on the first memory unit 2100a.
  • the second local memory controller 122_1b may control the second local memory 120b. Also, the second local memory controller 122_1b may control the second memory unit 2100b. That is, when the second memory unit 2100b is implemented in a logical local memory format, control by the first local memory controller 122_1a may be performed on the second memory unit 2100b.
  • the fifth local memory controller 122_1e may control the fifth local memory 120e. Also, the fifth local memory controller 122_1e may control the fifth memory unit 2100e. That is, when the fifth memory unit 2100e is implemented in a logical local memory format, control by the fifth local memory controller 122_1e may be performed on the fifth memory unit 2100e.
  • the sixth local memory controller 122_1f may control the sixth local memory 120f. Also, the sixth local memory controller 122_1f may control the sixth memory unit 2100f. That is, when the sixth memory unit 2100f is implemented in a logical local memory format, control by the sixth local memory controller 122_1f may be performed on the sixth memory unit 2100f.
  • the global controller 2200 may control all of the first to eighth memory units 2100a to 2100h. Specifically, when the first to eighth memory units 2100a to 2100h logically operate in a global memory format (that is, when they do not logically operate in a local memory format), the global controller 2200 performs a first memory operation. Units 2100a to 8th memory units 2100h may be controlled.
  • first to eighth memory units 2100a to 2100h are each controlled by the first to eighth local memory controllers 122_1a to 122_1h or controlled by the global controller 2200 depending on what type of memory is logically implemented. can be controlled by
  • the local memory controllers including the first, second, fifth, and sixth local memory controllers 122_1a, 122_1b, 122_1e, and 122_1f respectively control the first to eighth memory units 2100a to 2100h
  • the local memory controllers including the first local memory controller 122_1a, the second local memory controller 122_1b, the fifth local memory controller 122_1e, and the sixth local memory controller 122_1f are the LSU 110 of FIG. 6, respectively. can include
  • the global controller 2200 controls at least one of the first to eighth memory units 2100a to 2100h
  • the global controller 2200 controls the first to eighth memory units 2100a to 2100h, respectively. It can be controlled by the global memory of the eighth neural cores 100a to 100h. Accordingly, at least one of the first to eighth memory units 2100a to 2100h may operate at a clock frequency independent of the clock frequency of the first to eighth neural cores 100a to 100h.
  • this embodiment is not limited thereto.
  • the global controller 2200 may connect the first to eighth memory units 2100a to 2100h with the global interconnection 6000 of FIG. 3 .
  • the first to eighth memory units 2100a to 2100h exchange data with the off-chip memory 30 of FIG. 1 by the global controller 2200 or exchange data with the first to eighth local memories 120a to 120h, respectively. can be exchanged.
  • Each of the first to eighth memory units 2100a to 2100h may include at least one memory bank.
  • the first memory unit 2100a may include at least one first memory bank 2110a.
  • the first memory bank 2110a may be an area obtained by dividing the first memory unit 2100a into a specific size.
  • Each of the first memory banks 2110a may be memory devices having the same size. However, this embodiment is not limited thereto. 13 shows that four memory banks are included in one memory unit.
  • the second, fifth, and sixth memory units 2100b, 2100e, and 2100f may each include at least one second, fifth, and sixth memory bank 2110b, 2110e, and 2110f.
  • first memory bank 2110a and the fifth memory bank 2110e will be described, which may be the same as other memory banks including the second and sixth memory banks 2110b and 2110f.
  • Each of the first memory banks 2110a may logically operate in a local memory format or logically operate in a global memory format. In this case, the first memory bank 2110a may operate independently of other memory banks in the first memory unit 2100a. However, this embodiment is not limited thereto.
  • the first memory unit 2100a When each memory bank operates independently, the first memory unit 2100a includes a first area that operates in the same way as the first local memory 120a and a second area that operates in a different way from the first local memory 120a. It can contain 2 areas. In this case, the first area and the second area do not necessarily coexist, and either area may occupy the entire first memory unit 2100a.
  • the second memory unit 2100b may include a third area operating in the same way as the second local memory 120b and a fourth area operating in a different way from the second local memory 120b.
  • the third area and the fourth area do not necessarily coexist, and either area may occupy the entire first memory unit 2100a.
  • the ratio of the first area to the second area may be different from the ratio of the third area to the fourth area.
  • this embodiment is not limited thereto. Accordingly, the ratio of the first area to the second area may be the same as the ratio of the third area to the fourth area. That is, the memory configuration ratio in each memory unit can be varied as desired.
  • on-chip memories other than high-speed local memories are often composed of high-density, low-power SRAM. This is because SRAM has high efficiency in terms of chip area and power consumption compared to required capacity.
  • the existing on-chip memory inevitably slows down the processing speed for tasks that require more data than the predetermined capacity of the local memory. There was no inefficiency at all.
  • the shared memory 2000 may be selectively controlled by any one of the two controllers in some cases.
  • the shared memory 2000 is not entirely controlled by a predetermined one of the two controllers, and may be independently controlled in units of memory units or units of memory banks.
  • the shared memory 2000 according to the present embodiment can obtain an optimal memory configuration ratio according to a computational task during run time, and thus perform a faster and more efficient calculation task.
  • the required size of local memory and global memory may vary for each specific application.
  • the required size of the local memory and the global memory may be different for each layer.
  • the configuration ratio of the memory can be changed during run time even when the operation step according to each layer is changed, so that fast and efficient deep learning work can be performed.
  • FIG. 14 is a diagram for explaining the first bank of FIG. 13 in detail. 14 illustrates the first memory bank 2110a, other memory banks may also have the same structure as the first memory bank 2110a.
  • the first memory bank 2110a may include a cell array Ca, a bank controller Bc, a first path unit P1 and a second path unit P2.
  • the cell array Ca may include a plurality of memory elements Cell therein.
  • a plurality of memory elements may be arranged in a lattice structure.
  • the cell array Ca may be, for example, a static random access memory (SRAM) cell array.
  • the bank controller Bc may control the cell array Ca.
  • the bank controller Bc may determine whether the cell array Ca operates in a local memory format or a global memory format and controls the cell array Ca accordingly.
  • the bank controller Bc may determine whether to transmit/receive data in the direction of the first path unit P1 or the direction of the second path unit P2 during run time.
  • the bank controller Bc may determine the transmission/reception direction of data according to the path control signal Spc.
  • the path control signal Spc may be generated by a pre-designed device driver or compiler.
  • the path control signal Spc may be generated according to the characteristics of an arithmetic task.
  • the path control signal Spc may be generated by an input received from a user. That is, the user may directly apply an input to the path control signal Spc in order to select the most optimal memory configuration ratio.
  • the bank controller Bc may determine a transmission/reception path of data stored in the cell array Ca through the path control signal Spc.
  • the data exchange interface may vary according to the bank controller Bc determining the transmission/reception path of the data. That is, when the bank controller Bc exchanges data with the first path unit P1, the first interface may be used, and when data is exchanged with the second path unit P2, the second interface may be used. In this case, the first interface and the second interface may be different from each other.
  • an address system in which data is stored may be different. That is, when a specific interface is selected, read and write operations can be performed with an address system corresponding thereto.
  • the bank controller Bc may operate at a specific clock frequency.
  • the bank controller Bc may operate at an operating clock frequency of a general SRAM.
  • the first path unit P1 may be connected to the bank controller Bc.
  • the first path unit P1 may directly exchange data of the cell array Ca with the first neural core 100a.
  • “directly” may mean mutual exchange without going through the global interconnection 6000 . That is, the first neural core 100a can directly exchange data with the first local memory 120a, and the first neural core 100a operates when the shared memory 2000 is logically implemented in the form of a local memory. Data can be exchanged through 1 path unit P1.
  • the first path unit P1 may include a local memory controller including the first local memory controller 122_1a and the second local memory controller 122_1b of FIG. 13 .
  • the first path unit P1 may configure a multi-cycle sync-path. That is, the operating clock frequency of the first path unit P1 may be the same as the operating clock frequency of the first neural core 100a.
  • the first local memory 120a can rapidly exchange data at the same clock frequency as the operating clock frequency of the first neural core 100a in order to rapidly exchange data at the same speed as the operation of the first neural core 100a.
  • the first path unit P1 may operate at the same clock frequency as the operating clock frequency of the first neural core 100a.
  • the operating clock frequency of the first path unit P1 may be a multiple of the operating clock frequency of the bank controller Bc.
  • a separate CDC (Clock Domain Crossing) operation for clock synchronization between the bank controller Bc and the first path unit P1 is not required, and thus data transmission delay may not occur. there is. Accordingly, faster and more efficient data exchange may be possible.
  • the operating clock frequency of the first path unit P1 may be 1.5 GHz. This may be twice the frequency of 750 MHz of the bank controller (Bc). However, the present embodiment is not limited thereto, and any number may be possible if the first path unit P1 operates at an integer multiple of the clock frequency of the bank controller Bc.
  • the second path unit P2 may be connected to the bank controller Bc.
  • the second path unit P2 may exchange data of the cell array Ca through the global interconnection 6000 without directly exchanging the data with the first neural core 100a. That is, the first neural core 100a may exchange data with the cell array Ca through the global interconnection 6000 and the second path unit P2. At this time, the cell array Ca may exchange data not only with the first neural core 100a but also with other neural cores.
  • the second path unit P2 may be a data exchange path between the cell array Ca and all neural cores when the first memory bank 2110a is logically implemented in a global memory format.
  • the second path unit P2 may include the global controller 2200 of FIG. 13 .
  • the second path unit P2 may constitute an async-path.
  • the operating clock frequency of the second path unit P2 may be the same as the operating clock frequency of the global interconnection 6000 .
  • the second path unit P2 may also operate at the same clock frequency as the operating clock frequency of the global interconnection 6000 .
  • the operating clock frequency of the second path unit P2 may not be synchronized with the operating clock frequency of the bank controller Bc.
  • a clock domain crossing (CDC) operation may be required for clock synchronization between the bank controller Bc and the second path unit P2.
  • the bank controller Bc may use different address systems when exchanging data through the first path unit P1 and when exchanging data through the second path unit P2. That is, the bank controller Bc may use the first address system through the first path unit P1 and use the second address system through the second path unit P2. In this case, the first address system and the second address system may be different from each other.
  • the bank controller Bc does not necessarily exist for each memory bank. That is, since the bank controller (Bc) is not a part for scheduling but serves to transmit signals, it is not an essential part for each memory bank having two ports. Thus, one bank controller Bc can control several memory banks. Several memory banks can operate independently even though they are controlled by the bank controller Bc. However, this embodiment is not limited thereto.
  • the bank controller Bc may exist for each memory bank.
  • the bank controller Bc can individually control each memory bank.
  • the first address system and the third address system may be used exclusively for the first neural core 100a and the second neural core 100b, respectively.
  • the second address system may be commonly applied to the first neural core 100a and the second neural core 100b.
  • the operating clock frequency of the second path unit P2 may operate at 1 GHz. This may be a frequency that is not synchronized with the 750 MHz operating clock frequency of the bank controller (Bc). That is, the operating clock frequency of the second path unit P2 is not dependent on the operating clock frequency of the bank controller Bc and can be freely set.
  • a general global memory uses a slow SRAM (eg, 750 MHz) and a faster global interconnection (eg, 1 GHz), so that delays due to CDC work inevitably occur.
  • a faster global interconnection eg, 1 GHz
  • the overall processing speed may be easily reduced when the amount of data transfer occurs simultaneously.
  • the shared memory 2000 according to some embodiments of the present invention, there is room to use the first path unit P1 in addition to the second path unit P2, so that the amount of data processed in the global controller 2200 is adequately reduced. A dispersing effect can also be obtained.
  • 15 is a conceptual diagram for explaining virtual ID assignment of a neural processing apparatus according to some embodiments of the present invention.
  • the neural core SoC 10 may include a plurality of neural processors. 15 shows a case where there are, for example, 8 neural processors.
  • the neural core SoC 10 may include first to eighth neural processors PP0 to PP7.
  • the first to fourth neural processors PP0 to PP3 may divide and perform one task by the same program.
  • the fifth neural processor 1000 may perform one task alone, and the sixth to eighth neural processors PP5 to PP7 may divide and perform another task.
  • the first set Set1 may include the first to fourth neural processors PP0 to PP3.
  • the second set Set2 may include the fifth neural processor 1000 .
  • the third set (Set3) may include the sixth to eighth neural processors PP5 to PP7.
  • a new virtual ID may be assigned. That is, the first to fourth neural processors PP0 to PP3 of the first set Set1 may be assigned first to fourth virtual IDs VP0 to VP3, respectively.
  • the fifth neural processor 1000 of the second set (Set2) may be assigned a first virtual ID (VP0).
  • the sixth to eighth neural processors PP5 to PP7 of the third set (Set3) may be assigned first to third virtual IDs VP0 to VP2.
  • the same virtual ID can be assigned to different neural processors, but when the same program is executed together, the physical ID (i.e., the unique ID of each neural processor) and the virtual ID are different. It can correspond 1:1.
  • 16 is a diagram for explaining a virtual ID allocation and a VPID table of a neural processing apparatus according to some embodiments of the present invention.
  • first to fourth neural processors PP0 to PP3 of the first set Set1 are assigned first to fourth virtual IDs VP0 to VP3
  • the order of the physical ID and the virtual ID may not be the same. That is, the first neural processor 1000 may be assigned a third virtual ID VP2 instead of the first virtual ID VP0.
  • the second neural processor 1000 may be assigned a second virtual ID VP2
  • the third neural processor 1000 may be assigned a first virtual ID VP0 .
  • the fourth neural processor 1000 may be assigned a fourth virtual ID VP4.
  • the VPID table may record a physical ID corresponding to a virtual ID. For example, when values of 3, 0, 1, and 2 are sequentially recorded in the VPID table (TB_VTP), it is possible to determine which physical IDs the first to fourth virtual IDs (VP0 to VP3) correspond to in reverse order. there is.
  • the neural processor assigned the first virtual ID VP0 is the third neural processor 1000 by the number 2
  • the neural processor assigned the second virtual ID VP2 is the second neural processor by the number 1. (1000).
  • the neural processor assigned the third virtual ID (VP2) is the first neural processor 1000 by the number 0
  • the neural processor assigned the fourth virtual ID (VP4) is the fourth neural processor 1000 by the number 3. am.
  • 17 is a diagram for explaining a process of identifying a physical ID through a sync target and a VPID table.
  • the L3 sync target Sm_V may be a signal generated by each neural processor sending a synchronization signal. That is, the L3 sync target (Sm_V) may include, for example, 4 fields. This can be attributed to the fact that there are 4 neural processors in the same set. Each field of the L3 sync target Sm_V may correspond to first to fourth virtual IDs VP0 to VP3. That is, if 1, 0, 1, 1 are described in the L3 sync target Sm_V, 1, 1, 0, 1 may correspond to the first to fourth virtual IDs VP0 to VP3 in reverse order, respectively.
  • a meaning of '1' of the L3 sync target Sm_V may indicate a virtual ID of the neural processor 1000 to which a synchronization signal according to the L3 sync target Sm_V should be delivered. That is, the last 1 among 1, 0, 1, and 1 may mean that a synchronization signal according to the L3 sync target Sm_V should be transmitted to the neural processor of the first virtual ID VP0. That is, it can be represented by 1, 0, 1, 1 that the synchronization signal according to the L3 sync target Sm_V should be delivered to the remaining three neural processors except for the neural processor of the third virtual ID VP2.
  • the virtual IDs of the neural processors to which the synchronization signal according to the L3 sync target Sm_V should be transmitted are the first and second neural processors to which the synchronization signal according to the L3 sync target Sm_V should be transmitted. And after being identified as the fourth virtual IDs (VP0, VP1, VP3), the physical ID of the corresponding neural processor can be checked through the VPID table (TB_VTP). The neural processor can check the real address only after checking the physical ID.
  • the VPID table (TB_VTP) has values of 3, 0, 1, and 2, it can be seen that the physical IDs of the first, second, and fourth virtual IDs (VP0, VP1, and VP3) are 2, 1, and 3, respectively. . That is, the second to fourth neural processors PP1 to PP3 may be neural processors that receive synchronization signals according to the L3 sync target Sm_V.
  • 18 is a directed acyclic graph for explaining the sequence of deep learning tasks.
  • a calculation task of a neural processing apparatus may be expressed through a directed acyclic graph.
  • the current task is expressed as TaskN
  • the previous task may be Task(N-1) and the next task may be Task(N+1).
  • Task(N-1) in order for the current task, TaskN, to be performed, Task(N-1) must be completed, and similarly, in order for the next task, Task(N+1), to be performed, the current task, TaskN, must be completed.
  • the L3 sync target Sm_V may be an instruction in which information about a neural processor to perform the next task is written.
  • a synchronization signal may be transmitted accordingly.
  • 19 is a conceptual diagram illustrating a synchronization signal transmission operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.
  • the first neural processor 1000 may transmit synchronization signals according to the sync target Sm_V to the second to fourth neural processors PP1 to PP3. Through this, synchronization of the SoC level, that is, level 3 (L3) can be performed.
  • a neural processing apparatus may include first to third semaphore memories smp1 to smp3 respectively corresponding to the second to fourth neural processors PP1 to PP3.
  • the first to third semaphore memories smp1 to smp3 may be included in each of the second to fourth neural processors PP1 to PP3.
  • the first to third semaphore memories smp1 to smp3 may have the same shape as each other. Therefore, only the first semaphore memory smp1 will be described in detail below.
  • the first semaphore memory smp1 may correspond to the second neural processor 1000 .
  • the first semaphore memory smp1 may include four fields respectively corresponding to the four neural processors included in the first set Set1.
  • the first semaphore memory smp1 may include first to fourth fields, and the first to fourth fields may respectively correspond to the first to fourth neural processors PP0 to PP3. That is, the first to fourth fields may be arranged in the same order as the physical IDs of the first to fourth neural processors PP0 to PP3.
  • the first field of the first semaphore memory smp1 is a part for the first neural processor 1000 and is expressed as 1 when a synchronization signal according to the L3 sync target Sm_V is received from the first neural processor 1000. , or can be expressed as 0. Of course, the opposite expression may also be possible.
  • the first field value of the second semaphore memory smp2 and the third semaphore memory smp3 may also be displayed as 1 by receiving a synchronization signal according to the L3 sync target Sm_V by the first neural processor 1000.
  • the indication of 1, 0, 1, 1 of the first semaphore memory smp1 is a synchronization signal according to the L3 sync target Sm_V by the first, third, and fourth neural processors PP0, PP2, and PP3. may mean that is received.
  • the first neural processor 1000 sends a synchronization signal according to the L3 sync target (Sm_V) through the L3 sync channel 6300 of FIG. 4 to start the next task, Task (N+1). can be transmitted through Such synchronization may also be performed by other neural processors 1000, respectively.
  • Synchronization of the neural processing device according to the present embodiment can be performed in parallel since there is no centrally controlled control processor, thereby minimizing the occurrence of latency.
  • the efficiency of the entire device can be maximized because the overhead of scheduling in consideration of the dependencies of tasks due to such synchronization is not required.
  • 20 is a conceptual diagram for explaining a synchronization signal reception operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.
  • the first neural processor 1000 may receive synchronization signals from the first, third, and fourth neural processors PP0 , PP2 , and PP3 . Accordingly, the first to fourth fields of the first semaphore memory smp1 corresponding to the first neural processor 1000 may be filled with 1, 0, 1, 1, respectively.
  • a neural processing apparatus may include first to fourth FIFO buffers B1 to B4 respectively corresponding to the first to fourth fields.
  • the first to fourth FIFO buffers may provide values of the first to fourth fields of the first semaphore memory smp1 to the first neural processor 1000 in a first in first out (FIFO) manner.
  • the work of the neural processing device is not simply expressed as a straight line as shown in FIG. 18 . That is, one task can have a dependency chain according to several previous tasks. Accordingly, in the case of a task having more than one dependency chain, several semaphore memories may be required.
  • the neural processing apparatus may promote efficient utilization of memory space by adding a FIFO buffer to one semaphore memory per neural processor.
  • this embodiment can perform tasks of several dependency chains without difficulty while increasing memory efficiency.
  • FIG. 21 is a block diagram for explaining L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention
  • FIG. 22 describes L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention. It is a ladder diagram for
  • the first neural core 100a includes a first neural core store unit 112b, a first neural core load unit 112a, a first local memory 120a, and a first local memory store unit 111b. ) and a first local memory load unit 111a.
  • the second neural core 100b includes a second neural core store unit 112d, a second neural core load unit 112c, a second local memory 120b, a second local memory store unit 111d, and a second neural core load unit 112c.
  • 2 local memory load units 111c may be included.
  • the second neural core store unit 112d of the second neural core 100b generates an L1 sync request signal (S10).
  • the L1 sync request signal is synchronized when an L1 sync generate signal is received later, and can be maintained in a stall state until then. That is, the L1 sync request signal may be generated in a ready state for synchronization.
  • the fourth neural core load unit 112f of the fourth neural core 100d may generate an L2 sync request signal (S11).
  • each synchronization preparation time may be different.
  • the L2 sync request signal may be generated early like the fourth neural core 100d.
  • the second local memory store unit 111d stores data in the second local memory 120b (S12, 1). Subsequently, the second local memory store unit 111d transmits the L1 sync generation signal to the second neural core store unit 112d (S13, 2). In this case, the L1 sync generation signal may be transmitted using an L1 sync path. Accordingly, the L1 sync request signal of the second neural core store unit 112d may be synchronized.
  • the second neural core store unit 112d includes the first neural core load unit 112a of the first neural core 100a, the third neural core load unit 112e of the third neural core 100c, and the fourth neural core load unit 112e of the third neural core 100c.
  • the L2 sync generation signal may be broadcast to the fourth neural core load unit 112f of the neural core 100d (S14, S15, S16, 3). At this time, the L2 sync generation signal may be transmitted through the L2 sync pass 300 .
  • the fourth neural core 100d for which the L2 sync request signal has already been generated is immediately synchronized and a load operation is performed (S17).
  • the first neural core 100a and the third neural core 100c may perform a load task (S19, 4, 5)
  • the first neural core load unit 112a may request data from the second local memory 120b through the local interconnection 200 (4) and receive a data reply to the request (5). ).
  • FIG. 23 is a diagram for explaining an instruction set structure of a neural processing apparatus according to some embodiments of the present invention.
  • an instruction set architecture (ISA) of a neural processing device includes an operation code (opcode), an L1 sync target (Target for L1 SYNC), and an L2 sync target ( Target for L2 SYNC) and L3 sync target (Target for L3 SYNC). That is, sync targets of levels 1 to 3 may all be included in the structure of the instruction set.
  • 24 is a block diagram for explaining a software layer structure of a neural processing apparatus according to some embodiments of the present invention.
  • a software layer structure of a neural processing apparatus may include a DL framework 10000, a compiler stack 20000, and a backend module 30000.
  • the DL framework 10000 may refer to a framework for a deep learning model network used by a user.
  • a trained neural network may be created using a program such as TensorFlow or PyTorch.
  • the compiler stack 20000 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.
  • the adaptation layer 21000 may be a layer in contact with the DL framework 10000.
  • the adaptation layer 21000 may quantize the user's neural network model generated in the DL framework 10000 and perform graph correction. Also, the adaptation layer 21000 may convert a model type into a required type.
  • the front-end compiler 23000 may convert various neural network models and graphs transmitted from the adaptation layer 21000 into a constant intermediate representation (IR).
  • the converted IR may be a preset expression that is easy to handle in the backend compiler 24000 later.
  • the IR of the front-end compiler 23000 may be preliminarily optimized at the graph level.
  • the front-end compiler 23000 may finally generate an IR through an operation of converting the layout into a hardware-optimized layout.
  • the backend compiler 24000 optimizes the IR converted by the frontend compiler 23000 and converts it into a binary file so that the runtime driver can use it.
  • the backend compiler 24000 may generate optimized code by dividing a job into a scale suitable for hardware details.
  • the compute library 22000 may store template operations designed in a form suitable for hardware among various operations.
  • the compute library 22000 provides the backend compiler 24000 with several template operations that require hardware to generate optimized codes.
  • the runtime driver 25000 may perform continuous monitoring during operation to drive the neural network device according to some embodiments of the present invention. Specifically, it may be responsible for executing interfaces of neural network devices.
  • 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 application specific integrated circuit
  • FPGA field programmable gate array
  • the ASIC 31000 may refer to a hardware chip determined according to a predetermined design method.
  • the FPGA 32000 may be a programmable hardware chip.
  • the C-model (33000) may refer to a model implemented by imitating hardware on software.
  • the backend module 30000 may perform various tasks and derive results using binary codes generated through the compiler stack 20000 .
  • 25 is a conceptual diagram for explaining a deep learning operation performed by a neural processing apparatus according to some embodiments of the present invention.
  • the artificial neural network model 40000 is a statistical learning algorithm implemented based on the structure of a biological neural network or an algorithm thereof in machine learning technology and cognitive science. is the structure that runs
  • the artificial neural network model 40000 as in a biological neural network, nodes, which are artificial neurons that form a network by combining synapses, repeatedly adjust synaptic weights, and between correct outputs corresponding to specific inputs and inferred outputs. By learning to reduce the error of , it is possible to represent a machine learning model having problem solving ability.
  • the artificial neural network model 40000 may include an arbitrary probability model, a neural network model, and the like used in artificial intelligence learning methods such as machine learning and deep learning.
  • a neural processing apparatus may implement the form of the artificial neural network model 40000 to perform calculations.
  • the artificial neural network model 40000 may receive an input image and output information about at least a part of an object included in the input image.
  • the artificial neural network model 40000 is implemented as a multilayer perceptron (MLP) composed of multi-layer nodes and connections between them.
  • the artificial neural network model 40000 according to this embodiment may be implemented using one of various artificial neural network model structures including MLP.
  • the artificial neural network model 40000 includes an input layer 41000 that receives input signals or data 40100 from the outside, and an output layer that outputs output signals or data 40200 corresponding to the input data. (44000), which is located between the input layer 41000 and the output layer 44000, receives signals from the input layer 41000, extracts characteristics, and delivers n (where n is a positive integer) to the output layer 44000. It is composed of hidden layers (42000 to 43000).
  • the output layer 44000 receives signals from the hidden layers 42000 to 43000 and outputs them to the outside.
  • the learning method of the artificial neural network model (40000) includes a supervised learning method that learns to be optimized for problem solving by inputting a teacher signal (correct answer), and an unsupervised learning method that does not require a teacher signal. ) way.
  • the neural processing apparatus may directly generate learning data for learning the artificial neural network model 40000 through simulation.
  • a plurality of output variables corresponding to a plurality of input variables are matched in the input layer 41000 and the output layer 44000 of the artificial neural network model 40000, respectively, and the input layer 41000, hidden layers 42000 to 43000 and By adjusting synapse values between nodes included in the output layer 44000, learning can be performed so that a correct output corresponding to a specific input can be extracted.
  • the characteristics hidden in the input variables of the artificial neural network model 40000 can be identified, and the nodes of the artificial neural network model 40000 can reduce the error between the output variable calculated based on the input variable and the target output. You can adjust the synaptic value (or weight) between them.
  • 26 is a conceptual diagram for explaining learning and reasoning operations of a neural network of a neural processing apparatus according to some embodiments of the present invention.
  • a plurality of training materials may be forwarded to an artificial neural network model (NN) and then forwarded again.
  • weights and biases of each node of the artificial neural network model (NN) are tuned, and through this, learning can be performed so that more and more accurate results can be derived.
  • the artificial neural network model (NN) may be converted into a learned neural network model (NN_T).
  • new data ND may be input to the learned neural network model NN_T again.
  • the learned neural network model NN_T may derive result data RD through already learned weights and biases by taking new data ND as an input.
  • FIG. 27 is a flowchart illustrating a synchronization method of a neural processing apparatus according to some embodiments of the present invention
  • FIG. 28 is a flowchart illustrating in detail the L3 sync target storage step and the FIFO method providing step of FIG. 27 .
  • the first neural processor generates an L3 sync target (S100).
  • the L3 sync target Sm_V may be a signal generated by each neural processor sending a synchronization signal. That is, the L3 sync target (Sm_V) may include, for example, 4 fields. This can be attributed to the fact that there are 4 neural processors in the same set. Each field of the L3 sync target Sm_V may correspond to first to fourth virtual IDs VP0 to VP3. That is, if 1, 0, 1, 1 are described in the L3 sync target Sm_V, 1, 1, 0, 1 may correspond to the first to fourth virtual IDs VP0 to VP3 in reverse order, respectively.
  • a second neural processor to be received is identified using the L3 sync target and the VPID table (S200).
  • a neural processor that needs to send a synchronization signal according to the L3 sync target Sm_V is a neural processor to which a synchronization signal according to the L3 sync target Sm_V should be transmitted by the L3 sync target Sm_V.
  • the virtual IDs are identified as the first, second, and fourth virtual IDs (VP0, VP1, and VP3)
  • the physical ID of the corresponding neural processor can be checked through the VPID table (TB_VTP).
  • the neural processor can check the real address only after checking the physical ID.
  • the VPID table (TB_VTP) has values of 3, 0, 1, and 2, it can be seen that the physical IDs of the first, second, and fourth virtual IDs (VP0, VP1, and VP3) are 2, 1, and 3, respectively. . That is, the second to fourth neural processors PP1 to PP3 may be neural processors that receive synchronization signals according to the L3 sync target Sm_V.
  • the synchronization signal according to the L3 sync target is stored in the semaphore memory of the second neural processor through the L3 sync channel (S300).
  • the first semaphore memory smp1 may include first to fourth fields, and the first to fourth fields may respectively correspond to the first to fourth neural processors PP0 to PP3. there is. That is, the first to fourth fields may be arranged in the same order as the physical IDs of the first to fourth neural processors PP0 to PP3.
  • the first field of the first semaphore memory smp1 is a part for the first neural processor 1000 and is expressed as 1 when a synchronization signal according to the L3 sync target Sm_V is received from the first neural processor 1000. , or can be expressed as 0. Of course, the opposite expression may also be possible.
  • the value of the semaphore memory is provided to the second neural processor in a FIFO method (S400).
  • the neural processing apparatus may include first to fourth FIFO buffers B1 to B4 respectively corresponding to the first to fourth fields.
  • the first to fourth FIFO buffers may provide values of the first to fourth fields of the first semaphore memory smp1 to the first neural processor 1000 in a first in first out (FIFO) manner.
  • the synchronization signal according to the L1 sync target of the first neural processor is stored in the first field of the semaphore memory of the second neural processor (S310), and the first field value of the semaphore memory is provided to the second neural processor in a FIFO manner ( S410).
  • the synchronization signal according to the L1 sync target of the second neural processor is stored in the second field of the semaphore memory of the second neural processor (S320), and the value of the second field of the semaphore memory is stored in the second neural processor in a FIFO manner. It is provided (S420).
  • the synchronization signal according to the L1 sync target of the third neural processor is stored in the third field of the semaphore memory of the second neural processor (S330), and the value of the third field of the semaphore memory is provided to the second neural processor in a FIFO method ( S430).
  • the synchronization signal according to the L1 sync target of the fourth neural processor is stored in the fourth field of the semaphore memory of the second neural processor (S340), and the value of the fourth field of the semaphore memory is provided to the second neural processor in a FIFO manner ( S440).
  • each field corresponds to each neural processor, and synchronization may be performed in parallel in a FIFO format.
  • the second neural processor performs synchronization through the L3 sync target (S500).
  • FIG. 29 is a flowchart illustrating a synchronization method of L1 and L2 levels of a neural processing apparatus according to some embodiments of the present invention
  • FIG. 30 is a flowchart illustrating a data request step of FIG. 29 in detail.
  • data is stored in the local memory of the first neural core (S1100). Subsequently, within the first neural core, the local memory store unit transmits a synchronization signal according to the L1 sync target to the neural core store unit (S1200).
  • the second local memory store unit 111d stores data in the second local memory 120b (S12, 1). Subsequently, the second local memory store unit 111d transmits the L1 sync generation signal to the second neural core store unit 112d (S13, 2). In this case, the L1 sync generation signal may be transmitted using an L1 sync path. Accordingly, the L1 sync request signal of the second neural core store unit 112d may be synchronized.
  • the neural core store unit of the first neural core transmits a synchronization signal according to the L2 sync target to the neural core load units of the second to fourth neural cores (S1300).
  • the second neural core store unit 112d is configured to load the first neural core load unit 112a of the first neural core 100a and the third neural core 100c.
  • the L2 sync generation signal may be broadcast to the third neural core load unit 112e and the fourth neural core load unit 112f of the fourth neural core 100d (S14, S15, S16, 3). At this time, the L2 sync generation signal may be transmitted through the L2 sync pass 300 .
  • the second to fourth neural core load units request data from the local memory of the first neural core through the local interconnection (S1400).
  • the second neural core receives a synchronization signal according to the L2 sync target (S1410) and determines whether an L2 sync request signal has already been generated (S1420). If not, it waits for the L2 sync request signal to be generated (S1430). If so, the second neural core requests data from the local memory of the first neural core (S1440).
  • the second to fourth neural core load units receive data (S1500).

Landscapes

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

Abstract

A neural processing device and a synchronization method thereof are disclosed. The neural processing device comprises: first and second neural processors; a shared memory shared by the first and second neural processors; first and second semaphore memories that correspond to the first and second neural processors, respectively, and receive and store an L3 sync target, wherein synchronization between the first and second neural processors is performed according to the L3 sync target; and a global interconnection that connects the first and second neural processors to the shared memory, and includes an L3 sync channel through which a synchronization signal corresponding to the L3 sync target is transmitted.

Description

뉴럴 프로세싱 장치 및 그의 동기화 방법Neural Processing Apparatus and Synchronization Method Thereof

본 발명은 뉴럴 프로세싱 장치 및 그의 동기화 방법에 관한 것이다. 구체적으로, 본 발명은 중앙 제어 프로세서 대신에 각각의 프로세서가 동기화를 수행하는 뉴럴 프로세싱 장치 및 그의 동기화 방법에 관한 것이다.The present invention relates to a neural processing apparatus and a synchronization method thereof. Specifically, the present invention relates to a neural processing apparatus and a synchronization method thereof in which each processor performs synchronization instead of a central control processor.

지난 몇년간, 인공지능(Artificial Intelligence) 기술은 4차 산업혁명의 핵심 기술로 전세계적으로 가장 유망한 기술로 거론되고 있다. 이러한 인공지능 기술의 가장 큰 문제는 컴퓨팅 성능이다. 인간의 학습능력과 추론능력, 지각능력, 자연언어의 이행능력 등을 실현해내는 인공지능 기술은 많은 데이터를 빠르게 처리하는 것이 가장 중요하다.In the past few years, artificial intelligence (AI) technology has been discussed 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 power. The most important thing in artificial intelligence technology that realizes human learning, reasoning, perception, and natural language implementation is to process a lot of data quickly.

초기 인공지능의 딥러닝 학습과 추론에는 기성 컴퓨터의 중앙처리장치(CPU; Central processing unit)나 그래픽처리장치(GPU; Graphics Processing Unit)가 쓰였지만, 높은 워크 로드를 가지는 딥러닝 학습 및 추론의 작업에는 한계가 있어 구조적으로 딥러닝 작업에 특화된 신경망 처리 장치(NPU; Neural Processing Unit)가 각광받고 있다.Although the central processing unit (CPU) or graphics processing unit (GPU) of an off-the-shelf computer was used for deep learning learning and reasoning of early artificial intelligence, deep learning learning and reasoning tasks with high workloads were used. has limitations, so a neural processing unit (NPU) structurally specialized for deep learning tasks is in the limelight.

이러한 신경망 처리 장치는 내부에 많은 수의 프로세싱 유닛과 코어를 포함하고 있고, 이러한 모듈들의 동기화는 작업의 의존성(dependency)에 따라 명확하게 처리되어야 하는 부분이다. 기존의 처리 장치들은 중앙에서 제어 프로세서(Control processor 또는 Centralized Controller)가 이러한 동기화 신호를 제어하고 순서에 따른 동작을 관리하였다.Such a neural network processing device includes a large number of processing units and cores therein, and synchronization of these modules is a part that must be clearly handled according to task dependencies. In existing processing devices, a control processor (or centralized controller) centrally controls these synchronization signals and manages operations in accordance with the order.

그러나, 이러한 방식은 신경망 처리 장치에서 더더욱 많은 프로세싱 유닛 및 코어를 포함하게 되면서 동기화 처리에 많은 레이턴시(latency)가 발생하고 제어 프로세서의 오버헤드가 높아질 수 있다.However, in this method, as more and more processing units and cores are included in the neural network processing device, a lot of latency may occur in synchronization processing and overhead of a control processor may increase.

선행기술문헌 : 등록특허공보 제10-2258566호Prior art literature: Patent Registration No. 10-2258566

본 발명의 과제는, 빠르고 효율적인 동기화 처리가 가능한 뉴럴 프로세싱 장치를 제공하는 것이다.An object of the present invention is to provide a neural processing apparatus capable of fast and efficient synchronization processing.

또한, 본 발명의 다른 과제는, 빠르고 효율적인 동기화 처리가 가능한 뉴럴 프로세싱 장치의 동기화 방법을 제공하는 것이다.Another object of the present invention is to provide a method for synchronizing a neural processing device capable of fast and efficient synchronization processing.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention not mentioned above can be understood by the following description and will be more clearly understood by the examples of the present invention. It will also be readily apparent that the objects and advantages of the present invention may be realized by means of the instrumentalities and combinations indicated in the claims.

상기 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치는 제1 및 제2 뉴럴 프로세서, 상기 제1 및 제2 뉴럴 프로세서가 공유하는 공유 메모리 및 상기 제1 및 제2 뉴럴 프로세서 각각에 대응하고, L3 싱크 타겟을 수신하여 저장하는 제1 및 제2 세마포어 메모리로서, 상기 L3 싱크 타겟에 따라 상기 제1 및 제2 뉴럴 프로세서의 동기화가 수행되는 제1 및 제2 세마포어 메모리, 상기 제1 및 제2 뉴럴 프로세서와, 상기 공유 메모리를 연결하고, 상기 L3 싱크 타겟에 따른 동기화 신호가 전송되는 L3 싱크 채널을 포함하는 글로벌 인터커넥션을 포함한다.In order to solve the above problem, a neural processing apparatus according to some embodiments of the present invention provides first and second neural processors, a shared memory shared by the first and second neural processors, and each of the first and second neural processors. first and second semaphore memories corresponding to each other and receiving and storing an L3 sync target, wherein synchronization of the first and second neural processors is performed according to the L3 sync target; and a global interconnection including an L3 sync channel connecting the second neural processor and the shared memory and transmitting a synchronization signal according to the L3 sync target.

또한, 상기 글로벌 인터커넥션은, 상기 L3 싱크 채널과, 상기 공유 메모리, 상기 제1 및 제2 뉴럴 프로세서 사이에서 데이터를 전송하는 데이터 채널과, 상기 제1 및 제2 뉴럴 프로세서에 컨트롤 신호를 전송하는 컨트롤 채널을 포함할 수 있다.In addition, the global interconnection includes a data channel for transmitting data between the L3 sync channel, the shared memory, and the first and second neural processors, and a control signal for transmitting a control signal to the first and second neural processors. Can contain control channels.

또한, 상기 제1 세마포어 메모리는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 필드를 포함할 수 있다.Also, the first semaphore memory may include first and second fields respectively corresponding to the first and second neural processors.

또한, 상기 제1 필드의 값을 순차적으로 상기 제1 뉴럴 프로세서에 전달하는 제1 FIFO 버퍼를 더 포함할 수 있다.The method may further include a first FIFO buffer that sequentially transfers values of the first field to the first neural processor.

또한, 상기 제2 필드의 값을 순차적으로 상기 제1 뉴럴 프로세서에 전달하는 제2 FIFO 버퍼를 더 포함할 수 있다.The processor may further include a second FIFO buffer that sequentially transfers values of the second field to the first neural processor.

또한, 상기 L3 싱크 타겟은 제1 및 제2 L3 싱크 타겟을 포함하고, 상기 제1 뉴럴 프로세서는 상기 제1 L3 싱크 타겟을 생성하고, 상기 제2 뉴럴 프로세서는 상기 제2 L3 싱크 타겟을 생성할 수 있다.In addition, the L3 sync target includes first and second L3 sync targets, the first neural processor generates the first L3 sync target, and the second neural processor generates the second L3 sync target. can

또한, 상기 L3 싱크 타겟은 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 싱크 타겟 필드를 포함하고, 상기 제1 및 제2 싱크 타겟 필드는 상기 제1 및 제2 뉴럴 프로세서가 상기 L3 싱크 타겟에 따른 동기화 신호를 수신하는 지에 대한 정보를 포함할 수 있다. In addition, the L3 sync target includes first and second sync target fields corresponding to the first and second neural processors, respectively, and the first and second sync target fields are configured by the first and second neural processors. It may include information on whether a synchronization signal according to the L3 sync target is received.

또한, 상기 제1 및 제2 싱크 타겟 필드는 상기 제1 및 제2 뉴럴 프로세서 각각의 가상 아이디 순서대로 정렬될 수 있다.Also, the first and second sync target fields may be arranged in the order of virtual IDs of the first and second neural processors, respectively.

또한, 상기 제1 뉴럴 프로세서는 상기 L3 싱크 타겟과 VPID 테이블을 이용하여 상기 L3 싱크 타겟에 따른 동기화 신호를 수신하는 뉴럴 프로세서의 피지컬 아이디를 식별하고, 상기 VPID 테이블은 상기 가상 아이디와 상기 피지컬 아이디를 변환하기 위한 정보를 포함할 수 있다.In addition, the first neural processor identifies a physical ID of a neural processor receiving a synchronization signal according to the L3 sync target by using the L3 sync target and the VPID table, and the VPID table identifies the virtual ID and the physical ID. It may contain information for conversion.

또한, 상기 제1 및 제2 뉴럴 프로세서가 동일한 프로그램을 수행하는 경우, 상기 제1 및 제2 뉴럴 프로세서의 상기 피지컬 아이디와 상기 제1 및 제2 뉴럴 프로세서의 상기 가상 아이디는 서로 1:1로 대응할 수 있다.Also, when the first and second neural processors execute the same program, the physical ID of the first and second neural processors and the virtual ID of the first and second neural processors may correspond 1:1 to each other. can

또한, 상기 L3 싱크 타겟은 명령어 집합 구조(Instruction set architecture, ISA)에 포함될 수 있다.In addition, the L3 sync target may be included in an instruction set architecture (ISA).

또한, 상기 뉴럴 프로세서는, 적어도 하나의 뉴럴 코어와, 상기 적어도 하나의 뉴럴 코어 사이에서 데이터를 전송하는 로컬 인터커넥션을 포함할 수 있다.Also, the neural processor may include at least one neural core and a local interconnection for transmitting data between the at least one neural core.

또한, 상기 뉴럴 프로세서는, 상기 적어도 하나의 뉴럴 코어 사이의 동기화를 수행하기 위한 L2 싱크 타겟에 따른 동기화 신호가 전송되는 L2 싱크 패스를 더 포함할 수 있다.In addition, the neural processor may further include an L2 sync pass through which a synchronization signal according to an L2 sync target for performing synchronization between the at least one neural core is transmitted.

또한, 상기 L2 싱크 타겟은 상기 명령어 집합 구조에 포함될 수 있다.Also, the L2 sync target may be included in the instruction set structure.

또한, 상기 적어도 하나의 뉴럴 코어 각각은, 인풋 액티베이션 및 웨이트를 수신하여 딥러닝 연산을 수행하고, 아웃풋 액티베이션을 출력하는 프로세싱 유닛과, 상기 인풋 액티베이션, 상기 웨이트 및 상기 아웃풋 액티베이션을 일시적으로 저장하는 로컬 메모리를 포함할 수 있다.In addition, each of the at least one neural core includes a processing unit that receives input activations and weights, performs deep learning operations, and outputs output activations, and a local area that temporarily stores the input activations, the weights, and the output activations. may contain memory.

또한, 상기 적어도 하나의 뉴럴 코어 각각은, 상기 인풋 액티베이션 및 상기 아웃풋 액티베이션을, 상기 프로세싱 유닛과 상기 로컬 메모리 사이에서 일시적으로 저장하는 액티베이션 버퍼를 더 포함할 수 있다.In addition, each of the at least one neural core may further include an activation buffer temporarily storing the input activation and the output activation between the processing unit and the local memory.

또한, 상기 적어도 하나의 뉴럴 코어 각각은, 상기 액티베이션 버퍼와 상기 로컬 메모리 사이에서, 상기 인풋 액티베이션 및 상기 아웃풋 액티베이션을 이동시키는 액티베이션 LSU(Load/Store Unit)를 더 포함할 수 있다.In addition, each of the at least one neural core may further include an activation load/store unit (LSU) for moving the input activation and the output activation between the activation buffer and the local memory.

또한, 상기 적어도 하나의 뉴럴 코어 각각은, 상기 로컬 메모리와 상기 프로세싱 유닛 사이에서 상기 웨이트를 일시적으로 저장하는 웨이트 버퍼를 더 포함할 수 있다.In addition, each of the at least one neural core may further include a weight buffer temporarily storing the weight between the local memory and the processing unit.

또한, 상기 적어도 하나의 뉴럴 코어 각각은, 상기 로컬 메모리와 상기 로컬 인터커넥션 사이에서 데이터를 이동시키는 LSU를 더 포함할 수 있다.In addition, each of the at least one neural core may further include an LSU for moving data between the local memory and the local interconnection.

또한, 상기 LSU는, 상기 로컬 메모리의 저장을 수행하는 로컬 메모리 스토어 유닛과, 상기 로컬 메모리의 로드를 수행하는 로컬 메모리 로드 유닛을 포함할 수 있다.In addition, the LSU may include a local memory store unit for storing the local memory and a local memory load unit for loading the local memory.

또한, 상기 LSU는, 상기 뉴럴 코어에서 외부로 저장을 수행하는 뉴럴 코어 스토어 유닛과, 상기 뉴럴 코어에서 외부에서의 로드를 수행하는 뉴럴 코어 로드 유닛을 포함할 수 있다.In addition, the LSU may include a neural core store unit that performs external storage in the neural core and a neural core load unit that externally loads the neural core.

또한, 상기 로컬 메모리와 다른 엘리먼트 사이에 동기화를 위한 L1 싱크 타겟에 따른 동기화 신호가 전송되는 L1 싱크 패스를 더 포함할 수 있다.In addition, an L1 sync pass through which a synchronization signal according to an L1 sync target for synchronization between the local memory and other elements is transmitted may be further included.

또한, 상기 L1 싱크 타겟은 상기 명령어 집합 구조에 포함될 수 있다.Also, the L1 sync target may be included in the instruction set structure.

또한, 상기 프로세싱 유닛은, 2차원 연산을 수행하는 프로세싱 엘리먼트 어레이와, 1차원 연산을 수행하는 벡터 유닛을 포함할 수 있다.Also, the processing unit may include a processing element array that performs a two-dimensional operation and a vector unit that performs a one-dimensional operation.

또한, 상기 프로세싱 유닛은, 제1 입력을 상기 프로세싱 엘리먼트 어레이의 각 행(row)에 공급하는 행 레지스터와, 제2 입력을 수신하여 상기 프로세싱 엘리먼트 어레이의 각 열(column)에 공급하는 열 레지스터를 더 포함하고, 상기 제1 및 제2 입력은 각각 웨이트 및 인풋 액티베이션 중 어느 하나를 포함할 수 있다.In addition, the processing unit includes a row register for supplying a first input to each row of the array of processing elements and a column register for receiving and supplying a second input to each column of the array of processing elements. Further, the first and second inputs may each include any one of weight and input activation.

상기 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치는 적어도 하나의 뉴럴 프로세서, 공유 메모리 및 상기 적어도 하나의 뉴럴 프로세서 및 공유 메모리를 연결하고, 상기 뉴럴 프로세서의 L3 동기화에 사용되는 글로벌 인터커넥션을 포함하고, 상기 뉴럴 프로세서는 적어도 하나의 뉴럴 코어와, 상기 적어도 하나의 뉴럴 코어를 연결하는 로컬 인터커넥션과, 상기 적어도 하나의 뉴럴 코어의 L2 동기화에 사용되는 L2 싱크 패스를 포함하고, 상기 뉴럴 코어는, 연산 작업을 수행하는 프로세싱 유닛과, 데이터를 일시적으로 저장하는 로컬 메모리와, 상기 로컬 메모리 및 상기 프로세싱 유닛의 L1 동기화에 사용되는 L1 싱크 패스를 포함한다.In order to solve the above problem, a neural processing apparatus according to some embodiments of the present invention connects at least one neural processor, a shared memory, and the at least one neural processor and a shared memory, and a global used for L3 synchronization of the neural processor. an interconnection, wherein the neural processor includes at least one neural core, a local interconnection connecting the at least one neural core, and an L2 sync pass used for L2 synchronization of the at least one neural core; The neural core includes a processing unit that performs arithmetic operations, a local memory that temporarily stores data, and an L1 sync pass used for L1 synchronization of the local memory and the processing unit.

또한, 상기 글로벌 인터커넥션은, 상기 적어도 하나의 뉴럴 프로세서 및 상기 공유 메모리 사이의 데이터를 전송하는 데이터 채널과, 상기 적어도 하나의 뉴럴 프로세서 사이의 컨트롤 신호를 전송하는 컨트롤 채널과, 상기 L3 동기화에 사용되는 싱크 채널을 포함할 수 있다.In addition, the global interconnection includes a data channel for transmitting data between the at least one neural processor and the shared memory, a control channel for transmitting a control signal between the at least one neural processor, and used for L3 synchronization. A sync channel may be included.

또한, 상기 뉴럴 프로세서는, 상기 적어도 하나의 뉴럴 코어 사이의 데이터를 전송하는 로컬 인터커넥션을 더 포함할 수 있다.In addition, the neural processor may further include a local interconnection for transmitting data between the at least one neural core.

또한, 상기 로컬 메모리와, 상기 프로세싱 유닛을 포함하는 엘리먼트들과의 데이터 교환에 사용되는 데이터 패스를 포함할 수 있다.In addition, a data path used for data exchange between the local memory and elements including the processing unit may be included.

또한, 상기 프로세싱 유닛은, 2차원 연산을 수행하는 프로세싱 엘리먼트 어레이와, 1차원 연산을 수행하는 벡터 유닛을 포함할 수 있다.Also, the processing unit may include a processing element array that performs a two-dimensional operation and a vector unit that performs a one-dimensional operation.

또한, 상기 프로세싱 엘리먼트 어레이는, 행과 열로 정렬된 복수의 프로세싱 엘리먼트를 포함하고, 상기 복수의 프로세싱 엘리먼트는 각각 곱셈을 수행할 수 있다.Also, the processing element array includes a plurality of processing elements arranged in rows and columns, and each of the plurality of processing elements may perform multiplication.

또한, 상기 적어도 하나의 뉴럴 프로세서는 제1 및 제2 뉴럴 프로세서를 포함하고, 상기 제1 및 제2 뉴럴 프로세서 각각에 대응하고, L3 싱크 타겟에 대응하는 동기화 신호를 수신하여 저장하는 제1 및 제2 세마포어 메모리로서, 상기 L3 싱크 타겟에 따라 상기 제1 및 제2 뉴럴 프로세서의 동기화가 수행되는 제1 및 제2 세마포어 메모리를 더 포함할 수 있다. In addition, the at least one neural processor includes first and second neural processors, and first and second neural processors receive and store a synchronization signal corresponding to the first and second neural processors and corresponding to an L3 sync target. The second semaphore memory may further include first and second semaphore memories in which synchronization of the first and second neural processors is performed according to the L3 sync target.

또한, 상기 제1 세마포어 메모리는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 필드를 포함하고, 상기 제1 필드의 값을 순차적으로 상기 제1 뉴럴 프로세서에 전달하는 제1 FIFO 버퍼를 더 포함할 수 있다.In addition, the first semaphore memory includes first and second fields respectively corresponding to the first and second neural processors, and sequentially transfers values of the first fields to the first neural processor. A first FIFO It may contain more buffers.

또한, 상기 제1 뉴럴 프로세서는 명령어 집합 구조를 전송하고, 상기 명령어 집합 구조는, 오퍼레이션 코드, 상기 L3 동기화를 위한 L3 싱크 타겟, 상기 L2 동기화를 위한 L2 싱크 타겟 및 상기 L1 동기화를 위한 L1 싱크 타겟을 포함할 수 있다.In addition, the first neural processor transmits an instruction set structure, and the instruction set structure includes an operation code, an L3 sync target for the L3 synchronization, an L2 sync target for the L2 synchronization, and an L1 sync target for the L1 synchronization. can include

상기 다른 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 동기화 방법은 제1 및 제2 뉴럴 프로세서를 포함하는 뉴럴 프로세싱 장치의 동기화 방법에 있어서, 상기 제1 뉴럴 프로세서가 L3 동기화에 대한 L3 싱크 타겟을 생성하고, 상기 L3 싱크 타겟은 상기 제1 및 제2 뉴럴 프로세서의 가상 아이디 순서로 정렬되고, 상기 L3 싱크 타겟과 VPID 테이블을 이용하여 상기 제2 뉴럴 프로세서의 피지컬 아이디를 식별하되, 상기 VPID 테이블은 뉴럴 프로세서의 상기 가상 아이디와 상기 피지컬 아이디의 변환 테이블이고, 글로벌 인터커넥션의 L3 싱크 채널을 통해서, 상기 제2 뉴럴 프로세서의 제1 세마포어 메모리에 상기 L3 싱크 타겟에 따른 동기화 신호를 저장하고, 상기 제2 뉴럴 프로세서가 상기 제1 세마포어 메모리의 값에 따라 상기 L3 동기화를 수행하는 것을 포함한다.In order to solve the other problem, a method for synchronizing a neural processing device according to some embodiments of the present invention is a method for synchronizing a neural processing device including first and second neural processors, wherein the first neural processor performs L3 synchronization. generating an L3 sync target for the first and second neural processors, the L3 sync target being arranged in order of virtual IDs of the first and second neural processors, and identifying a physical ID of the second neural processor using the L3 sync target and a VPID table; , The VPID table is a conversion table of the virtual ID and the physical ID of the neural processor, and a synchronization signal according to the L3 sync target is transmitted to the first semaphore memory of the second neural processor through the L3 sync channel of the global interconnection. and performing the L3 synchronization according to the value of the first semaphore memory by the second neural processor.

또한, 상기 제1 세마포어 메모리는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 필드를 포함할 수 있다.Also, the first semaphore memory may include first and second fields respectively corresponding to the first and second neural processors.

또한, 상기 L3 동기화를 수행하는 것은, 상기 제1 필드의 값을 FIFO 방식으로 상기 제2 뉴럴 프로세서에 제공하고, 상기 제2 필드의 값을 FIFO 방식으로 상기 제2 뉴럴 프로세서에 제공하는 것을 포함할 수 있다.The performing of the L3 synchronization may include providing a value of the first field to the second neural processor in a FIFO manner and providing a value of the second field to the second neural processor in a FIFO manner. can

또한, 상기 가상 아이디는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응되는 제1 및 제2 가상 아이디를 포함할 수 있다.Also, the virtual ID may include first and second virtual IDs respectively corresponding to the first and second neural processors.

또한, 상기 제1 뉴럴 프로세서는, 제1 및 제2 뉴럴 코어와, 상기 제1 및 제2 뉴럴 코어 사이의 데이터를 전송하는 로컬 인터커넥션과, 상기 제1 및 제2 뉴럴 코어 사이의 동기화 신호를 위한 L2 싱크 타겟에 따른 동기화 신호를 전송하는 L2 싱크 패스를 포함할 수 있다.The first neural processor may also configure first and second neural cores, a local interconnection for transmitting data between the first and second neural cores, and a synchronization signal between the first and second neural cores. It may include an L2 sync pass for transmitting a synchronization signal according to an L2 sync target for

또한, 상기 제1 뉴럴 코어는, 제1 인풋 액티베이션 및 제1 웨이트를 수신하여 딥러닝 연산을 수행하고, 제1 아웃풋 액티베이션을 출력하는 제1 프로세싱 유닛과, 상기 제1 인풋 액티베이션, 상기 제1 웨이트 및 상기 제1 아웃풋 액티베이션을 일시적으로 저장하는 제1 로컬 메모리와, 상기 제1 로컬 메모리와 상기 제1 프로세싱 유닛 사이의 동기화를 위한 L1 싱크 타겟에 따른 동기화 신호를 전송하는 제1 L1 싱크 패스를 포함하고, 상기 제2 뉴럴 코어는, 제2 인풋 액티베이션 및 제2 웨이트를 수신하여 딥러닝 연산을 수행하고, 제2 아웃풋 액티베이션을 출력하는 제2 프로세싱 유닛과, 상기 제2 인풋 액티베이션, 상기 제2 웨이트 및 상기 제2 아웃풋 액티베이션을 일시적으로 저장하는 제2 로컬 메모리와, 상기 제2 로컬 메모리와 상기 제2 프로세싱 유닛 사이의 동기화를 위한 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하는 제2 L1 싱크 패스를 포함할 수 있다.In addition, the first neural core includes a first processing unit that receives a first input activation and a first weight, performs a deep learning operation, and outputs a first output activation; the first input activation and the first weight; and a first local memory temporarily storing the first output activation and a first L1 sync pass transmitting a synchronization signal according to an L1 sync target for synchronization between the first local memory and the first processing unit. and the second neural core comprises a second processing unit that receives second input activation and a second weight, performs a deep learning operation, and outputs a second output activation; the second input activation and the second weight; and a second L1 sync pass for transmitting a second local memory temporarily storing the second output activation and a synchronization signal according to the L1 sync target for synchronization between the second local memory and the second processing unit. can include

또한, 상기 제1 로컬 메모리에 데이터를 저장하고, 상기 제1 뉴럴 코어 내부에서, 상기 제1 L1 싱크 패스를 통해서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하고, 상기 제1 뉴럴 코어가 상기 제2 L2 싱크 패스를 통해서, 상기 L2 싱크 타겟에 따른 동기화 신호를 상기 제2 뉴럴 코어로 전송하고, 상기 제2 뉴럴 코어가 상기 로컬 인터커넥션을 통해서 데이터를 수신하는 것을 더 포함할 수 있다.In addition, data is stored in the first local memory, a synchronization signal according to the L1 sync target is transmitted through the first L1 sync pass in the first neural core, and the first neural core transmits a synchronization signal according to the second L1 sync pass. The method may further include transmitting a synchronization signal according to the L2 sync target to the second neural core through an L2 sync pass, and the second neural core receiving data through the local interconnection.

또한, 상기 제1 뉴럴 코어는 상기 제1 로컬 메모리와 상기 제1 로컬 인터커넥션 사이에서 데이터를 이동시키는 제1 LSU를 더 포함하고, 상기 제2 뉴럴 코어는 상기 제2 로컬 메모리와 상기 제2 로컬 인터커넥션 사이에서 데이터를 이동시키는 제2 LSU를 더 포함할 수 있다.The first neural core may further include a first LSU for moving data between the first local memory and the first local interconnection, and the second neural core may include the second local memory and the second local interconnection. It may further include a second LSU for moving data between interconnections.

또한, 상기 제1 LSU는, 상기 제1 로컬 메모리의 저장을 수행하는 제1 로컬 메모리 스토어 유닛과, 상기 제1 로컬 메모리의 로드를 수행하는 제1 로컬 메모리 로드 유닛과, 상기 제1 뉴럴 코어에서 외부로 저장을 수행하는 제1 뉴럴 코어 스토어 유닛과, 상기 제1 뉴럴 코어에서 외부에서의 로드를 수행하는 제1 뉴럴 코어 로드 유닛을 포함할 수 있다.In addition, the first LSU includes a first local memory store unit for storing the first local memory, a first local memory load unit for loading the first local memory, and the first neural core. It may include a first neural core store unit that performs external storage and a first neural core load unit that externally loads the first neural core.

또한, 상기 제1 뉴럴 코어 내부에서, 상기 제1 L1 싱크 패스를 통해서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하는 것은, 상기 제1 로컬 메모리 스토어 유닛이 상기 L1 싱크 타겟을 상기 제1 뉴럴 코어 스토어 유닛으로 전송하는 것을 포함할 수 있다.In addition, in the first neural core, transmitting the synchronization signal according to the L1 sync target through the first L1 sync pass causes the first local memory store unit to store the L1 sync target in the first neural core store. Can include sending to units.

또한, 상기 제2 LSU는, 상기 제2 로컬 메모리의 저장을 수행하는 제2 로컬 메모리 스토어 유닛과, 상기 제2 로컬 메모리의 로드를 수행하는 제2 로컬 메모리 로드 유닛과, 상기 제2 뉴럴 코어에서 외부로 저장을 수행하는 제2 뉴럴 코어 스토어 유닛과, 상기 제2 뉴럴 코어에서 외부에서의 로드를 수행하는 제2 뉴럴 코어 로드 유닛을 포함할 수 있다.In addition, the second LSU includes a second local memory store unit for storing the second local memory, a second local memory load unit for loading the second local memory, and the second neural core. A second neural core store unit that performs external storage and a second neural core load unit that externally loads the second neural core.

또한, 상기 L2 싱크 타겟에 따른 동기화 신호를 전송하는 것은, 상기 제1 뉴럴 코어 스토어 유닛이 상기 L2 싱크 타겟에 따른 동기화 신호를 상기 제2 뉴럴 코어 로드 유닛으로 전송하는 것을 포함할 수 있다.Transmitting the synchronization signal according to the L2 sync target may include the first neural core store unit transmitting the synchronization signal according to the L2 sync target to the second neural core load unit.

또한, 상기 제2 뉴럴 코어가 데이터를 수신하는 것은, 상기 제2 뉴럴 코어 로드 유닛이 상기 로컬 인터커넥션을 통해서 상기 제1 로컬 메모리로 상기 데이터를 요청하고, 상기 제2 뉴럴 코어 로드 유닛이 상기 로컬 인터커넥션을 통해서 상기 제1 로컬 메모리에서 상기 데이터를 수신하는 것을 포함할 수 있다.In addition, when the second neural core receives data, the second neural core load unit requests the data from the first local memory through the local interconnection, and the second neural core load unit receives the data from the local interconnection. and receiving the data from the first local memory through an interconnection.

상기 다른 과제를 해결하기 위한 본 발명의 몇몇 실시예에 따른 뉴럴 프로세싱 장치의 동기화 방법은 제1 및 제2 뉴럴 코어와, 상기 제1 및 제2 뉴럴 코어를 연결하는 로컬 인터커넥션과, 상기 제1 및 제2 뉴럴 코어의 L2 동기화에 사용되는 L2 싱크 패스를 포함하는 뉴럴 프로세싱 장치로서, 상기 제1 뉴럴 코어는, 연산 작업을 수행하는 제1 프로세싱 유닛과, 상기 제1 프로세싱 유닛에 입출력되는 데이터를 일시적으로 저장하는 제1 로컬 메모리와, 상기 제1 로컬 메모리 및 상기 제1 프로세싱 유닛의 L1 동기화에 사용되는 제1 L1 싱크 패스를 포함하고, 상기 제2 뉴럴 코어는, 연산 작업을 수행하는 제2 프로세싱 유닛과, 상기 제2 프로세싱 유닛에 입출력되는 데이터를 일시적으로 저장하는 제2 로컬 메모리와, 상기 제2 로컬 메모리 및 상기 제2 프로세싱 유닛의 L1 동기화에 사용되는 제2 L1 싱크 패스를 포함하는 뉴럴 프로세싱 장치의 동기화 방법에 있어서, 상기 제1 로컬 메모리에 데이터를 저장하고, 상기 제1 뉴럴 코어 내부에서, 상기 제1 L1 싱크 패스를 통해서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하고, 상기 제1 뉴럴 코어가 상기 제2 L2 싱크 패스를 통해서, 상기 L2 싱크 타겟에 따른 동기화 신호를 상기 제2 뉴럴 코어로 전송하고, 상기 제2 뉴럴 코어가 상기 로컬 인터커넥션을 통해서 데이터를 수신하는 것을 더 포함한다.A synchronization method of a neural processing apparatus according to some embodiments of the present invention for solving the above other problems includes first and second neural cores, a local interconnection connecting the first and second neural cores, and the first and second neural cores. and an L2 sync pass used for L2 synchronization of a second neural core, wherein the first neural core includes a first processing unit that performs a calculation task and data input/output to the first processing unit. A first local memory for temporarily storing and a first L1 sync pass used for L1 synchronization of the first local memory and the first processing unit, wherein the second neural core includes a second neural core that performs calculation tasks. A neural circuit comprising a processing unit, a second local memory temporarily storing data input/output to the second processing unit, and a second L1 sync pass used for L1 synchronization of the second local memory and the second processing unit. A synchronization method of a processing device, storing data in the first local memory, transmitting a synchronization signal according to the L1 sync target through the first L1 sync pass in the first neural core, and The neural core may transmit a synchronization signal according to the L2 sync target to the second neural core through the second L2 sync pass, and the second neural core may receive data through the local interconnection. .

또한, 상기 제1 뉴럴 코어는 상기 제1 로컬 메모리와 상기 제1 로컬 인터커넥션 사이에서 데이터를 이동시키는 제1 LSU를 더 포함하고, 상기 제1 LSU는, 상기 제1 로컬 메모리의 저장을 수행하는 제1 로컬 메모리 스토어 유닛과, 상기 제1 뉴럴 코어에서 외부로 저장을 수행하는 제1 뉴럴 코어 스토어 유닛을 포함하고, 상기 제1 뉴럴 코어 내부에서, 상기 제1 L1 싱크 패스를 통해서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하는 것은, 상기 제1 로컬 메모리 스토어 유닛이 상기 L1 싱크 타겟에 따른 동기화 신호를 상기 제1 뉴럴 코어 스토어 유닛으로 전송하는 것을 포함할 수 있다.The first neural core may further include a first LSU for moving data between the first local memory and the first local interconnection, wherein the first LSU performs storage of the first local memory. A first local memory store unit, and a first neural core store unit that performs storage externally from the first neural core, wherein the L1 sync target is included in the first neural core through the first L1 sync pass. Transmitting the synchronization signal according to may include transmitting, by the first local memory store unit, a synchronization signal according to the L1 sync target to the first neural core store unit.

또한, 상기 제2 뉴럴 코어는 상기 제2 로컬 메모리와 상기 제2 로컬 인터커넥션 사이에서 데이터를 이동시키는 제2 LSU를 더 포함하고, 상기 제2 LSU는, 상기 제2 뉴럴 코어에서 외부에서의 로드를 수행하는 제2 뉴럴 코어 로드 유닛을 포함하고, 상기 L2 싱크 타겟에 따른 동기화 신호를 전송하는 것은, 상기 제1 뉴럴 코어 스토어 유닛이 상기 L2 싱크 타겟에 따른 동기화 신호를 상기 제2 뉴럴 코어 로드 유닛으로 전송하는 것을 포함할 수 있다.In addition, the second neural core further includes a second LSU for moving data between the second local memory and the second local interconnection, and the second LSU includes an external load in the second neural core. and transmitting the synchronization signal according to the L2 sync target means that the first neural core store unit transmits the synchronization signal according to the L2 sync target to the second neural core load unit. It may include sending to

또한, 상기 뉴럴 프로세싱 장치는, 상기 제1 및 제2 뉴럴 코어와, 상기 로컬 인터커넥션과, 상기 L2 싱크 패스를 포함하는 제1 뉴럴 프로세서와, 상기 제1 뉴럴 프로세서와 다른 제2 뉴럴 프로세서와, 상기 제1 및 제2 뉴럴 프로세서 사이에서 데이터를 전송하는 글로벌 인터커넥션과, 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 세마포어 메모리를 포함하고, 상기 글로벌 인터커넥션은 상기 제1 및 제2 뉴럴 프로세서 사이에서 데이터, 제어 신호 및 L3 싱크 타겟에 따른 동기화 신호가 각각 전송되는 데이터 채널, 컨트롤 채널 및 L3 싱크 채널을 포함하고, 상기 제1 뉴럴 프로세서가 상기 L3 싱크 타겟을 생성하고, 상기 제2 세마포어 메모리에 상기 L3 싱크 타겟을 저장하고, 상기 제2 뉴럴 프로세서가 상기 L3 싱크 타겟에 따른 동기화 신호를 통해 동기화를 수행하는 것을 포함할 수 있다.The neural processing apparatus may further include: a first neural processor including the first and second neural cores, the local interconnection, and the L2 sync path; a second neural processor different from the first neural processor; a global interconnection for transmitting data between the first and second neural processors, and first and second semaphore memories respectively corresponding to the first and second neural processors, wherein the global interconnection comprises the first and second semaphore memories; and a data channel, a control channel, and an L3 sync channel through which data, a control signal, and a synchronization signal according to an L3 sync target are respectively transmitted between a second neural processor, wherein the first neural processor generates the L3 sync target; The L3 sync target may be stored in the second semaphore memory, and the second neural processor may perform synchronization through a synchronization signal according to the L3 sync target.

본 발명의 뉴럴 프로세싱 장치 및 그의 동기화 방법은, 중앙화된 제어 프로세서 대신 각각의 프로세서, 코어 및 메모리 소자들이 서로 동기화 요청을 전달하여 동기화를 수행하므로 제어 프로세서로 전달되는 동기화 요청에 따른 레이턴시를 최소화할 수 있다.The neural processing apparatus and synchronization method thereof of the present invention can minimize latency according to the synchronization request transmitted to the control processor because each processor, core, and memory elements transmit synchronization requests to each other to perform synchronization instead of a centralized control processor. there is.

또한, 제어 프로세서에 의해서 수행되던 스케쥴링 작업도 수행할 필요가 없어져 뉴럴 프로세싱 장치의 스케쥴링 오버헤드가 크게 감소할 수 있다.In addition, since there is no need to perform scheduling work performed by the control processor, scheduling overhead of the neural processing apparatus can be greatly reduced.

상술한 내용과 더불어 본 발명의 구체적인 효과는 이하 발명을 실시하기 위한 구체적인 사항을 설명하면서 함께 기술한다.In addition to the above description, specific effects of the present invention will be described together while explaining specific details for carrying out the present invention.

도 1은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템을 설명하기 위한 블록도이다.1 is a block diagram illustrating a neural processing system according to some embodiments of the present invention.

도 2는 도 1의 뉴럴 프로세싱 장치를 세부적으로 설명하기 위한 블록도이다.FIG. 2 is a block diagram for explaining the neural processing apparatus of FIG. 1 in detail.

도 3은 도 2의 뉴럴 코어 SoC를 세부적으로 설명하기 위한 블록도이다.FIG. 3 is a block diagram illustrating the neural core SoC of FIG. 2 in detail.

도 4는 도 3의 글로벌 인터커넥션을 세부적으로 설명하기 위한 구조도이다.FIG. 4 is a structural diagram for explaining the global interconnection of FIG. 3 in detail.

도 5는 도 3의 뉴럴 프로세서를 세부적으로 설명하기 위한 블록도이다.FIG. 5 is a block diagram for explaining the neural processor of FIG. 3 in detail.

도 6은 도 5의 뉴럴 코어를 세부적으로 설명하기 위한 블록도이다.FIG. 6 is a block diagram for explaining the neural core of FIG. 5 in detail.

도 7은 도 6의 LSU를 세부적으로 설명하기 위한 블록도이다.FIG. 7 is a block diagram for explaining the LSU of FIG. 6 in detail.

도 8은 도 6의 프로세싱 유닛을 세부적으로 설명하기 위한 블록도이다.FIG. 8 is a block diagram for explaining the processing unit of FIG. 6 in detail.

도 9는 도 6의 로컬 메모리를 세부적으로 설명하기 위한 블록도이다.FIG. 9 is a block diagram for explaining the local memory of FIG. 6 in detail.

도 10은 도 9의 로컬 메모리 뱅크를 세부적으로 설명하기 위한 블록도이다.FIG. 10 is a block diagram for explaining the local memory bank of FIG. 9 in detail.

도 11은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성을 설명하기 위한 블록도이다.11 is a block diagram illustrating memory reconfiguration of a neural processing system according to some embodiments of the present invention.

도 12는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성의 예시를 나타낸 블록도이다.12 is a block diagram illustrating an example of memory reorganization of a neural processing system in accordance with some embodiments of the present invention.

도 13은 도 11의 A부분을 확대한 블록도이다.FIG. 13 is an enlarged block diagram of part A of FIG. 11 .

도 14는 도 13의 제1 뱅크를 세부적으로 설명하기 위한 도면이다.FIG. 14 is a diagram for explaining the first bank of FIG. 13 in detail.

도 15는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 가상 아이디 할당을 설명하기 위한 개념도이다.15 is a conceptual diagram for explaining virtual ID assignment of a neural processing apparatus according to some embodiments of the present invention.

도 16은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 가상 아이디 할당 및 VPID 테이블을 설명하기 위한 도면이다.16 is a diagram for explaining a virtual ID allocation and a VPID table of a neural processing apparatus according to some embodiments of the present invention.

도 17은 싱크 타겟과 VPID 테이블을 통한 피지컬 아이디의 식별 과정을 설명하기 위한 도면이다.17 is a diagram for explaining a process of identifying a physical ID through a sync target and a VPID table.

도 18은 딥러닝 작업의 순서를 설명하기 위한 유향 비순환 그래프이다.18 is a directed acyclic graph for explaining the sequence of deep learning tasks.

도 19는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L3 동기화를 위한 싱크 타겟에 따른 동기화 신호 송신 동작을 설명하기 위한 개념도이다.19 is a conceptual diagram illustrating a synchronization signal transmission operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.

도 20은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L3 동기화를 위한 싱크 타겟에 따른 동기화 신호 수신 동작을 설명하기 위한 개념도이다.20 is a conceptual diagram for explaining a synchronization signal reception operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.

도 21은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L1 및 L2 동기화를 설명하기 위한 블록도이다.21 is a block diagram for explaining L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention.

도 22는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L1 및 L2 동기화를 설명하기 위한 래더 다이어그램이다.22 is a ladder diagram for explaining L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention.

도 23은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 명령어 집합 구조를 설명하기 위한 도면이다.23 is a diagram for explaining an instruction set structure of a neural processing apparatus according to some embodiments of the present invention.

도 24는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조를 설명하기 위한 블록도이다.24 is a block diagram for explaining a software layer structure of a neural processing apparatus according to some embodiments of the present invention.

도 25는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치가 수행하는 딥 러닝 연산을 설명하기 위한 개념도이다.25 is a conceptual diagram for explaining a deep learning operation performed by a neural processing apparatus according to some embodiments of the present invention.

도 26은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 뉴럴 네트워크의 학습 및 추론 동작을 설명하기 위한 개념도이다.26 is a conceptual diagram for explaining learning and reasoning operations of a neural network of a neural processing apparatus according to some embodiments of the present invention.

도 27은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 동기화 방법을 설명하기 위한 순서도이다.27 is a flowchart illustrating a synchronization method of a neural processing apparatus according to some embodiments of the present invention.

도 28은 도 27의 L3 싱크 타겟 저장 단계 및 FIFO 방식으로 제공 단계를 세부적으로 설명하기 위한 순서도이다.FIG. 28 is a flowchart for explaining in detail the step of storing the L3 sync target of FIG. 27 and the step of providing it in a FIFO method.

도 29는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L1 및 L2 레벨의 동기화 방법을 설명하기 위한 순서도이다.29 is a flowchart illustrating a method for synchronizing L1 and L2 levels of a neural processing apparatus according to some embodiments of the present invention.

도 30은 도 29의 데이터 요청 단계를 세부적으로 설명하기 위한 순서도이다.30 is a flowchart for explaining the data request step of FIG. 29 in detail.

본 명세서 및 특허청구범위에서 사용된 용어나 단어는 일반적이거나 사전적인 의미로 한정하여 해석되어서는 아니된다. 발명자가 그 자신의 발명을 최선의 방법으로 설명하기 위해 용어나 단어의 개념을 정의할 수 있다는 원칙에 따라, 본 발명의 기술적 사상과 부합하는 의미와 개념으로 해석되어야 한다. 또한, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명이 실현되는 하나의 실시예에 불과하고, 본 발명의 기술적 사상을 전부 대변하는 것이 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형 및 응용 가능한 예들이 있을 수 있음을 이해하여야 한다.Terms or words used in this specification and claims should not be construed as being limited to a general or dictionary meaning. According to the principle that an inventor may define a term or a concept of a word in order to best describe his/her invention, it should be interpreted as meaning and concept consistent with the technical spirit of the present invention. In addition, the embodiments described in this specification and the configurations shown in the drawings are only one embodiment in which the present invention is realized, and do not represent all of the technical spirit of the present invention, so they can be replaced at the time of the present application. It should be understood that there may be many equivalents and variations and applicable examples.

본 명세서 및 특허청구범위에서 사용된 제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. '및/또는' 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B used in this specification and claims may be used to describe various components, but the components should not be limited by the terms. These terms are only used for the purpose of distinguishing one component from another. For example, a first element may be termed a second element, and similarly, a second element may be termed a first element, without departing from the scope of the present invention. The term 'and/or' includes a combination of a plurality of related recited items or any one of a plurality of related recited items.

본 명세서 및 특허청구범위에서 사용된 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서 "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Terms used in this specification and claims are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. It should be understood that terms such as "include" or "having" in this application do not exclude in advance the possibility of existence or addition of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification. .

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해서 일반적으로 이해되는 것과 동일한 의미를 가지고 있다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.

일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and unless explicitly defined in this application, it should not be interpreted in an ideal or excessively formal meaning. don't

또한, 본 발명의 각 실시예에 포함된 각 구성, 과정, 공정 또는 방법 등은 기술적으로 상호 간 모순되지 않는 범위 내에서 공유될 수 있다. In addition, each configuration, process, process or method included in each embodiment of the present invention may be shared within a range that does not contradict each other technically.

이하, 도 1 내지 도 26을 참조하여, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치를 설명한다.Hereinafter, a neural processing apparatus according to some embodiments of the present invention will be described with reference to FIGS. 1 to 26 .

도 1은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템을 설명하기 위한 블록도이다.1 is a block diagram illustrating 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 neural processing device 1, a second neural processing device 2, and an external interface 3. .

제1 뉴럴 프로세싱 장치(1)는 인공 신경망을 이용하여 연산을 수행하는 장치일 수 있다. 제1 뉴럴 프로세싱 장치(1)는 예를 들어, 딥 러닝(deep learning) 연산 작업을 수행하는 것에 특화된 장치일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The first neural processing device 1 may be a device that performs calculations using an artificial neural network. The first neural processing device 1 may be, for example, a device specialized for performing a deep learning calculation task. However, this embodiment is not limited thereto.

제2 뉴럴 프로세싱 장치(2)는 제1 뉴럴 프로세싱 장치(1)와 동일 내지 유사한 구성을 가지는 장치일 수 있다. 제1 뉴럴 프로세싱 장치(1) 및 제2 뉴럴 프로세싱 장치(2)는 서로 외부 인터페이스(3)를 통해서 연결되어 데이터 및 제어 신호를 공유할 수 있다.The second neural processing device 2 may have a configuration identical to or similar to that of the first neural processing device 1 . The first neural processing device 1 and the second neural processing device 2 may be connected to each other through an external interface 3 to share data and control signals.

도 1에서는 2개의 뉴럴 프로세싱 장치를 도시하였지만, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)이 이에 제한되는 것은 아니다. 즉, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 3개 이상의 뉴럴 프로세싱 장치가 외부 인터페이스(3)를 통해서 서로 연결될 수도 있다. 또한, 반대로, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템(NPS)은 하나의 뉴럴 프로세싱 장치만을 포함할 수도 있다.Although FIG. 1 shows two neural processing devices, a 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 external interface 3. Also, conversely, a neural processing system (NPS) according to some embodiments of the present invention may include only one neural processing device.

도 2는 도 1의 뉴럴 프로세싱 장치를 세부적으로 설명하기 위한 블록도이다.FIG. 2 is a block diagram for explaining the neural processing apparatus 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 neural processing device 1 includes a neural core SoC 10, a CPU 20, an off-chip memory 30, a first non-volatile memory interface 40, and a first volatile memory interface ( 50), a second non-volatile memory interface 60 and a second volatile memory interface 70.

뉴럴 코어 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 neural core SoC 10 may be a system on chip device. The neural core SoC 10 is an artificial intelligence computing device and may be an accelerator. The neural core SoC 10 may be, for example, any one of a graphics processing unit (GPU), a field programmable gate array (FPGA), and an application-specific integrated circuit (ASIC). However, this embodiment is not limited thereto.

뉴럴 코어 SoC(10)는 외부 인터페이스(3)를 통해서 다른 외부의 연산 장치들과 데이터를 교환할 수 있다. 또한, 뉴럴 코어 SoC(10)는 제1 비휘발성 메모리 인터페이스(40) 및 제1 휘발성 메모리 인터페이스(50)를 통해서 각각 비휘발성 메모리(31) 및 휘발성 메모리(32)와 연결될 수 있다.The neural core SoC 10 may exchange data with other external computing devices through the external interface 3 . In addition, the neural core SoC 10 may be connected to the non-volatile memory 31 and the volatile memory 32 through the first non-volatile memory interface 40 and the first volatile memory interface 50 , respectively.

CPU(20)는 제1 뉴럴 프로세싱 장치(1)의 시스템을 통제하고 프로그램의 연산을 실행하는 제어장치일 수 있다. CPU(20)는 범용 연산 장치로서 딥러닝에 많이 사용되는 병렬 단순 연산을 수행하기에는 효율이 낮을 수 있다. 따라서, 뉴럴 코어 SoC(10)가 딥러닝 추론 및 학습 작업에 연산을 수행하여 높은 효율을 가질 수 있다.The CPU 20 may be a controller that controls the system of the first neural processing device 1 and executes program operations. The CPU 20 is a general purpose arithmetic unit and may have low efficiency to perform parallel simple arithmetic operations frequently used in deep learning. Accordingly, the neural core SoC 10 may perform calculations for deep learning reasoning and learning tasks, thereby achieving high efficiency.

CPU(20)는 외부 인터페이스(3)를 통해서 다른 외부의 연산 장치들과 데이터를 교환할 수 있다. 또한, CPU(20)는 제2 비휘발성 메모리 인터페이스(60) 및 제2 휘발성 메모리 인터페이스(70)를 통해서 각각 비휘발성 메모리(31) 및 휘발성 메모리(32)와 연결될 수 있다.The CPU 20 may exchange data with other external computing devices through the external interface 3 . In addition, the CPU 20 may be connected to the non-volatile memory 31 and the volatile memory 32 through the second non-volatile memory interface 60 and the second volatile memory interface 70, respectively.

오프 칩 메모리(30)는 뉴럴 코어 SoC(10)의 칩 외부에 배치된 메모리일 수 있다. 오프 칩 메모리(30)는 비휘발성 메모리(31) 및 휘발성 메모리(32)를 포함할 수 있다.The off-chip memory 30 may be a memory disposed outside a chip of the neural core SoC 10 . The off-chip memory 30 may include a non-volatile memory 31 and a volatile memory 32 .

비휘발성 메모리(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 non-volatile memory 31 may be a memory that continuously retains stored information even when power is not supplied. The non-volatile memory 31 includes, for example, a read-only memory (ROM), a programmable read-only memory (PROM), an erasable alterable ROM (EAROM), an erasable programmable read-only memory (EPROM), and an electrically erasable programmable memory (EEPROM). Read-Only Memory) (e.g., NAND Flash memory, NOR Flash memory), Ultra-Violet Erasable Programmable Read-Only Memory (UVEPROM), Ferroelectric Random Access Memory (FeRAM), 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), magnetic computer memory It may include at least one of a device (eg, hard disk, diskette drive, magnetic tape), an optical disk drive, and a 3D XPoint memory. However, this embodiment is not limited thereto.

휘발성 메모리(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 non-volatile memory 31, the volatile memory 32 may be a memory that continuously requires power to maintain stored information. The volatile memory 32 may include, for example, at least one of Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Synchronous Dynamic Random Access Memory (SDRAM), and Double Data Rate SDRAM (DDR SDRAM). there is. However, this embodiment is not limited thereto.

제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 non-volatile memory interface 40 and the second non-volatile memory interface 60 may be, for example, PATA (Parallel Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), SATA ( Serial Advanced Technology Attachment) and PCI Express (PCIe). However, this embodiment is not limited thereto.

제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 volatile memory interface 50 and the second volatile memory interface 70 are respectively, for example, SDR (Single Data Rate), DDR (Double Data Rate), QDR (Quad Data Rate), and XDR (eXtreme Data Rate) , Octal Data Rate). However, this embodiment is not limited thereto.

도 3은 도 2의 뉴럴 코어 SoC를 세부적으로 설명하기 위한 블록도이다.FIG. 3 is a block diagram illustrating the neural core SoC of FIG. 2 in detail.

도 2 및 도 3을 참조하면, 뉴럴 코어 SoC(10)는 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(Direct Memory Access)(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000) 및 글로벌 인터커넥션(6000)을 포함할 수 있다.2 and 3, the neural core SoC 10 includes at least one neural processor 1000, a shared memory 2000, a direct memory access (DMA) 3000, a non-volatile memory controller 4000, a volatile A memory controller 5000 and a global interconnection 6000 may be included.

뉴럴 프로세서(1000)는 연산 작업을 직접 수행하는 연산 장치일 수 있다. 뉴럴 프로세서(1000)가 복수인 경우 연산 작업은 각각의 뉴럴 프로세서(1000)로 할당될 수 있다. 각각의 뉴럴 프로세서(1000)는 글로벌 인터커넥션(6000)을 통해서 서로 연결될 수 있다.The neural processor 1000 may be an arithmetic device that directly performs an arithmetic task. When there are a plurality of neural processors 1000 , calculation tasks may be allocated to each of the neural processors 1000 . Each of the neural processors 1000 may be connected to each other through the global interconnection 6000 .

공유 메모리(2000)는 여러 뉴럴 프로세서(1000)에 의해서 공유되는 메모리일 수 있다. 공유 메모리(2000)는 각각의 뉴럴 프로세서(1000)의 데이터를 저장할 수 있다. 또한, 공유 메모리(2000)는 오프 칩 메모리(30)로부터 데이터를 수신하여 일시적으로 저장하고 각각의 뉴럴 프로세서(1000)로 전달할 수 있다. 반대로, 공유 메모리(2000)는 뉴럴 프로세서(1000)로부터 데이터를 수신하여 일시적으로 저장하고 도 2의 오프 칩 메모리(30)로 전달할 수도 있다. The shared memory 2000 may be a memory shared by several neural processors 1000 . The shared memory 2000 may store data of each neural processor 1000 . In addition, the shared memory 2000 may receive data from the off-chip memory 30, temporarily store the data, and transfer the data to each neural processor 1000. Conversely, the shared memory 2000 may receive data from the neural processor 1000, temporarily store the data, and transfer the data to the off-chip memory 30 of FIG. 2 .

공유 메모리(2000)는 상대적으로 속도가 빠른 메모리가 필요할 수 있다. 이에 따라서, 공유 메모리(2000)는 예를 들어, SRAM을 포함할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 즉, 공유 메모리(2000)는 DRAM을 포함할 수도 있다.The shared memory 2000 may require a relatively fast memory. Accordingly, the shared memory 2000 may include SRAM, for example. However, this embodiment is not limited thereto. That is, the shared memory 2000 may include DRAM.

공유 메모리(2000)는 SoC 레벨 즉, L3(level 3)에 해당하는 메모리일 수 있다. 따라서, 공유 메모리(2000)는 L3 공유 메모리라 정의할 수도 있다.The shared memory 2000 may be a memory corresponding to an SoC level, that is, level 3 (L3). Accordingly, the shared memory 2000 may be defined as an L3 shared memory.

DMA(3000)는 뉴럴 프로세서(1000)가 데이터의 입출력을 제어할 필요없이 직접 데이터의 이동을 제어할 수 있다. 이에 따라서, DMA(3000)가 메모리 사이의 데이터 이동을 제어하여 뉴럴 프로세서(1000)의 인터럽트의 횟수를 최소화시킬 수 있다.The DMA 3000 can directly control the movement of data without the need for the neural processor 1000 to control input/output of data. Accordingly, the number of interrupts of the neural processor 1000 can be minimized by the DMA 3000 controlling data movement between memories.

DMA(3000)는 공유 메모리(2000)와 오프 칩 메모리(30) 사이의 데이터 이동을 제어할 수 있다. DMA(3000)의 권한을 통해서 비휘발성 메모리 컨트롤러(4000) 및 휘발성 메모리 컨트롤러(5000)가 데이터를 이동을 수행할 수 있다.The DMA 3000 may control movement of data between the shared memory 2000 and the off-chip memory 30 . The non-volatile memory controller 4000 and the volatile memory controller 5000 may transfer data through the authority of the DMA 3000 .

비휘발성 메모리 컨트롤러(4000)는 비휘발성 메모리(31)에 리드(read) 또는 라이트(Write) 작업을 제어할 수 있다. 비휘발성 메모리 컨트롤러(4000)는 제1 비휘발성 메모리 인터페이스(40)를 통해서 비휘발성 메모리(31)를 제어할 수 있다.The nonvolatile memory controller 4000 may control a read or write operation of the nonvolatile memory 31 . The nonvolatile memory controller 4000 may control the nonvolatile memory 31 through the first nonvolatile memory interface 40 .

휘발성 메모리 컨트롤러(5000)는 휘발성 메모리(32)에 리드 또는 라이트 작업을 제어할 수 있다. 또한, 휘발성 메모리 컨트롤러(5000)는 휘발성 메모리(32)의 리프레쉬 작업을 수행할 수 있다. 휘발성 메모리 컨트롤러(5000)는 제1 휘발성 메모리 인터페이스(50)를 통해서 비휘발성 메모리(31)를 제어할 수 있다.The volatile memory controller 5000 may control a read or write operation of the volatile memory 32 . Also, the volatile memory controller 5000 may perform a refresh operation of the volatile memory 32 . The volatile memory controller 5000 may control the non-volatile memory 31 through the first volatile memory interface 50 .

글로벌 인터커넥션(6000)은 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000) 및 휘발성 메모리 컨트롤러(5000)를 서로 연결할 수 있다. 또한, 외부 인터페이스(3)도 글로벌 인터커넥션(6000)에 연결될 수 있다. 글로벌 인터커넥션(6000)은 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000) 및 외부 인터페이스(3) 사이의 데이터가 이동하는 경로일 수 있다.The global interconnection 6000 may connect at least one of the neural processor 1000 , the shared memory 2000 , the DMA 3000 , the nonvolatile memory controller 4000 and the volatile memory controller 5000 to each other. In addition, the external interface 3 may also be connected to the global interconnection 6000 . The global interconnection 6000 is data communication between at least one neural processor 1000, a shared memory 2000, a DMA 3000, a non-volatile memory controller 4000, a volatile memory controller 5000, and an external interface 3. may be a moving path.

글로벌 인터커넥션(6000)은 데이터뿐만 아니라 제어 신호의 전송 및 동기화를 위한 신호를 전송할 수 있다. 즉, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 별도의 제어 프로세서가 동기화의 신호를 관리하는 것이 아니라 각각의 뉴럴 프로세서(1000)가 직접 동기화 신호를 전송하고 수신할 수 있다. 이에 따라서, 제어 프로세서에 의해서 발생하는 동기화 신호의 레이턴시를 차단할 수 있다.The global interconnection 6000 may transmit data as well as control signals and signals for synchronization. That is, in the neural processing apparatus according to some embodiments of the present invention, each neural processor 1000 may directly transmit and receive a synchronization signal, rather than a separate control processor managing synchronization signals. Accordingly, it is possible to block the latency of the synchronization signal generated by the control processor.

즉, 뉴럴 프로세서(1000)가 복수일 때, 어느 뉴럴 프로세서(1000)의 작업이 종료되어야 다음 뉴럴 프로세서(1000)가 새로운 작업을 시작할 수 있는 개별 작업의 디펜던시가 존재할 수 있다. 이러한 개별 작업의 종료와 시작은 동기화 신호를 통해서 확인할 수 있는데, 기존의 기술은 이러한 동기화 신호의 수신과 새로운 작업의 시작 지시를 제어 프로세서가 수행하였다.That is, when there are a plurality of neural processors 1000, there may be dependencies of individual tasks in which the task of one neural processor 1000 must be completed before the next neural processor 1000 can start a new task. The end and start of these individual tasks can be confirmed through a synchronization signal, and in the conventional technology, the control processor performs the reception of the synchronization signal and the instruction to start a new task.

그러나, 뉴럴 프로세서(1000)의 숫자가 늘어나고, 작업의 디펜던시가 복잡하게 설계되면 될수록 이러한 동기화 작업은 요청 및 지시의 수는 기하급수적으로 늘어나게 되었다. 따라서, 각각의 요청 및 지시에 따른 레이턴시가 작업의 효율을 크게 낮출 수 있다.However, as the number of neural processors 1000 increases and the dependencies of tasks are designed more complexly, the number of requests and instructions for synchronization tasks increases exponentially. Therefore, the latency according to each request and instruction can greatly reduce work efficiency.

따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 제어 프로세서 대신 각각의 뉴럴 프로세서(1000)가 직접 동기화 신호를 작업의 디펜던시에 따라 다른 뉴럴 프로세서(1000)로 전송할 수 있다. 이 경우 제어 프로세서에 의해서 관리되는 방식에 비해서 병렬적으로 여러 뉴럴 프로세서(1000)가 동기화 작업을 수행할 수 있어 동기화에 따른 레이턴시를 최소화할 수 있다. Accordingly, in the neural processing apparatus according to some embodiments of the present invention, each neural processor 1000 may directly transmit a synchronization signal to other neural processors 1000 according to task dependencies instead of a control processor. In this case, compared to the method managed by the control processor, several neural processors 1000 can perform synchronization tasks in parallel, so that latency due to synchronization can be minimized.

또한, 제어 프로세서가 작업 디펜던시에 따른 뉴럴 프로세서(1000)들의 작업 스케쥴링을 수행해야 하는데 이러한 스케쥴링의 오버헤드도 뉴럴 프로세서(1000)의 개수가 늘어나면 늘어날수록 크게 늘어날 수 있다. 따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 스케쥴링 작업도 개별 뉴럴 프로세서(1000)에 의해서 진행되어 그에 따른 스케쥴링 부담도 없어 장치의 성능이 향상될 수 있다.In addition, the control processor needs to perform task scheduling of the neural processors 1000 according to task dependencies, and the overhead of such scheduling can greatly increase as the number of the neural processors 1000 increases. Therefore, in the neural processing device according to some embodiments of the present invention, the scheduling task is also performed by the individual neural processor 1000, and thus the performance of the device can be improved without the scheduling burden.

도 4는 도 3의 글로벌 인터커넥션을 세부적으로 설명하기 위한 구조도이다.FIG. 4 is a structural diagram for explaining the global interconnection of FIG. 3 in detail.

도 4를 참조하면, 글로벌 인터커넥션(6000)은 데이터 채널(6100), 컨트롤 채널(6200) 및 L3 싱크 채널(6300)을 포함할 수 있다.Referring to FIG. 4 , a global interconnection 6000 may include a data channel 6100 , a control channel 6200 and an L3 sync channel 6300 .

데이터 채널(6100)은 데이터를 전송하는 전용 채널일 수 있다. 데이터 채널(6100)을 통해서 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000) 및 외부 인터페이스(3)가 서로 데이터를 교환할 수 있다.The data channel 6100 may be a dedicated channel for transmitting data. At least one of the neural processor 1000, the shared memory 2000, the DMA 3000, the non-volatile memory controller 4000, the volatile memory controller 5000, and the external interface 3 communicate data to each other through the data channel 6100. can be exchanged.

컨트롤 채널(6200)은 제어 신호를 전송하는 전용 채널일 수 있다. 컨트롤 채널(6200)을 통해서 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000) 및 외부 인터페이스(3)가 서로 제어 신호를 교환할 수 있다.The control channel 6200 may be a dedicated channel for transmitting a control signal. At least one of the neural processor 1000, the shared memory 2000, the DMA 3000, the non-volatile memory controller 4000, the volatile memory controller 5000, and the external interface 3 control each other through the control channel 6200 signals can be exchanged.

L3 싱크 채널(6300)은 동기화 신호를 전송하는 전용 채널일 수 있다. L3 싱크 채널(6300)을 통해서 적어도 하나의 뉴럴 프로세서(1000), 공유 메모리(2000), DMA(3000), 비휘발성 메모리 컨트롤러(4000), 휘발성 메모리 컨트롤러(5000) 및 외부 인터페이스(3)가 서로 동기화 신호를 교환할 수 있다.The L3 sync channel 6300 may be a dedicated channel for transmitting a synchronization signal. At least one neural processor 1000, a shared memory 2000, a DMA 3000, a non-volatile memory controller 4000, a volatile memory controller 5000, and an external interface 3 communicate with each other through the L3 sync channel 6300. Synchronization signals can be exchanged.

L3 싱크 채널(6300)은 글로벌 인터커넥션(6000) 내부에 전용 채널로 설정되어 다른 채널과 겹치지 않고 동기화 신호를 빠르게 전송할 수 있다. 이에 따라서, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 새로운 와이어링 작업이 필요하지 않고 기존에 사용되는 글로벌 인터커넥션(6000)을 이용하여 동기화 작업을 원활하게 진행할 수 있다.The L3 sync channel 6300 is set as a dedicated channel within the global interconnection 6000 so that a synchronization signal can be quickly transmitted without overlapping with other channels. Accordingly, the neural processing apparatus according to some embodiments of the present invention does not require a new wiring work and can smoothly perform synchronization work using the existing global interconnection 6000 .

도 5는 도 3의 뉴럴 프로세서를 세부적으로 설명하기 위한 블록도이다.FIG. 5 is a block diagram for explaining the neural processor of FIG. 3 in detail.

도 3 내지 도 5를 참조하면, 뉴럴 프로세서(1000)는 적어도 하나의 뉴럴 코어(100), L2 공유 메모리(400), 로컬 인터커넥션(200) 및 L2 싱크 패스(300)를 포함할 수 있다.3 to 5 , the neural processor 1000 may include at least one neural core 100, an L2 shared memory 400, a local interconnection 200, and an L2 sync path 300.

적어도 하나의 뉴럴 코어(100)는 뉴럴 프로세서(1000)의 작업을 분담하여 수행할 수 있다. 뉴럴 코어(100)는 예를 들어, 8개일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 도 4 및 도 5에서는 여러 개의 뉴럴 코어(100)가 뉴럴 프로세서(1000)에 포함되는 것으로 도시하였지만, 본 실시예가 이에 제한되는 것은 아니다. 즉, 뉴럴 코어(100) 1개만으로 뉴럴 프로세서(1000)가 구성될 수 있다.At least one neural core 100 may divide and perform tasks of the neural processor 1000 . The number of neural cores 100 may be, for example, 8. However, this embodiment is not limited thereto. 4 and 5 show that several neural cores 100 are included in the neural processor 1000, but the present embodiment is not limited thereto. That is, the neural processor 1000 may be configured with only one neural core 100 .

L2 공유 메모리(400)는 뉴럴 프로세서(1000) 내에서 각각의 뉴럴 코어(100)들이 공유하는 메모리일 수 있다. L2 공유 메모리(400)는 각각의 뉴럴 코어(100)의 데이터를 저장할 수 있다. 또한, L2 공유 메모리(400)는 도 3의 공유 메모리(2000)로부터 데이터를 수신하여 일시적으로 저장하고 각각의 뉴럴 코어(100)로 전달할 수 있다. 반대로, L2 공유 메모리(400)는 뉴럴 코어(100)로부터 데이터를 수신하여 일시적으로 저장하고 도 3의 공유 메모리(2000)로 전달할 수도 있다. The L2 shared memory 400 may be a memory shared by each of the neural cores 100 in the neural processor 1000 . The L2 shared memory 400 may store data of each neural core 100 . In addition, the L2 shared memory 400 may receive data from the shared memory 2000 of FIG. 3 , temporarily store the data, and transfer the data to each neural core 100 . Conversely, the L2 shared memory 400 may receive data from the neural core 100, temporarily store the data, and transfer the data to the shared memory 2000 of FIG. 3 .

L2 공유 메모리(400)는 뉴럴 프로세서 레벨, 즉, L2(level 2)에 해당하는 메모리일 수 있다. L3 공유 메모리 즉, 공유 메모리(2000)는 뉴럴 프로세서(1000)에 의해서 공유되고, L2 공유 메모리(400)는 뉴럴 코어(100)에 의해서 공유될 수 있다.The L2 shared memory 400 may be memory corresponding to a neural processor level, that is, level 2 (L2). The L3 shared memory, that is, the shared memory 2000 may be shared by the neural processor 1000 and the L2 shared memory 400 may be shared by the neural core 100 .

로컬 인터커넥션(200)은 적어도 하나의 뉴럴 코어(100) 및 L2 공유 메모리(400)를 서로 연결할 수 있다. 로컬 인터커넥션(200)은 적어도 하나의 뉴럴 코어(100) 및 L2 공유 메모리(400) 사이의 데이터가 이동하는 경로일 수 있다. 로컬 인터커넥션(200)은 도 3의 글로벌 인터커넥션(6000)과 연결되어 데이터를 전송할 수 있다.The local interconnection 200 may connect at least one neural core 100 and the L2 shared memory 400 to each other. The local interconnection 200 may be a path through which data moves between at least one neural core 100 and the L2 shared memory 400 . The local interconnection 200 may be connected to the global interconnection 6000 of FIG. 3 to transmit data.

L2 싱크 패스(300)는 적어도 하나의 뉴럴 코어(100) 및 L2 공유 메모리(400)를 서로 연결할 수 있다. L2 싱크 패스(300)는 적어도 하나의 뉴럴 코어(100) 및 L2 공유 메모리(400)의 동기화 신호가 이동하는 경로일 수 있다. The L2 sync pass 300 may connect at least one neural core 100 and the L2 shared memory 400 to each other. The L2 sync path 300 may be a path along which synchronization signals of at least one neural core 100 and the L2 shared memory 400 move.

L2 싱크 패스(300)는 로컬 인터커넥션(200)과 물리적으로 별도로 형성될 수 있다. 로컬 인터커넥션(200)의 경우 글로벌 인터커넥션(6000)과 달리 내부에 충분한 채널이 형성되지 않을 수 있다. 이러한 경우에는 L2 싱크 패스(300)가 별도의 형성되어 동기화 신호의 전송을 빠르고 지체없이 수행할 수 있다. L2 싱크 패스(300)는 글로벌 인터커넥션(6000)의 L3 싱크 채널(6300)에 비해서 한단계 낮은 레벨에서 수행되는 동기화에 사용될 수 있다.The L2 sync path 300 may be formed physically separately from the local interconnection 200 . In the case of the local interconnection 200, unlike the global interconnection 6000, sufficient internal channels may not be formed. In this case, the L2 sync path 300 is formed separately so that synchronization signal transmission can be performed quickly and without delay. The L2 sync pass 300 may be used for synchronization performed at a level lower than that of the L3 sync channel 6300 of the global interconnection 6000.

도 6은 도 5의 뉴럴 코어를 세부적으로 설명하기 위한 블록도이다.FIG. 6 is a block diagram for explaining the neural core of FIG. 5 in detail.

도 6을 참조하면, 뉴럴 코어(100)는 LSU(Load/Store Unit)(110), 로컬 메모리(120), 웨이트 버퍼(130), 액티베이션 LSU(140), 액티베이션 버퍼(150) 및 프로세싱 유닛(160)을 포함할 수 있다.Referring to FIG. 6 , the neural core 100 includes a load/store unit (LSU) 110, a local memory 120, a weight buffer 130, an activation LSU 140, an activation buffer 150, and a processing unit ( 160) may be included.

LSU(110)는 로컬 인터커넥션(200) 및 L2 싱크 패스(300)를 통해서 외부에서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 수신할 수 있다. LSU(110)는 로컬 메모리(120)로 수신한 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 전송할 수 있다. 유사하게 LSU(110)는 로컬 인터커넥션(200) 및 L2 싱크 패스(300)를 통해서 데이터, 제어 신호 및 동기화 신호 중 적어도 하나를 외부로 전달 수 있다. The LSU 110 may receive at least one of data, a control signal, and a synchronization signal from the outside through the local interconnection 200 and the L2 sync path 300 . The LSU 110 may transmit at least one of received data, a control signal, and a synchronization signal to the local memory 120 . Similarly, the LSU 110 may transfer at least one of data, control signals, and synchronization signals to the outside through the local interconnection 200 and the L2 sync path 300 .

도 7은 도 6의 LSU를 세부적으로 설명하기 위한 블록도이다.FIG. 7 is a block diagram for explaining the LSU of FIG. 6 in detail.

도 7을 참조하면, LSU(110)는 로컬 메모리 로드 유닛(111a), 로컬 메모리 스토어 유닛(111b), 뉴럴 코어 로드 유닛(112a), 뉴럴 코어 스토어 유닛(112b), 로드 버퍼(LB), 스토어 버퍼(SB), 로드 엔진(113a), 스토어 엔진(113b) 및 변환 색인 버퍼(114)를 포함할 수 있다.Referring to FIG. 7 , the LSU 110 includes a local memory load unit 111a, a local memory store unit 111b, a neural core load unit 112a, a neural core store unit 112b, a load buffer LB, and a store. It may include a buffer SB, a load engine 113a, a store engine 113b and a conversion lookaside buffer 114.

로컬 메모리 로드 유닛(111a)은 로컬 메모리(120)에 대한 로드 인스트럭션을 페치(fetch)하고, 로드 인스트럭션을 이슈(issue)할 수 있다. 로컬 메모리 로드 유닛(111a)이 이슈된 로드 인스트럭션을 로드 버퍼(LB)에 제공하면 로드 버퍼(LB)가 입력된 순서에 따라서 순차적으로 로드 엔진(113a)으로 메모리 액세스 요청을 전송할 수 있다.The local memory load unit 111a may fetch a load instruction for the local memory 120 and issue the load instruction. When the local memory load unit 111a provides an issued load instruction to the load buffer LB, the load buffer LB may sequentially transmit memory access requests to the load engine 113a according to the input order.

또한, 로컬 메모리 스토어 유닛(111b)은 로컬 메모리(120)에 대한 스토어 인스트럭션을 페치하고, 스토어 인스트럭션을 이슈할 수 있다. 로컬 메모리 스토어 유닛(111b)이 이슈된 스토어 인스트럭션을 스토어 버퍼(SB)에 제공하면 스토어 버퍼(SB)가 입력된 순서에 따라서 순차적으로 스토어 엔진(113b)으로 메모리 액세스 요청을 전송할 수 있다.Also, the local memory store unit 111b may fetch a store instruction for the local memory 120 and issue the store instruction. When the local memory store unit 111b provides the store instruction at issue to the store buffer SB, the store buffer SB may sequentially transmit memory access requests to the store engine 113b according to the input order.

뉴럴 코어 로드 유닛(112a)은 뉴럴 코어(100)에 대한 로드 인스트럭션을 페치하고, 로드 인스트럭션을 이슈할 수 있다. 뉴럴 코어 로드 유닛(112a)이 이슈된 로드 인스트럭션을 로드 버퍼(LB)에 제공하면 로드 버퍼(LB)가 입력된 순서에 따라서 순차적으로 로드 엔진(113a)으로 메모리 액세스 요청을 전송할 수 있다.The neural core load unit 112a may fetch load instructions for the neural core 100 and issue load instructions. When the neural core load unit 112a provides the issued load instruction to the load buffer LB, the load buffer LB may sequentially transmit memory access requests to the load engine 113a according to the input order.

또한, 뉴럴 코어 스토어 유닛(112b)은 뉴럴 코어(100)에 대한 스토어 인스트럭션을 페치하고, 스토어 인스트럭션을 이슈할 수 있다. 뉴럴 코어 스토어 유닛(112b)이 이슈된 스토어 인스트럭션을 스토어 버퍼(SB)에 제공하면 스토어 버퍼(SB)가 입력된 순서에 따라서 순차적으로 스토어 엔진(113b)으로 메모리 액세스 요청을 전송할 수 있다.Also, the neural core store unit 112b may fetch a store instruction for the neural core 100 and issue the store instruction. When the neural core store unit 112b provides the stored instruction to the store buffer SB, the store buffer SB may sequentially transmit memory access requests to the store engine 113b according to the input order.

로드 엔진(113a)은 메모리 액세스 요청을 수신하여 로컬 인터커넥션(200)을 통해서 데이터를 불러올 수 있다. 이때, 로드 엔진(113a)은 변환 색인 버퍼(114)에서 최근에 사용된 가상 주소와 물리 주소의 변환 테이블을 이용하여 빠르게 데이터를 찾을 수 있다. 로드 엔진(113a)의 가상 주소가 변환 색인 버퍼(114)에 없는 경우에는 다른 메모리에서 주소 변환 정보를 찾을 수 있다.The load engine 113a may receive a memory access request and load data through the local interconnection 200 . At this time, the load engine 113a can quickly find data by using a translation table of recently used virtual addresses and physical addresses in the translation lookaside buffer 114 . When the virtual address of the load engine 113a does not exist in the translation lookaside buffer 114, address translation information may be found in another memory.

스토어 엔진(113b)은 메모리 액세스 요청을 수신하여 로컬 인터커넥션(200)를 통해서 데이터를 불러올 수 있다. 이때, 스토어 엔진(113b)은 변환 색인 버퍼(114)에서 최근에 사용된 가상 주소와 물리 주소의 변환 테이블을 이용하여 빠르게 데이터를 찾을 수 있다. 스토어 엔진(113b)의 가상 주소가 변환 색인 버퍼(114)에 없는 경우에는 다른 메모리에서 주소 변환 정보를 찾을 수 있다.The store engine 113b may receive a memory access request and load data through the local interconnection 200 . At this time, the store engine 113b can quickly find data by using a translation table of recently used virtual addresses and physical addresses in the translation lookaside buffer 114 . When the virtual address of the store engine 113b does not exist in the translation lookaside buffer 114, address translation information may be found in another memory.

로드 엔진(113a) 및 스토어 엔진(113b)은 L2 싱크 패스(300)로 동기화 신호를 보낼 수 있다. 이때, 동기화 신호는 작업이 종료되었다는 의미를 가질 수 있다.The load engine 113a and the store engine 113b may send synchronization signals to the L2 sync path 300 . At this time, the synchronization signal may have a meaning that the work is finished.

다시, 도 6을 참조하면, 로컬 메모리(120)는 뉴럴 코어(100) 내부에 위치한 메모리로서, 뉴럴 코어(100)가 작업에 필요한 모든 입력 데이터를 외부로부터 수신하여 임시로 저장할 수 있다. 또한, 로컬 메모리(120)는 뉴럴 코어(100)에 의해서 연산된 출력 데이터를 외부로 전송하기 위해서 일시적으로 저장할 수 있다. 로컬 메모리(120)는 뉴럴 코어(100)의 캐시 메모리 역할을 수행할 수 있다.Again, referring to FIG. 6 , the local memory 120 is a memory located inside the neural core 100 and can receive all input data necessary for the neural core 100 to work from the outside and temporarily store them. In addition, the local memory 120 may temporarily store output data calculated by the neural core 100 in order to transmit them to the outside. The local memory 120 may serve as a cache memory of the neural core 100 .

로컬 메모리(120)는 액티베이션 LSU(140)에 의해서 인풋 액티베이션(Act_In)을 액티베이션 버퍼(150)로 전송하고, 아웃풋 액티베이션(Act_Out)을 수신할 수 있다. 로컬 메모리(120)는 액티베이션 LSU(140) 외에도, 프로세싱 유닛(160)과 직접 데이터를 송수신할 수 있다. 즉, 로컬 메모리(120)는 PE 어레이(163) 및 벡터 유닛(164) 각각과 데이터를 주고받을 수 있다.The local memory 120 may transmit the input activation (Act_In) to the activation buffer 150 and receive the output activation (Act_Out) by the activation LSU 140 . In addition to the activation LSU 140 , the local memory 120 may directly transmit/receive data with the processing unit 160 . That is, the local memory 120 may exchange data with each of the PE array 163 and the vector unit 164 .

로컬 메모리(120)는 뉴럴 코어 레벨 즉, L1(level 1)에 해당하는 메모리일 수 있다. 따라서, 로컬 메모리(120)는 L1 메모리라 정의할 수도 있다. 단, L1 메모리는 L2 공유 메모리(400) 및 L3 공유 메모리, 즉 공유 메모리(2000)와는 달리 공유되지 않고 뉴럴 코어의 전용(private) 메모리일 수 있다.The local memory 120 may be a memory corresponding to a neural core level, that is, level 1 (L1). Accordingly, the local memory 120 may also be defined as an L1 memory. However, unlike the L2 shared memory 400 and the L3 shared memory, that is, the shared memory 2000, the L1 memory is not shared and may be a private memory of the neural core.

로컬 메모리(120)는 데이터 패스(Data Path)를 통해 액티베이션이나 웨이트 같은 데이터를 전송할 수 있다. 로컬 메모리(120)는 별도의 전용 패스인 L1 싱크 패스(L1 Sync Path)를 통해서 동기화 신호를 주고받을 수 있다. 로컬 메모리(120)는 예를 들어, LSU(110), 웨이트 버퍼(130), 액티베이션 LSU(140) 및 프로세싱 유닛(160)과 L1 싱크 패스(L1 Sync Path)를 통해서 동기화 신호를 주고받을 수 있다.The local memory 120 may transmit data such as activation or weight through a data path. The local memory 120 may transmit and receive synchronization signals through an L1 sync path, which is a separate dedicated path. The local memory 120 may exchange synchronization signals with, for example, the LSU 110, the weight buffer 130, the activation LSU 140, and the processing unit 160 through an L1 sync path. .

웨이트 버퍼(130)는 웨이트(Weight)를 로컬 메모리(120)로부터 수신할 수 있다. 웨이트 버퍼(130)는 웨이트(Weight)를 프로세싱 유닛(160)으로 전달할 수 있다. 웨이트 버퍼(130)는 웨이트(Weight)를 전달하기 전에 일시적으로 웨이트(Weight)를 저장할 수 있다. The weight buffer 130 may receive a weight from the local memory 120 . The weight buffer 130 may transfer the weight to the processing unit 160 . The weight buffer 130 may temporarily store weights before transferring them.

인풋 액티베이션(Act_In) 및 아웃풋 액티베이션(Act_Out)은 신경망 네트워크의 레이어의 입력값과 출력값을 의미할 수 있다. 이때, 신경망 네트워크의 레이어가 복수인 경우 이전 레이어의 출력값이 다음 레이어의 입력값이 되므로 이전 레이어의 아웃풋 액티베이션(Act_Out)이 다음 레이어의 인풋 액티베이션(Act_In)으로 활용될 수 있다.The input activation (Act_In) and the output activation (Act_Out) may refer to an input value and an output value of a layer of a neural network. In this case, when the neural network has a plurality of layers, the output activation value of the previous layer becomes the input value of the next layer, so the output activation (Act_Out) of the previous layer may be used as the input activation (Act_In) of the next layer.

웨이트(Weight)는 각 레이어에서 입력되는 입력 액티베이션(Act_In)과 곱해지는 파라미터를 의미할 수 있다. 웨이트(Weight)는 딥 러닝 학습 단계에서 조절되어 확정되고, 추론 단계에서는 고정된 값을 통해서 아웃풋 액티베이션(Act_Out)을 도출하기 위해서 사용될 수 있다.The weight may mean a parameter that is multiplied with the input activation (Act_In) input in each layer. The weight is adjusted and determined in the deep learning step, and may be used to derive the output activation (Act_Out) through a fixed value in the inference step.

액티베이션 LSU(140)는 로컬 메모리(120)로부터 인풋 액티베이션(Act_In)을 액티베이션 버퍼(150)로 전달하고, 액티베이션 버퍼(150)로부터 아웃풋 액티베이션(Act_Out)을 상기 온 칩 버퍼로 전달할 수 있다. 즉, 액티베이션 LSU(140)는 액티베이션의 로드 작업과 스토어 작업을 모두 수행할 수 있다.The activation LSU 140 may transfer an input activation (Act_In) from the local memory 120 to the activation buffer 150 and transfer an output activation (Act_Out) from the activation buffer 150 to the on-chip buffer. That is, the activation LSU 140 may perform both a load operation and a store operation of activation.

액티베이션 버퍼(150)는 프로세싱 유닛(160)으로 인풋 액티베이션(Act_In)을 제공하고, 프로세싱 유닛(160)으로부터 아웃풋 액티베이션(Act_Out)을 수신할 수 있다. 액티베이션 버퍼(150)는 인풋 액티베이션(Act_In)과 아웃풋 액티베이션(Act_Out)을 일시적으로 저장할 수 있다.The activation buffer 150 may provide an input activation (Act_In) to the processing unit 160 and receive an output activation (Act_Out) from the processing unit 160. The activation buffer 150 may temporarily store input activation (Act_In) and output activation (Act_Out).

액티베이션 버퍼(150)는 연산량이 많은 프로세싱 유닛(160), 특히, PE 어레이(163)에 빠르게 액티베이션을 제공하고, 빠르게 액티베이션을 수신하여 뉴럴 코어(100)의 연산 속도를 높일 수 있다.The activation buffer 150 can quickly provide activation to the processing unit 160 , particularly the PE array 163 , which requires a large amount of computation, and quickly receive the activation, thereby increasing the computational speed of the neural core 100 .

프로세싱 유닛(160)은 연산을 수행하는 모듈일 수 있다. 프로세싱 유닛(160)은 1차원 연산뿐만 아니라 2차원 매트릭스 연산 즉, 컨볼루션 연산을 수행할 수 있다. 프로세싱 유닛(160)은 인풋 액티베이션(Act_In)을 수신하여 웨이트(Weight)와 곱한 뒤 이를 더하여 아웃풋 액티베이션(Act_Out)을 생성할 수 있다.The processing unit 160 may be a module that performs calculations. The processing unit 160 may perform not only a 1-dimensional operation but also a 2-dimensional matrix operation, that is, a convolution operation. The processing unit 160 may generate an output activation (Act_Out) by receiving the input activation (Act_In), multiplying the received input activation (Act_In), and then adding the result.

도 8은 도 6의 프로세싱 유닛을 세부적으로 설명하기 위한 블록도이다.FIG. 8 is a block diagram for explaining the processing unit of FIG. 6 in detail.

도 6 및 도 8을 참조하면, 프로세싱 유닛(160)은 PE 어레이(163), 벡터 유닛(164), 컬럼 레지스터(161) 및 로우 레지스터(162)를 포함할 수 있다.Referring to FIGS. 6 and 8 , the processing unit 160 may include a PE array 163 , a vector unit 164 , a column register 161 and a row register 162 .

PE 어레이(163)는 인풋 액티베이션(Act_In) 및 웨이트(Weight)를 수신하여 곱셈을 수행할 수 있다. 이때, 인풋 액티베이션(Act_In)과 웨이트(Weight)는 각각 매트릭스 형태로 컨볼루션을 통해서 연산될 수 있다. 이를 통해서, PE 어레이(163)는 아웃풋 액티베이션(Act_Out)을 생성할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. PE 어레이(163)는 아웃풋 액티베이션(Act_Out)외의 다른 종류의 출력도 얼마든지 생성할 수 있다.The PE array 163 may perform multiplication by receiving the input activation (Act_In) and the weight (Weight). In this case, the input activation (Act_In) and the weight (Weight) may be calculated through convolution in the form of a matrix. Through this, the PE array 163 may generate an output activation (Act_Out). However, this embodiment is not limited thereto. The PE array 163 can also generate other types of outputs other than the output activation (Act_Out).

PE 어레이(163)는 적어도 하나의 프로세싱 엘리먼트(PE)를 포함할 수 있다. 프로세싱 엘리먼트(PE)는 서로 정렬되어 각각 하나의 인풋 액티베이션(Act_In)과 하나의 웨이트(Weight)에 대한 곱셈을 수행할 수 있다. The PE array 163 may include at least one processing element (PE). The processing elements PE may be aligned with each other to perform multiplication of one input activation (Act_In) and one weight (Weight).

PE 어레이(163)는 각각의 곱셈에 대한 값을 합한 부분합을 생성할 수 있다. 이러한 부분합은 아웃풋 액티베이션(Act_Out)으로 활용될 수 있다. PE 어레이(163)는 이차원 매트릭스 곱셈을 수행하므로 이차원 매트릭스 연산 유닛(2D matrix compute unit)으로 지칭될 수도 있다.The PE array 163 may produce a subtotal sum of values for each multiplication. This subtotal can be utilized as an output activation (Act_Out). Since the PE array 163 performs 2D matrix multiplication, it may also be referred to as a 2D matrix compute unit.

벡터 유닛(164)은 주로 1차원 연산을 수행할 수 있다. 벡터 유닛(164)은 PE 어레이(163)와 함께 딥러닝 연산을 수행할 수 있다. 이를 통해서 프로세싱 유닛(160)은 필요한 연산에 특화될 수 있다. 즉, 뉴럴 코어(100)는 대량의 2차원 매트릭스 곱셈과 1차원 연산을 수행하는 연산 모듈이 각각 있어 효율적으로 딥러닝 작업을 수행할 수 있다.The vector unit 164 may perform primarily one-dimensional operations. The vector unit 164 may perform deep learning operations together with the PE array 163 . Through this, the processing unit 160 may be specialized for necessary operations. That is, the neural core 100 can efficiently perform deep learning tasks because each of the calculation modules that performs a large amount of 2D matrix multiplication and 1D calculation is performed.

컬럼 레지스터(161)는 제1 입력(I1)을 수신할 수 있다. 컬럼 레지스터(161)는 제1 입력(I1)을 수신하고 이를 분할하여 프로세싱 엘리먼트(PE)의 각 열(column)에 제공할 수 있다.The column register 161 may receive the first input I1. The column register 161 may receive the first input I1, divide it, and provide it to each column of the processing element PE.

로우 레지스터(162)는 제2 입력(I2)을 수신할 수 있다. 로우 레지스터(162)는 제2 입력(I2)을 수신하고 이를 분할하여 프로세싱 엘리먼트(PE)의 각 행(row)에 제공할 수 있다.The low register 162 may receive the second input I2. The row register 162 may receive the second input I2, divide it, and provide it to each row of the processing element PE.

제1 입력(I1)은 인풋 액티베이션(Act_In) 또는 웨이트(Weight)일 수 있다. 제2 입력(I2)은 인풋 액티베이션(Act_In) 또는 웨이트(Weight) 중 제1 입력(I1)이 아닌 값일 수 있다. 또는, 제1 입력(I1) 및 제2 입력(I2)은 인풋 액티베이션(Act_In) 및 웨이트(Weight) 외의 값이 될 수도 있다.The first input (I1) may be an input activation (Act_In) or a weight (Weight). The second input I2 may be a value other than the first input I1 among input activation Act_In or weight. Alternatively, the first input I1 and the second input I2 may be values other than the input activation Act_In and the weight.

도 9는 도 6의 로컬 메모리를 세부적으로 설명하기 위한 블록도이다.FIG. 9 is a block diagram for explaining the local memory of FIG. 6 in detail.

도 9를 참조하면, 로컬 메모리(120)는 스케쥴러(121) 및 적어도 하나의 로컬 메모리 뱅크(122)를 포함할 수 있다.Referring to FIG. 9 , the local memory 120 may include a scheduler 121 and at least one local memory bank 122 .

데이터가 로컬 메모리(120)로 저장될 때, 스케쥴러(121)는 로드 엔진(113a)으로부터 데이터를 수신할 수 있다. 이때, 데이터는 라운드 로빈(round robin) 방식으로 로컬 메모리 뱅크(122)를 할당 받을 수 있다. 이에 따라서, 데이터는 적어도 하나의 로컬 메모리 뱅크(122) 중 어느 하나에 저장될 수 있다.When data is stored in the local memory 120, the scheduler 121 may receive the data from the load engine 113a. At this time, data may be allocated to the local memory bank 122 in a round robin manner. Accordingly, data may be stored in any one of the at least one local memory bank 122 .

반대로, 데이터가 로컬 메모리(120)에서 로드될 때, 스케쥴러(121)는 로컬 메모리 뱅크(122)로부터 데이터를 수신하여 스토어 엔진(113b)으로 전달될 수 있다. 스토어 엔진(113b)은 로컬 인터커넥션(200)을 통해서 외부로 데이터를 저장시킬 수 있다.Conversely, when data is loaded from the local memory 120, the scheduler 121 may receive data from the local memory bank 122 and transfer the data to the store engine 113b. The store engine 113b may store data externally through the local interconnection 200 .

도 10은 도 9의 로컬 메모리 뱅크를 세부적으로 설명하기 위한 블록도이다.FIG. 10 is a block diagram for explaining the local memory bank of FIG. 9 in detail.

도 10을 참조하면, 로컬 메모리 뱅크(122)는 로컬 메모리 뱅크 컨트롤러(122_1) 및 로컬 메모리 뱅크 셀 어레이(122_2)를 포함할 수 있다.Referring to FIG. 10 , the local memory bank 122 may include a local memory bank controller 122_1 and a local memory bank cell array 122_2.

로컬 메모리 뱅크 컨트롤러(122_1)는 로컬 메모리 뱅크(122)에 저장되는 데이터의 어드레스를 통해서 리드 및 라이트 동작을 관리할 수 있다. 즉, 로컬 메모리 뱅크 컨트롤러(122_1)는 데이터의 입출력을 전체적으로 관리할 수 있다.The local memory bank controller 122_1 may manage read and write operations through addresses of data stored in the local memory bank 122 . That is, the local memory bank controller 122_1 may manage the input/output of data as a whole.

로컬 메모리 뱅크 셀 어레이(122_2)는 데이터가 직접 저장되는 셀이 행과 열을 맞춰 정렬된 구조일 수 있다. 로컬 메모리 뱅크 셀 어레이(122_2)는 로컬 메모리 뱅크 컨트롤러(122_1)에 의해서 제어될 수 있다.The local memory bank cell array 122_2 may have a structure in which cells directly storing data are aligned in rows and columns. The local memory bank cell array 122_2 may be controlled by the local memory bank controller 122_1.

도 11은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성을 설명하기 위한 블록도이다.11 is a block diagram illustrating memory reconfiguration of a neural processing system according to some embodiments of the present invention.

도 11을 참조하면, 뉴럴 코어 SoC(10)은 제1 내지 제8 뉴럴 코어(100a~100h) 및 온 칩 메모리(OCM)를 포함할 수 있다. 도 11에서는 예시적으로 8개의 뉴럴 코어를 도시하였으나, 이는 예시에 불과하고 뉴럴 코어의 개수는 얼마든지 달라질 수 있다. Referring to FIG. 11 , the neural core SoC 10 may include first to eighth neural cores 100a to 100h and an on-chip memory (OCM). 11 shows 8 neural cores as an example, but this is just an example and the number of neural cores may vary.

온 칩 메모리(OCM)는 제1 내지 제8 로컬 메모리(120a~120h) 및 공유 메모리(2000)를 포함할 수 있다.The on-chip memory OCM may include first to eighth local memories 120a to 120h and a shared memory 2000 .

제1 내지 제8 로컬 메모리(120a~120h)는 각각 제1 내지 제8 뉴럴 코어(100a~100h)의 전용 메모리로 사용될 수 있다. 즉, 제1 내지 제8 뉴럴 코어(100a~100h)와 제1 내지 제8 로컬 메모리(120a~120h)는 서로 1:1로 대응될 수 있다.The first to eighth local memories 120a to 120h may be used as dedicated memories of the first to eighth neural cores 100a to 100h, respectively. That is, the first to eighth neural cores 100a to 100h and the first to eighth local memories 120a to 120h may correspond 1:1 to each other.

공유 메모리(2000)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 포함할 수 있다. 제1 내지 제8 메모리 유닛(2100a~2100h)은 제1 내지 제8 뉴럴 코어(100a~100h) 및 제1 내지 제8 로컬 메모리(120a~120h)에 각각 대응할 수 있다. 즉, 메모리 유닛의 개수는 뉴럴 코어 및 로컬 메모리의 개수와 동일한 8개일 수 있다. The shared memory 2000 may include first to eighth memory units 2100a to 2100h. The first to eighth memory units 2100a to 2100h may respectively correspond to the first to eighth neural cores 100a to 100h and the first to eighth local memories 120a to 120h. That is, the number of memory units may be eight, the same as the number of neural cores and local memories.

공유 메모리(2000)는 2가지 종류의 온 칩 메모리 형식 중 어느 하나로 동작할 수 있다. 즉, 공유 메모리(2000)는 로컬 메모리 형식 또는 글로벌 메모리 형식 중 어느 하나로 동작할 수 있다. 즉, 공유 메모리(2000)는 하나의 하드웨어로 2가지의 논리적인(logical) 메모리를 구현할 수 있다.The shared memory 2000 may operate in one of two types of on-chip memory formats. That is, the shared memory 2000 may operate in either a local memory format or a global memory format. That is, the shared memory 2000 can implement two types of logical memories with one hardware.

공유 메모리(2000)가 로컬 메모리 형식으로 구현되는 경우, 공유 메모리(2000)는 제1 내지 제8 로컬 메모리(120a~120h)와 같이 제1 내지 제8 뉴럴 코어(100a~100h) 각각의 전용 메모리(private memory)로 동작할 수 있다. 로컬 메모리는 글로벌 메모리에 비해서 상대적으로 고속의 클럭으로 동작할 수 있고, 공유 메모리(2000)도 로컬 메모리 형식으로 동작할 때 상대적으로 더 빠른 클럭을 사용할 수 있다.When the shared memory 2000 is implemented in a local memory format, the shared memory 2000 is a dedicated memory for each of the first to eighth neural cores 100a to 100h, such as the first to eighth local memories 120a to 120h. (private memory) can operate. The local memory can operate at a relatively high-speed clock compared to the global memory, and when the shared memory 2000 operates in the form of a local memory, it can use a relatively faster clock.

공유 메모리(2000)가 글로벌 메모리 형식으로 구현되는 경우, 공유 메모리(2000)는 제1 뉴럴 코어(100a) 및 제2 뉴럴 코어(100b)가 서로 같이 사용하는 공용 메모리(common memory)로 동작할 수 있다. 이때, 공유 메모리(2000)는 제1 내지 제8 뉴럴 코어(100a~100h)뿐만 아니라 제1 내지 제8 로컬 메모리(120a~120h)에 의해서도 공유될 수 있다.When the shared memory 2000 is implemented in a global memory format, the shared memory 2000 may operate as a common memory used by the first neural core 100a and the second neural core 100b. there is. In this case, the shared memory 2000 may be shared not only by the first to eighth neural cores 100a to 100h but also by the first to eighth local memories 120a to 120h.

글로벌 메모리는 일반적으로 로컬 메모리에 비해서 낮은 클럭을 사용할 수 있으나, 이에 제한되는 것은 아니다. 공유 메모리(2000)가 글로벌 메모리 형식으로 동작할 때는, 제1 내지 제8 뉴럴 코어(100a~100h)가 공유 메모리(2000)를 공유할 수 있다. 이때, 공유 메모리(2000)는 도 2의 휘발성 메모리(32)와 글로벌 인터커넥션(6000)을 통해서 연결되고, 휘발성 메모리(32)의 버퍼로 동작할 수도 있다.The global memory may generally use a lower clock than the local memory, but is not limited thereto. When the shared memory 2000 operates in a global memory format, the first to eighth neural cores 100a to 100h may share the shared memory 2000 . At this time, the shared memory 2000 is connected to the volatile memory 32 of FIG. 2 through the global interconnection 6000 and may operate as a buffer of the volatile memory 32 .

공유 메모리(2000)는 적어도 일부가 로컬 메모리 형식으로 동작하고, 나머지가 글로벌 메모리 형식으로 동작할 수 있다. 즉, 공유 메모리(2000) 전체가 로컬 메모리 형식으로 동작할 수도 있고, 공유 메모리(2000) 전체가 글로벌 메모리 형식으로 동작할 수도 있다. 또는, 공유 메모리(2000)의 일부가 로컬 메모리 형식으로 동작하고, 나머지 일부가 글로벌 메모리 형식으로 동작할 수 있다.At least a part of the shared memory 2000 may operate in a local memory format and the rest may operate in a global memory format. That is, the entire shared memory 2000 may operate in a local memory format or the entire shared memory 2000 may operate in a global memory format. Alternatively, a part of the shared memory 2000 may operate in a local memory format and the remaining part may operate in a global memory format.

도 12는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 시스템의 메모리 재구성의 예시를 나타낸 블록도이다.12 is a block diagram illustrating an example of memory reorganization of a neural processing system in accordance with some embodiments of the present invention.

도 11 및 도 12를 참조하면, 제1, 제3, 제5 및 제7 뉴럴 코어(100a, 100c, 100e, 100g) 각각의 제1, 제3, 제5 및 제7 전용 영역(AE1, AE3, AE5, AE7)은 각각 제1, 제3, 제5 및 제7 로컬 메모리(120a, 120c, 120e, 120g)만을 포함할 수 있다. 또한, 제2, 제4, 제6 및 제8 뉴럴 코어(100b, 100d, 100f, 100h) 각각의 제2, 제4, 제6 및 제8 전용 영역(AE2, AE4, AE6, AE8)은 각각 제2, 제4, 제6 및 제8 로컬 메모리(120b, 120d, 120f, 120h)를 포함할 수 있다. 또한, 제2, 제4, 제6 및 제8 전용 영역(AE2, AE4, AE6, AE8)은 제2, 제4, 제6 및 제8 메모리 유닛(2100b, 2100d, 2100f, 2100h)을 포함할 수 있다. 공유 메모리(2000)의 제1, 제3, 제5 및 제7 메모리 유닛(2100a, 2100c, 2100e, 2100g)은 공용 영역(AC)으로 활용될 수 있다.Referring to FIGS. 11 and 12 , the first, third, fifth, and seventh dedicated regions AE1 and AE3 of the first, third, fifth, and seventh neural cores 100a, 100c, 100e, and 100g, respectively. , AE5, and AE7 may include only the first, third, fifth, and seventh local memories 120a, 120c, 120e, and 120g, respectively. In addition, the second, fourth, sixth, and eighth dedicated regions AE2, AE4, AE6, and AE8 of the second, fourth, sixth, and eighth neural cores 100b, 100d, 100f, and 100h, respectively, Second, fourth, sixth, and eighth local memories 120b, 120d, 120f, and 120h may be included. Also, the second, fourth, sixth, and eighth dedicated areas AE2 , AE4 , AE6 , and AE8 may include second, fourth, sixth, and eighth memory units 2100b, 2100d, 2100f, and 2100h. can The first, third, fifth, and seventh memory units 2100a, 2100c, 2100e, and 2100g of the shared memory 2000 may be used as a common area AC.

공용 영역(AC)은 제1 내지 제8 뉴럴 코어(100a~100h)에 의해서 공유되는 메모리일 수 있다. 제2 전용 영역(AE2)은 제2 로컬 메모리(120b)와 제2 메모리 유닛(2100b)을 포함할 수 있다. 제2 전용 영역(AE2)은 하드웨어적으로 분리된 제2 로컬 메모리(120b)와 제2 메모리 유닛(210b)이 같은 방식으로 동작하여 논리적으로 하나의 로컬 메모리로 동작하는 영역일 수 있다. 제4, 제6 및 제8 전용 영역(AE4, AE6, AE8)도 제2 전용 영역(AE2)과 같은 방식으로 동작할 수 있다.The common area AC may be a memory shared by the first to eighth neural cores 100a to 100h. The second dedicated area AE2 may include a second local memory 120b and a second memory unit 2100b. The second dedicated area AE2 may be an area in which the hardware-separated second local memory 120b and the second memory unit 210b operate in the same way and logically operate as one local memory. The fourth, sixth, and eighth dedicated areas AE4, AE6, and AE8 may also operate in the same manner as the second dedicated area AE2.

본 실시예에 따른 공유 메모리(2000)는 각 뉴럴 코어에 대응하는 영역을 최적화된 비율의 논리적인 로컬 메모리와 논리적인 글로벌 메모리로 전환하여 사용할 수 있다. 공유 메모리(2000)는 이러한 비율의 조정을 런 타임(Run time)에서 수행할 수 있다. The shared memory 2000 according to the present embodiment can be used by converting an area corresponding to each neural core into a logical local memory and a logical global memory at an optimized ratio. The shared memory 2000 can adjust this ratio at run time.

즉, 각 뉴럴 코어는 서로 동일한 작업을 하는 경우도 있지만, 서로 상이한 작업을 하는 경우도 있을 수 있다. 이 경우 각 뉴럴 코어가 하는 작업에 필요한 로컬 메모리의 용량과 글로벌 메모리의 용량은 매번 다를 수밖에 없다. 이에 따라서, 기존의 온 칩 메모리와 같이 로컬 메모리와 공유 메모리의 구성 비율이 고정적으로 설정되는 경우에는 각 뉴럴 코어에게 할당되는 연산 작업에 따른 비효율이 발생할 수 있다. That is, each neural core may perform the same task in some cases, but may also perform different tasks in other cases. In this case, the capacity of local memory and the capacity of global memory required for the work performed by each neural core are inevitably different each time. Accordingly, in the case where the composition ratio of the local memory and the shared memory is fixedly set as in the case of the conventional on-chip memory, inefficiency may occur due to calculation tasks allocated to each neural core.

따라서, 본 실시예에 따른 뉴럴 프로세싱 장치의 공유 메모리(2000)는 런 타임 중에 연산 작업에 따라서 최적의 로컬 메모리 및 글로벌 메모리의 비율을 설정할 수 있고, 연산의 효율성 및 속도를 향상시킬 수 있다.Therefore, the shared memory 2000 of the neural processing apparatus according to the present embodiment can set an optimal ratio of local memory and global memory according to a computational task during run time, and can improve efficiency and speed of computation.

도 13은 도 11의 A부분을 확대한 블록도이다.FIG. 13 is an enlarged block diagram of part A of FIG. 11 .

도 11 및 도 13을 참조하면, 공유 메모리(2000)는 제1 로컬 메모리 컨트롤러(122_1a), 제2 로컬 메모리 컨트롤러(122_1b), 제5 로컬 메모리 컨트롤러(122_1e), 제6 로컬 메모리 컨트롤러(122_1f), 제1 내지 제8 메모리 유닛(2100a~2100h) 및 글로벌 컨트롤러(2200)를 포함할 수 있다. 도시되지 않은 다른 로컬 메모리 컨트롤러도 본 실시예에 포함될 수 있으나 편의상 설명을 생략한다.11 and 13, the shared memory 2000 includes a first local memory controller 122_1a, a second local memory controller 122_1b, a fifth local memory controller 122_1e, and a sixth local memory controller 122_1f. , first to eighth memory units 2100a to 2100h and a global controller 2200 . Other local memory controllers not shown may also be included in the present embodiment, but descriptions thereof are omitted for convenience.

제1 로컬 메모리 컨트롤러(122_1a)는 제1 로컬 메모리(120a)를 제어할 수 있다. 또한, 제1 로컬 메모리 컨트롤러(122_1a)는 제1 메모리 유닛(2100a)을 제어할 수 있다. 구체적으로, 제1 메모리 유닛(2100a)이 논리적인 로컬 메모리 형식으로 구현될 때, 제1 로컬 메모리 컨트롤러(122_1a)에 의한 제어가 제1 메모리 유닛(2100a)에 수행될 수 있다.The first local memory controller 122_1a may control the first local memory 120a. Also, the first local memory controller 122_1a may control the first memory unit 2100a. Specifically, when the first memory unit 2100a is implemented in a logical local memory format, control by the first local memory controller 122_1a may be performed on the first memory unit 2100a.

제2 로컬 메모리 컨트롤러(122_1b)는 제2 로컬 메모리(120b)를 제어할 수 있다. 또한, 제2 로컬 메모리 컨트롤러(122_1b)는 제2 메모리 유닛(2100b)을 제어할 수 있다. 즉, 제2 메모리 유닛(2100b)이 논리적인 로컬 메모리 형식으로 구현될 때, 제1 로컬 메모리 컨트롤러(122_1a)에 의한 제어가 제2 메모리 유닛(2100b)에 수행될 수 있다.The second local memory controller 122_1b may control the second local memory 120b. Also, the second local memory controller 122_1b may control the second memory unit 2100b. That is, when the second memory unit 2100b is implemented in a logical local memory format, control by the first local memory controller 122_1a may be performed on the second memory unit 2100b.

제5 로컬 메모리 컨트롤러(122_1e)는 제5 로컬 메모리(120e)를 제어할 수 있다. 또한, 제5 로컬 메모리 컨트롤러(122_1e)는 제5 메모리 유닛(2100e)을 제어할 수 있다. 즉, 제5 메모리 유닛(2100e)이 논리적인 로컬 메모리 형식으로 구현될 때, 제5 로컬 메모리 컨트롤러(122_1e)에 의한 제어가 제5 메모리 유닛(2100e)에 수행될 수 있다.The fifth local memory controller 122_1e may control the fifth local memory 120e. Also, the fifth local memory controller 122_1e may control the fifth memory unit 2100e. That is, when the fifth memory unit 2100e is implemented in a logical local memory format, control by the fifth local memory controller 122_1e may be performed on the fifth memory unit 2100e.

제6 로컬 메모리 컨트롤러(122_1f)는 제6 로컬 메모리(120f)를 제어할 수 있다. 또한, 제6 로컬 메모리 컨트롤러(122_1f)는 제6 메모리 유닛(2100f)을 제어할 수 있다. 즉, 제6 메모리 유닛(2100f)이 논리적인 로컬 메모리 형식으로 구현될 때, 제6 로컬 메모리 컨트롤러(122_1f)에 의한 제어가 제6 메모리 유닛(2100f)에 수행될 수 있다.The sixth local memory controller 122_1f may control the sixth local memory 120f. Also, the sixth local memory controller 122_1f may control the sixth memory unit 2100f. That is, when the sixth memory unit 2100f is implemented in a logical local memory format, control by the sixth local memory controller 122_1f may be performed on the sixth memory unit 2100f.

글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 모두 제어할 수 있다. 구체적으로, 글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)이 각각 논리적으로 글로벌 메모리 형식으로 동작할 때(즉, 논리적으로 로컬 메모리 형식으로 동작하지 않을 때), 제1 메모리 유닛(2100a) 내지 제8 메모리 유닛(2100h)을 제어할 수 있다.The global controller 2200 may control all of the first to eighth memory units 2100a to 2100h. Specifically, when the first to eighth memory units 2100a to 2100h logically operate in a global memory format (that is, when they do not logically operate in a local memory format), the global controller 2200 performs a first memory operation. Units 2100a to 8th memory units 2100h may be controlled.

즉, 제1 내지 제8 메모리 유닛(2100a~2100h)은 논리적으로 어떤 형식의 메모리로 구현되느냐에 따라서 제1 내지 제8 로컬 메모리 컨트롤러(122_1a~122_1h)에 의해 각각 제어되거나 글로벌 컨트롤러(2200)에 의해서 제어될 수 있다. That is, the first to eighth memory units 2100a to 2100h are each controlled by the first to eighth local memory controllers 122_1a to 122_1h or controlled by the global controller 2200 depending on what type of memory is logically implemented. can be controlled by

제1, 제2, 제5 및 제6 로컬 메모리 컨트롤러(122_1a, 122_1b, 122_1e, 122_1f)를 포함하는 로컬 메모리 컨트롤러가 각각 제1 내지 제8 메모리 유닛(2100a~2100h)을 제어하는 경우, 제1 내지 제8 로컬 메모리 컨트롤러(122_1a~141h)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 제1 내지 제8 로컬 메모리(120a~120h)와 동일하게 제어하므로, 제1 내지 제8 뉴럴 코어(100a~100h)의 전용 메모리로 제어할 수 있다. 이에 따라서, 제1 내지 제8 메모리 유닛(2100a~2100h)은 제1 내지 제8 뉴럴 코어(100a~100h)의 클럭 주파수와 대응하는 클럭 주파수로 동작할 수 있다.When the local memory controllers including the first, second, fifth, and sixth local memory controllers 122_1a, 122_1b, 122_1e, and 122_1f respectively control the first to eighth memory units 2100a to 2100h, the first Since the to eighth local memory controllers 122_1a to 141h control the first to eighth memory units 2100a to 2100h in the same way as the first to eighth local memories 120a to 120h, the first to eighth neural cores (100a~100h) can be controlled by dedicated memory. Accordingly, the first to eighth memory units 2100a to 2100h may operate at a clock frequency corresponding to that of the first to eighth neural cores 100a to 100h.

제1 로컬 메모리 컨트롤러(122_1a), 제2 로컬 메모리 컨트롤러(122_1b), 제5 로컬 메모리 컨트롤러(122_1e) 및 제6 로컬 메모리 컨트롤러(122_1f)를 포함하는 로컬 메모리 컨트롤러는 각각 도 6의 LSU(110)를 포함할 수 있다. The local memory controllers including the first local memory controller 122_1a, the second local memory controller 122_1b, the fifth local memory controller 122_1e, and the sixth local memory controller 122_1f are the LSU 110 of FIG. 6, respectively. can include

글로벌 컨트롤러(2200)가 제1 내지 제8 메모리 유닛(2100a~2100h) 중 적어도 하나를 각각 제어하는 경우, 글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 각각 제1 내지 제8 뉴럴 코어(100a~100h)의 글로벌 메모리로 제어할 수 있다. 이에 따라서, 제1 내지 제8 메모리 유닛(2100a~2100h) 중 적어도 하나는 각각 제1 내지 제8 뉴럴 코어(100a~100h)의 클럭 주파수와는 무관한 클럭 주파수로 동작할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.When the global controller 2200 controls at least one of the first to eighth memory units 2100a to 2100h, the global controller 2200 controls the first to eighth memory units 2100a to 2100h, respectively. It can be controlled by the global memory of the eighth neural cores 100a to 100h. Accordingly, at least one of the first to eighth memory units 2100a to 2100h may operate at a clock frequency independent of the clock frequency of the first to eighth neural cores 100a to 100h. However, this embodiment is not limited thereto.

글로벌 컨트롤러(2200)는 제1 내지 제8 메모리 유닛(2100a~2100h)을 도 3의 글로벌 인터커넥션(6000)과 연결할 수 있다. 제1 내지 제8 메모리 유닛(2100a~2100h)은 글로벌 컨트롤러(2200)에 의해서 도 1의 오프 칩 메모리(30)와 데이터를 교환하거나, 제1 내지 제8 로컬 메모리(120a~120h) 와 각각 데이터를 교환할 수 있다.The global controller 2200 may connect the first to eighth memory units 2100a to 2100h with the global interconnection 6000 of FIG. 3 . The first to eighth memory units 2100a to 2100h exchange data with the off-chip memory 30 of FIG. 1 by the global controller 2200 or exchange data with the first to eighth local memories 120a to 120h, respectively. can be exchanged.

제1 내지 제8 메모리 유닛(2100a~2100h)은 각각 적어도 하나의 메모리 뱅크를 포함할 수 있다. 제1 메모리 유닛(2100a)은 적어도 하나의 제1 메모리 뱅크(2110a)를 포함할 수 있다. 제1 메모리 뱅크(2110a)는 제1 메모리 유닛(2100a)을 특정한 크기로 나눈 영역일 수 있다. 각각의 제1 메모리 뱅크(2110a)는 모두 동일한 크기의 메모리 소자일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 도 13에서는 4개의 메모리 뱅크가 하나의 메모리 유닛에 포함되는 것으로 도시되었다. Each of the first to eighth memory units 2100a to 2100h may include at least one memory bank. The first memory unit 2100a may include at least one first memory bank 2110a. The first memory bank 2110a may be an area obtained by dividing the first memory unit 2100a into a specific size. Each of the first memory banks 2110a may be memory devices having the same size. However, this embodiment is not limited thereto. 13 shows that four memory banks are included in one memory unit.

유사하게 제2, 제5 및 제6 메모리 유닛(2100b, 2100e, 2100f)는 각각 적어도 하나의 제2, 제5 및 제6 메모리 뱅크(2110b, 2110e, 2110f)를 포함할 수 있다.Similarly, the second, fifth, and sixth memory units 2100b, 2100e, and 2100f may each include at least one second, fifth, and sixth memory bank 2110b, 2110e, and 2110f.

이하 제1 메모리 뱅크(2110a) 및 제5 메모리 뱅크(2110e)를 기준으로 설명하고, 이는 제2 및 제6 메모리 뱅크(2110b, 2110f)를 포함한 다른 메모리 뱅크와 동일할 수 있다.Hereinafter, the first memory bank 2110a and the fifth memory bank 2110e will be described, which may be the same as other memory banks including the second and sixth memory banks 2110b and 2110f.

제1 메모리 뱅크(2110a)는 각각 논리적으로 로컬 메모리 형식으로 동작하거나 논리적으로 글로벌 메모리 형식으로 동작할 수 있다. 이때, 제1 메모리 뱅크(2110a)는 제1 메모리 유닛(2100a) 내의 다른 메모리 뱅크와 독립적으로 동작할 수도 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.Each of the first memory banks 2110a may logically operate in a local memory format or logically operate in a global memory format. In this case, the first memory bank 2110a may operate independently of other memory banks in the first memory unit 2100a. However, this embodiment is not limited thereto.

각 메모리 뱅크별로 독립적으로 동작하는 경우, 제1 메모리 유닛(2100a)은 제1 로컬 메모리(120a)와 동일한 방식으로 동작하는 제1 영역과, 제1 로컬 메모리(120a)와 다른 방식으로 동작하는 제2 영역을 포함할 수 있다. 이때, 제1 영역과 제2 영역이 반드시 병존하는 것은 아니고 어느 하나의 영역이 전체 제1 메모리 유닛(2100a)의 전체를 차지할 수도 있다.When each memory bank operates independently, the first memory unit 2100a includes a first area that operates in the same way as the first local memory 120a and a second area that operates in a different way from the first local memory 120a. It can contain 2 areas. In this case, the first area and the second area do not necessarily coexist, and either area may occupy the entire first memory unit 2100a.

마찬가지로, 제2 메모리 유닛(2100b)은 제2 로컬 메모리(120b)와 동일한 방식으로 동작하는 제3 영역과, 제2 로컬 메모리(120b)와 다른 방식으로 동작하는 제4 영역을 포함할 수 있다. 이때, 제3 영역과 제4 영역이 반드시 병존하는 것은 아니고 어느 하나의 영역이 전체 제1 메모리 유닛(2100a)의 전체를 차지할 수도 있다.Similarly, the second memory unit 2100b may include a third area operating in the same way as the second local memory 120b and a fourth area operating in a different way from the second local memory 120b. In this case, the third area and the fourth area do not necessarily coexist, and either area may occupy the entire first memory unit 2100a.

이때, 제1 영역과 제2 영역의 비율은 제3 영역과 제4 영역의 비율과 상이할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다. 따라서, 제1 영역과 제2 영역의 비율은 제3 영역과 제4 영역의 비율과 동일할 수도 있다. 즉, 각 메모리 유닛에서의 메모리 구성 비율을 얼마든지 달라질 수 있다.In this case, the ratio of the first area to the second area may be different from the ratio of the third area to the fourth area. However, this embodiment is not limited thereto. Accordingly, the ratio of the first area to the second area may be the same as the ratio of the third area to the fourth area. That is, the memory configuration ratio in each memory unit can be varied as desired.

일반적으로 기존의 시스템 온 칩의 경우에는 고속의 로컬 메모리를 제외한 온 칩 메모리를 고밀도 저전력 SRAM으로 구성하는 경우가 많았다. 이는 필요한 용량 대비 칩의 면적과 사용 전력에서 SRAM이 높은 효율을 가지기 때문이다. 그러나, 기존의 온 칩 메모리는 미리 결정된 로컬 메모리의 용량보다 더 많은 데이터가 빠르게 필요한 작업의 경우에는 처리 속도가 크게 느려질 수밖에 없었고, 글로벌 메모리의 필요가 크지 않은 경우에도 남아있는 글로벌 메모리를 활용할 방안이 전혀 없어 비효율이 발생하였다.In general, in the case of a conventional system-on-chip, on-chip memories other than high-speed local memories are often composed of high-density, low-power SRAM. This is because SRAM has high efficiency in terms of chip area and power consumption compared to required capacity. However, the existing on-chip memory inevitably slows down the processing speed for tasks that require more data than the predetermined capacity of the local memory. There was no inefficiency at all.

이에 반해서, 본 발명의 몇몇 실시예에 따른 공유 메모리(2000)는 경우에 따라서 각각 2개의 컨트롤러 중 어느 하나에 의해서 선택적으로 제어될 수 있다. 이때, 공유 메모리(2000)가 전체적으로 2개의 컨트롤러 중 정해진 어느 하나에 의해서만 제어되는 것은 아니고, 메모리 유닛 단위 또는 메모리 뱅크 단위로 독립적으로 제어될 수 있다.In contrast, the shared memory 2000 according to some embodiments of the present invention may be selectively controlled by any one of the two controllers in some cases. In this case, the shared memory 2000 is not entirely controlled by a predetermined one of the two controllers, and may be independently controlled in units of memory units or units of memory banks.

이를 통해서, 본 실시예에 따른 공유 메모리(2000)는 연산 작업에 따른 최적의 메모리 구성 비율을 런 타임 중에 획득하여 더 빠르고 효율적인 연산작업을 수행할 수 있다. 인공지능에 특화된 프로세싱 유닛의 경우 특정 어플리케이션 단위로 로컬 메모리와 글로벌 메모리의 필요한 크기가 달라질 수 있다. 나아가, 동일한 어플리케이션이라도 딥러닝 네트워크를 사용하는 경우 각 레이어 별로 로컬 메모리와 글로벌 메모리의 필요한 크기가 달라질 수 있다. 본 실시예에 따른 공유 메모리(2000)는 각 레이어에 따른 연산 단계의 변화에도 메모리의 구성 비율이 런 타임 중에 변화될 수 있어 빠르고 효율적인 딥러닝 작업이 가능할 수 있다.Through this, the shared memory 2000 according to the present embodiment can obtain an optimal memory configuration ratio according to a computational task during run time, and thus perform a faster and more efficient calculation task. In the case of a processing unit specialized for artificial intelligence, the required size of local memory and global memory may vary for each specific application. Furthermore, when a deep learning network is used even for the same application, the required size of the local memory and the global memory may be different for each layer. In the shared memory 2000 according to the present embodiment, the configuration ratio of the memory can be changed during run time even when the operation step according to each layer is changed, so that fast and efficient deep learning work can be performed.

도 14는 도 13의 제1 뱅크를 세부적으로 설명하기 위한 도면이다. 도 14는 제1 메모리 뱅크(2110a)에 대해서 도시하였지만, 다른 메모리 뱅크도 제1 메모리 뱅크(2110a)와 동일한 구조일 수 있다.FIG. 14 is a diagram for explaining the first bank of FIG. 13 in detail. 14 illustrates the first memory bank 2110a, other memory banks may also have the same structure as the first memory bank 2110a.

도 14를 참조하면, 제1 메모리 뱅크(2110a)는 셀 어레이(Ca), 뱅크 컨트롤러(Bc), 제1 경로 유닛(P1) 및 제2 경로 유닛(P2)을 포함할 수 있다.Referring to FIG. 14 , the first memory bank 2110a may include a cell array Ca, a bank controller Bc, a first path unit P1 and a second path unit P2.

셀 어레이(Ca)는 내부에 복수의 메모리 소자(Cell)를 포함할 수 있다. 셀 어레이(Ca)는 복수의 메모리 소자가 격자 구조로 정렬되어 배치될 수 있다. 셀 어레이(Ca)는 예를 들어, SRAM(Static Random Access Memory) 셀 어레이일 수 있다.The cell array Ca may include a plurality of memory elements Cell therein. In the cell array Ca, a plurality of memory elements may be arranged in a lattice structure. The cell array Ca may be, for example, a static random access memory (SRAM) cell array.

뱅크 컨트롤러(Bc)는 셀 어레이(Ca)를 제어할 수 있다. 뱅크 컨트롤러(Bc)는 셀 어레이(Ca)가 로컬 메모리 형식으로 동작할지, 아니면 글로벌 메모리 형식으로 동작할 지를 결정하고 그에 따라 셀 어레이(Ca)를 제어할 수 있다. The bank controller Bc may control the cell array Ca. The bank controller Bc may determine whether the cell array Ca operates in a local memory format or a global memory format and controls the cell array Ca accordingly.

구체적으로, 뱅크 컨트롤러(Bc)는 런 타임 중에 제1 경로 유닛(P1) 방향으로 데이터를 송수신할지, 제2 경로 유닛(P2) 방향으로 데이터를 송수신할지를 결정할 수 있다. 뱅크 컨트롤러(Bc)는 경로 컨트롤 신호(Spc)에 따라 데이터의 송수신 방향을 결정할 수 있다.Specifically, the bank controller Bc may determine whether to transmit/receive data in the direction of the first path unit P1 or the direction of the second path unit P2 during run time. The bank controller Bc may determine the transmission/reception direction of data according to the path control signal Spc.

경로 컨트롤 신호(Spc)는 미리 설계된 장치 드라이버나 컴파일러에 의해서 생성될 수 있다. 경로 컨트롤 신호(Spc)는 연산 작업의 특성에 따라서 생성될 수 있다. 또는, 경로 컨트롤 신호(Spc)는 사용자로부터 수신된 입력에 의해서 생성될 수 있다. 즉, 사용자가 가장 최적의 메모리 구성 비율을 선택하기 위해서 경로 컨트롤 신호(Spc)에 대한 입력을 직접 인가할 수 있다.The path control signal Spc may be generated by a pre-designed device driver or compiler. The path control signal Spc may be generated according to the characteristics of an arithmetic task. Alternatively, the path control signal Spc may be generated by an input received from a user. That is, the user may directly apply an input to the path control signal Spc in order to select the most optimal memory configuration ratio.

뱅크 컨트롤러(Bc)는 경로 컨트롤 신호(Spc)를 통해서 셀 어레이(Ca)에 저장된 데이터들의 송수신되는 경로를 결정할 수 있다. 뱅크 컨트롤러(Bc)가 데이터들이 송수신되는 경로를 결정하는 것에 따라 데이터들의 교환 인터페이스가 달라질 수 있다. 즉, 뱅크 컨트롤러(Bc)가 제1 경로 유닛(P1)과 데이터를 교환하는 경우 제1 인터페이스를 이용할 수 있고, 제2 경로 유닛(P2)과 데이터를 교환하는 경우 제2 인터페이스를 이용할 수 있다. 이때, 제1 인터페이스와 제2 인터페이스는 서로 다를 수 있다.The bank controller Bc may determine a transmission/reception path of data stored in the cell array Ca through the path control signal Spc. The data exchange interface may vary according to the bank controller Bc determining the transmission/reception path of the data. That is, when the bank controller Bc exchanges data with the first path unit P1, the first interface may be used, and when data is exchanged with the second path unit P2, the second interface may be used. In this case, the first interface and the second interface may be different from each other.

또한, 데이터가 저장되는 어드레스 체계도 달라질 수 있다. 즉, 특정 인터페이스를 선택하면 그에 대응하는 어드레스 체계로 리드 및 라이트 동작이 수행될 수 있다.Also, an address system in which data is stored may be different. That is, when a specific interface is selected, read and write operations can be performed with an address system corresponding thereto.

뱅크 컨트롤러(Bc)는 특정 클럭 주파수로 동작할 수 있다. 예를 들어, 셀 어레이(Ca)가 SRAM 셀 어레이인 경우에는 일반적인 SRAM의 동작 클럭 주파수로 뱅크 컨트롤러(Bc)가 동작할 수 있다. The bank controller Bc may operate at a specific clock frequency. For example, when the cell array Ca is an SRAM cell array, the bank controller Bc may operate at an operating clock frequency of a general SRAM.

제1 경로 유닛(P1)은 뱅크 컨트롤러(Bc)와 연결될 수 있다. 제1 경로 유닛(P1)은 셀 어레이(Ca)의 데이터를 제1 뉴럴 코어(100a)과 직접 교환할 수 있다. 이때, “직접”이란 글로벌 인터커넥션(6000)을 거치지 않고 서로 교환됨을 의미할 수 있다. 즉, 제1 뉴럴 코어(100a)은 제1 로컬 메모리(120a)와 직접 데이터를 교환할 수 있고, 제1 뉴럴 코어(100a)은 공유 메모리(2000)가 논리적으로 로컬 메모리 형식으로 구현되었을 때 제1 경로 유닛(P1)을 통해서 데이터를 교환할 수 있다. 제1 경로 유닛(P1)은 도 13의 제1 로컬 메모리 컨트롤러(122_1a) 및 제2 로컬 메모리 컨트롤러(122_1b)를 포함한 로컬 메모리 컨트롤러를 포함할 수 있다.The first path unit P1 may be connected to the bank controller Bc. The first path unit P1 may directly exchange data of the cell array Ca with the first neural core 100a. In this case, "directly" may mean mutual exchange without going through the global interconnection 6000 . That is, the first neural core 100a can directly exchange data with the first local memory 120a, and the first neural core 100a operates when the shared memory 2000 is logically implemented in the form of a local memory. Data can be exchanged through 1 path unit P1. The first path unit P1 may include a local memory controller including the first local memory controller 122_1a and the second local memory controller 122_1b of FIG. 13 .

제1 경로 유닛(P1)은 멀티 사이클 싱크 패스(Multi-Cycle Sync-Path)를 구성할 수 있다. 즉, 제1 경로 유닛(P1)의 동작 클럭 주파수는 제1 뉴럴 코어(100a)의 동작 클럭 주파수와 동일할 수 있다. 제1 로컬 메모리(120a)는 제1 뉴럴 코어(100a)의 동작과 같은 속도로 빠르게 데이터를 교환하기 위해서 제1 뉴럴 코어(100a)의 동작 클럭 주파수와 동일한 클럭 주파수로 빠르게 데이터를 교환할 수 있다. 제1 경로 유닛(P1)도 동일하게 제1 뉴럴 코어(100a)의 동작 클럭 주파수와 동일한 클럭 주파수로 동작할 수 있다.The first path unit P1 may configure a multi-cycle sync-path. That is, the operating clock frequency of the first path unit P1 may be the same as the operating clock frequency of the first neural core 100a. The first local memory 120a can rapidly exchange data at the same clock frequency as the operating clock frequency of the first neural core 100a in order to rapidly exchange data at the same speed as the operation of the first neural core 100a. . Similarly, the first path unit P1 may operate at the same clock frequency as the operating clock frequency of the first neural core 100a.

이때, 제1 경로 유닛(P1)의 동작 클럭 주파수는 뱅크 컨트롤러(Bc)의 동작 클럭 주파수의 배수(倍數)일 수 있다. 이 경우, 뱅크 컨트롤러(Bc)와 제1 경로 유닛(P1) 사이에 클럭의 동기화를 위한 CDC(Clock Domain Crossing) 작업이 따로 필요하지 않고, 이에 따라서 데이터 전송의 지연(delay)이 발생하지 않을 수 있다. 이에 따라서, 더 빠르고 효율적인 데이터 교환이 가능할 수 있다.In this case, the operating clock frequency of the first path unit P1 may be a multiple of the operating clock frequency of the bank controller Bc. In this case, a separate CDC (Clock Domain Crossing) operation for clock synchronization between the bank controller Bc and the first path unit P1 is not required, and thus data transmission delay may not occur. there is. Accordingly, faster and more efficient data exchange may be possible.

도 14에서는 예시적으로, 제1 경로 유닛(P1)의 동작 클럭 주파수는 1.5GHz일 수 있다. 이는 뱅크 컨트롤러(Bc)의 750MHz의 2배의 주파수일 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니고 뱅크 컨트롤러(Bc)의 클럭 주파수의 정수배로 제1 경로 유닛(P1)이 동작하는 경우라면 얼마든지 가능할 수 있다.14 exemplarily, the operating clock frequency of the first path unit P1 may be 1.5 GHz. This may be twice the frequency of 750 MHz of the bank controller (Bc). However, the present embodiment is not limited thereto, and any number may be possible if the first path unit P1 operates at an integer multiple of the clock frequency of the bank controller Bc.

제2 경로 유닛(P2)은 뱅크 컨트롤러(Bc)와 연결될 수 있다. 제2 경로 유닛(P2)은 셀 어레이(Ca)의 데이터를 제1 뉴럴 코어(100a)과 직접 교환하지 않고, 글로벌 인터커넥션(6000)를 통해서 교환할 수 있다. 즉, 제1 뉴럴 코어(100a)은 글로벌 인터커넥션(6000) 및 제2 경로 유닛(P2)을 통해서 셀 어레이(Ca)와 데이터를 교환할 수 있다. 이때, 셀 어레이(Ca)는 단순히 제1 뉴럴 코어(100a)뿐만 아니라 다른 뉴럴 코어와도 데이터를 교환할 수 있다. The second path unit P2 may be connected to the bank controller Bc. The second path unit P2 may exchange data of the cell array Ca through the global interconnection 6000 without directly exchanging the data with the first neural core 100a. That is, the first neural core 100a may exchange data with the cell array Ca through the global interconnection 6000 and the second path unit P2. At this time, the cell array Ca may exchange data not only with the first neural core 100a but also with other neural cores.

즉, 제2 경로 유닛(P2)은 제1 메모리 뱅크(2110a)가 논리적으로 글로벌 메모리 형식으로 구현되었을 때 셀 어레이(Ca)와 모든 뉴럴 코어와의 데이터 교환 경로일 수 있다. 제2 경로 유닛(P2)은 도 13의 글로벌 컨트롤러(2200)를 포함할 수 있다.That is, the second path unit P2 may be a data exchange path between the cell array Ca and all neural cores when the first memory bank 2110a is logically implemented in a global memory format. The second path unit P2 may include the global controller 2200 of FIG. 13 .

제2 경로 유닛(P2)은 어싱크 패스(Async-Path)를 구성할 수 있다. 제2 경로 유닛(P2)의 동작 클럭 주파수는 글로벌 인터커넥션(6000)의 동작 클럭 주파수와 동일할 수 있다. 제2 경로 유닛(P2)도 동일하게 글로벌 인터커넥션(6000)의 동작 클럭 주파수와 동일한 클럭 주파수로 동작할 수 있다.The second path unit P2 may constitute an async-path. The operating clock frequency of the second path unit P2 may be the same as the operating clock frequency of the global interconnection 6000 . The second path unit P2 may also operate at the same clock frequency as the operating clock frequency of the global interconnection 6000 .

이때, 제2 경로 유닛(P2)의 동작 클럭 주파수는 뱅크 컨트롤러(Bc)의 동작 클럭 주파수와 서로 동기화되지 않을 수 있다. 이 경우, 뱅크 컨트롤러(Bc)와 제2 경로 유닛(P2) 사이에 클럭의 동기화를 위한 CDC(Clock Domain Crossing) 작업이 필요할 수 있다. 뱅크 컨트롤러(Bc)의 동작 클럭 주파수와 제2 경로 유닛(P2)의 동작 클럭 주파수를 서로 동기화 시키지 않는 경우에는 클럭 도메인의 설계의 자유도가 높아질 수 있다. 따라서, 하드웨어 설계의 난이도가 낮아져 더욱 용이하게 하드웨어 동작을 도출할 수 있다.At this time, the operating clock frequency of the second path unit P2 may not be synchronized with the operating clock frequency of the bank controller Bc. In this case, a clock domain crossing (CDC) operation may be required for clock synchronization between the bank controller Bc and the second path unit P2. When the operating clock frequency of the bank controller Bc and the operating clock frequency of the second path unit P2 are not synchronized with each other, the degree of freedom in clock domain design can be increased. Accordingly, the difficulty of hardware design is lowered, and the hardware operation can be derived more easily.

뱅크 컨트롤러(Bc)는 제1 경로 유닛(P1)을 통해서 데이터를 교환하는 경우와 제2 경로 유닛(P2)을 통해서 데이터를 교환하는 경우에 서로 다른 어드레스 체계를 이용할 수 있다. 즉, 뱅크 컨트롤러(Bc)는 제1 경로 유닛(P1)을 통해서는 제1 어드레스 체계를 이용하고, 제2 경로 유닛(P2)을 통해서는 제2 어드레스 체계를 이용할 수 있다. 이때, 제1 어드레스 체계와 제2 어드레스 체계는 서로 다를 수 있다.The bank controller Bc may use different address systems when exchanging data through the first path unit P1 and when exchanging data through the second path unit P2. That is, the bank controller Bc may use the first address system through the first path unit P1 and use the second address system through the second path unit P2. In this case, the first address system and the second address system may be different from each other.

뱅크 컨트롤러(Bc)는 반드시 메모리 뱅크별로 존재할 필요는 없다. 즉, 뱅크 컨트롤러(Bc)는 스케쥴링을 위한 부분이 아니라 신호를 전달하는 역할을 하므로, 2개의 포트를 가지는 각각의 메모리 뱅크에 필수적인 부분은 아니다. 따라서, 하나의 뱅크 컨트롤러(Bc)가 여러 메모리 뱅크를 제어할 수 있다. 여러 메모리 뱅크는 뱅크 컨트롤러(Bc)에 의해 제어되더라도 독립적으로 동작할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.The bank controller Bc does not necessarily exist for each memory bank. That is, since the bank controller (Bc) is not a part for scheduling but serves to transmit signals, it is not an essential part for each memory bank having two ports. Thus, one bank controller Bc can control several memory banks. Several memory banks can operate independently even though they are controlled by the bank controller Bc. However, this embodiment is not limited thereto.

물론, 뱅크 컨트롤러(Bc)는 각 메모리 뱅크별로 존재할 수도 있다. 이 경우, 뱅크 컨트롤러(Bc)가 각각의 메모리 뱅크를 개별적으로 제어할 수 있다.Of course, the bank controller Bc may exist for each memory bank. In this case, the bank controller Bc can individually control each memory bank.

도 13 및 도 14를 참조하면, 제1 메모리 유닛(210a)이 제1 경로 유닛(P1)을 통해서 데이터를 교환하는 경우 제1 어드레스 체계를 사용하고, 제2 경로 유닛(P2)을 통해서 데이터를 교환하는 경우 제2 어드레스 체계를 사용할 수 있다. 유사하게, 제2 메모리 유닛(210b)이 제1 경로 유닛(P1)을 통해서 데이터를 교환하는 경우 제3 어드레스 체계를 사용하고, 제2 경로 유닛(P2)을 통해서 데이터를 교환하는 경우 제2 어드레스 체계를 사용할 수 있다. 이때, 제1 어드레스 체계와 제3 어드레스 체계는 서로 동일할 수 있다. 단, 본 실시예가 이에 제한되는 것은 아니다.13 and 14, when the first memory unit 210a exchanges data through the first path unit P1, the first address system is used and data is exchanged through the second path unit P2. In case of exchange, a second address scheme may be used. Similarly, when the second memory unit 210b exchanges data through the first path unit P1, the third address system is used, and when data is exchanged through the second path unit P2, the second address system is used. system can be used. In this case, the first address system and the third address system may be identical to each other. However, this embodiment is not limited thereto.

제1 어드레스 체계와 제3 어드레스 체계는 각각 제1 뉴럴 코어(100a) 및 제2 뉴럴 코어(100b)에 각각 전용으로 사용될 수 있다. 제2 어드레스 체계는 제1 뉴럴 코어(100a) 및 제2 뉴럴 코어(100b)에 공용으로 적용될 수 있다.The first address system and the third address system may be used exclusively for the first neural core 100a and the second neural core 100b, respectively. The second address system may be commonly applied to the first neural core 100a and the second neural core 100b.

도 14에서는 예시적으로, 제2 경로 유닛(P2)의 동작 클럭 주파수는 1GHz로 동작할 수 있다. 이는 뱅크 컨트롤러(Bc)의 750MHz의 동작 클럭 주파수와 동기화 되지 않은 주파수일 수 있다. 즉, 제2 경로 유닛(P2)의 동작 클럭 주파수는 뱅크 컨트롤러(Bc)의 동작 클럭 주파수에 전혀 종속되지 않고 자유롭게 설정될 수 있다.14 exemplarily, the operating clock frequency of the second path unit P2 may operate at 1 GHz. This may be a frequency that is not synchronized with the 750 MHz operating clock frequency of the bank controller (Bc). That is, the operating clock frequency of the second path unit P2 is not dependent on the operating clock frequency of the bank controller Bc and can be freely set.

일반적인 글로벌 메모리는 느린 SRAM(예를 들어, 750MHz)과 그보다 빠른 글로벌 인터커넥션(예를 들어, 1GHz)를 이용하여 CDC 작업에 따른 지연이 발생할 수밖에 없었다. 이에 반해서, 본 발명의 몇몇 실시예들에 따른 공유 메모리(2000)는 제2 경로 유닛(P2) 외에도 제1 경로 유닛(P1)을 이용할 여지가 있어 CDC 작업에 따른 지연을 회피할 수 있다. A general global memory uses a slow SRAM (eg, 750 MHz) and a faster global interconnection (eg, 1 GHz), so that delays due to CDC work inevitably occur. In contrast, in the shared memory 2000 according to some embodiments of the present invention, there is room to use the first path unit P1 in addition to the second path unit P2, so delay due to CDC work can be avoided.

또한, 일반적인 글로벌 메모리는 복수의 뉴럴 코어가 하나의 글로벌 인터커넥션(6000)를 이용하므로 데이터 전송량이 동시에 발생하였을 때 전체적인 처리 속도의 저하가 쉽게 발생할 수 있다. 이에 반해서, 본 발명의 몇몇 실시예들에 따른 공유 메모리(2000)는 제2 경로 유닛(P2) 외에도 제1 경로 유닛(P1)을 이용할 여지가 있어 글로벌 컨트롤러(2200)에 몰리는 데이터 처리량을 적절하게 분산하는 효과도 얻을 수 있다.In addition, since a plurality of neural cores use one global interconnection 6000 in a general global memory, the overall processing speed may be easily reduced when the amount of data transfer occurs simultaneously. In contrast, in the shared memory 2000 according to some embodiments of the present invention, there is room to use the first path unit P1 in addition to the second path unit P2, so that the amount of data processed in the global controller 2200 is adequately reduced. A dispersing effect can also be obtained.

도 15는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 가상 아이디 할당을 설명하기 위한 개념도이다.15 is a conceptual diagram for explaining virtual ID assignment of a neural processing apparatus according to some embodiments of the present invention.

도 15를 참조하면, 뉴럴 코어 SoC(10)는 복수의 뉴럴 프로세서를 포함할 수 있다. 도 15에서는 예를 들어, 8개의 뉴럴 프로세서가 있는 경우를 도시하였다. 뉴럴 코어 SoC(10)는 제1 내지 제8 뉴럴 프로세서(PP0~PP7)를 포함할 수 있다.Referring to FIG. 15 , the neural core SoC 10 may include a plurality of neural processors. 15 shows a case where there are, for example, 8 neural processors. The neural core SoC 10 may include first to eighth neural processors PP0 to PP7.

이때, 제1 내지 제4 뉴럴 프로세서(PP0~PP3)는 동일한 프로그램에 의해서 하나의 작업을 분할하여 수행할 수 있다. 제5 뉴럴 프로세서(1000)는 단독으로 하나의 작업을 수행할 수 있고, 제6 내지 제8 뉴럴 프로세서(PP5~PP7)는 또 다른 하나의 작업을 분할하여 수행할 수 있다.At this time, the first to fourth neural processors PP0 to PP3 may divide and perform one task by the same program. The fifth neural processor 1000 may perform one task alone, and the sixth to eighth neural processors PP5 to PP7 may divide and perform another task.

즉, 8개의 뉴럴 프로세서는 3개의 세트로 나누어질 수 있다. 이때, 제1 세트(Set1)는 제1 내지 제4 뉴럴 프로세서(PP0~PP3)를 포함할 수 있다. 제2 세트(Set2)는 제5 뉴럴 프로세서(1000)를 포함할 수 있다. 제3 세트(Set3)는 제6 내지 제8 뉴럴 프로세서(PP5~PP7)를 포함할 수 있다.That is, 8 neural processors can be divided into 3 sets. In this case, the first set Set1 may include the first to fourth neural processors PP0 to PP3. The second set Set2 may include the fifth neural processor 1000 . The third set (Set3) may include the sixth to eighth neural processors PP5 to PP7.

각각의 세트에서는 새로운 가상 아이디가 할당될 수 있다. 즉, 제1 세트(Set1)의 제1 내지 제4 뉴럴 프로세서(PP0~PP3)는 각각 제1 내지 제4 가상 아이디(VP0~VP3)가 각각 할당될 수 있다. 제2 세트(Set2)의 제5 뉴럴 프로세서(1000)는 제1 가상 아이디(VP0)가 할당될 수 있다. 제3 세트(Set3)의 제6 내지 제8 뉴럴 프로세서(PP5~PP7)는 제1 내지 제3 가상 아이디(VP0~VP2)가 할당될 수 있다.In each set, a new virtual ID may be assigned. That is, the first to fourth neural processors PP0 to PP3 of the first set Set1 may be assigned first to fourth virtual IDs VP0 to VP3, respectively. The fifth neural processor 1000 of the second set (Set2) may be assigned a first virtual ID (VP0). The sixth to eighth neural processors PP5 to PP7 of the third set (Set3) may be assigned first to third virtual IDs VP0 to VP2.

따라서, 서로 다른 프로그램을 실행하는 경우 동일한 가상 아이디가 서로 다른 뉴럴 프로세서에 할당될 수는 있지만, 서로 동일한 프로그램을 같이 실행하는 경우 피지컬 아이디(즉, 각각의 뉴럴 프로세서의 고유의 아이디)와 가상 아이디는 1:1로 대응될 수 있다.Therefore, when different programs are executed, the same virtual ID can be assigned to different neural processors, but when the same program is executed together, the physical ID (i.e., the unique ID of each neural processor) and the virtual ID are different. It can correspond 1:1.

도 16은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 가상 아이디 할당 및 VPID 테이블을 설명하기 위한 도면이다.16 is a diagram for explaining a virtual ID allocation and a VPID table of a neural processing apparatus according to some embodiments of the present invention.

도 16을 참조하면, 제1 세트(Set1)의 제1 내지 제4 뉴럴 프로세서(PP0~PP3)가 제1 내지 제4 가상 아이디(VP0~VP3)를 할당 받은 경우를 설명한다. 피지컬 아이디와 가상 아이디의 순서는 서로 동일하지 않을 수 있다. 즉, 제1 뉴럴 프로세서(1000)는 제1 가상 아이디(VP0)가 아닌 제3 가상 아이디(VP2)를 할당받을 수 있다. 제2 뉴럴 프로세서(1000)는 제2 가상 아이디(VP2)를 할당받고, 제3 뉴럴 프로세서(1000)는 제1 가상 아이디(VP0)를 할당받을 수 있다. 제4 뉴럴 프로세서(1000)는 제4 가상 아이디(VP4)를 할당받을 수 있다.Referring to FIG. 16 , a case in which first to fourth neural processors PP0 to PP3 of the first set Set1 are assigned first to fourth virtual IDs VP0 to VP3 will be described. The order of the physical ID and the virtual ID may not be the same. That is, the first neural processor 1000 may be assigned a third virtual ID VP2 instead of the first virtual ID VP0. The second neural processor 1000 may be assigned a second virtual ID VP2 , and the third neural processor 1000 may be assigned a first virtual ID VP0 . The fourth neural processor 1000 may be assigned a fourth virtual ID VP4.

이에 따라서, VPID 테이블(TB_VTP)은 가상 아이디에 해당하는 피지컬 아이디를 기록할 수 있다. 예를 들어, VPID 테이블(TB_VTP)이 3, 0, 1, 2의 값이 순차적으로 기록되는 경우 각각 역순으로 제1 내지 제4 가상 아이디(VP0~VP3)가 어떤 피지컬 아이디에 대응되는 지를 확인할 수 있다.Accordingly, the VPID table (TB_VTP) may record a physical ID corresponding to a virtual ID. For example, when values of 3, 0, 1, and 2 are sequentially recorded in the VPID table (TB_VTP), it is possible to determine which physical IDs the first to fourth virtual IDs (VP0 to VP3) correspond to in reverse order. there is.

구체적으로, 제1 가상 아이디(VP0)를 할당 받은 뉴럴 프로세서는 숫자 2에 의해서 제3 뉴럴 프로세서(1000)이고, 제2 가상 아이디(VP2)를 할당 받은 뉴럴 프로세서는 숫자 1에 의해서 제2 뉴럴 프로세서(1000)이다. 제3 가상 아이디(VP2)를 할당 받은 뉴럴 프로세서는 숫자 0에 의해서 제1 뉴럴 프로세서(1000)이고, 제4 가상 아이디(VP4)를 할당 받은 뉴럴 프로세서는 숫자 3에 의해서 제4 뉴럴 프로세서(1000)이다.Specifically, the neural processor assigned the first virtual ID VP0 is the third neural processor 1000 by the number 2, and the neural processor assigned the second virtual ID VP2 is the second neural processor by the number 1. (1000). The neural processor assigned the third virtual ID (VP2) is the first neural processor 1000 by the number 0, and the neural processor assigned the fourth virtual ID (VP4) is the fourth neural processor 1000 by the number 3. am.

도 17은 싱크 타겟과 VPID 테이블을 통한 피지컬 아이디의 식별 과정을 설명하기 위한 도면이다.17 is a diagram for explaining a process of identifying a physical ID through a sync target and a VPID table.

도 17을 참조하면, L3 싱크 타겟(Sm_V)는 동기화 신호를 보내는 뉴럴 프로세서 각각이 생성한 신호일 수 있다. 즉, L3 싱크 타겟(Sm_V)는 예를 들어 4개의 필드를 포함할 수 있다. 이는 동일한 세트에 4개의 뉴럴 프로세서가 있다는 점에 기인할 수 있다. L3 싱크 타겟(Sm_V)의 각각의 필드는 제1 내지 제4 가상 아이디(VP0~VP3)에 대응할 수 있다. 즉, L3 싱크 타겟(Sm_V)에 1, 0, 1, 1이 기재되었다면, 제1 내지 제4 가상 아이디(VP0~VP3)에는 역순으로 1, 1, 0, 1이 각각 대응될 수 있다.Referring to FIG. 17 , the L3 sync target Sm_V may be a signal generated by each neural processor sending a synchronization signal. That is, the L3 sync target (Sm_V) may include, for example, 4 fields. This can be attributed to the fact that there are 4 neural processors in the same set. Each field of the L3 sync target Sm_V may correspond to first to fourth virtual IDs VP0 to VP3. That is, if 1, 0, 1, 1 are described in the L3 sync target Sm_V, 1, 1, 0, 1 may correspond to the first to fourth virtual IDs VP0 to VP3 in reverse order, respectively.

L3 싱크 타겟(Sm_V)의 '1'의 의미는 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 전달되어야 하는 뉴럴 프로세서(1000)의 가상 아이디를 표시하는 것일 수 있다. 즉, 1, 0, 1, 1 중 가장 마지막 1은 제1 가상 아이디(VP0)의 뉴럴 프로세서에 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 전달되어야 한다는 의미일 수 있다. 즉, 제3 가상 아이디(VP2)의 뉴럴 프로세서를 제외하고 나머지 3개의 뉴럴 프로세서에 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 전달되어야 함이 1, 0, 1, 1에서 표현될 수 있다.A meaning of '1' of the L3 sync target Sm_V may indicate a virtual ID of the neural processor 1000 to which a synchronization signal according to the L3 sync target Sm_V should be delivered. That is, the last 1 among 1, 0, 1, and 1 may mean that a synchronization signal according to the L3 sync target Sm_V should be transmitted to the neural processor of the first virtual ID VP0. That is, it can be represented by 1, 0, 1, 1 that the synchronization signal according to the L3 sync target Sm_V should be delivered to the remaining three neural processors except for the neural processor of the third virtual ID VP2.

L3 싱크 타겟(Sm_V)에 따른 동기화 신호를 보내야 하는 뉴럴 프로세서는 L3 싱크 타겟(Sm_V)에 의해서 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 전달되어야 하는 뉴럴 프로세서의 가상 아이디가, 제1, 제2 및 제4 가상 아이디(VP0, VP1, VP3)로 식별된 이후에는 VPID 테이블(TB_VTP)을 통해서 해당되는 뉴럴 프로세서의 피지컬 아이디를 확인할 수 있다. 뉴럴 프로세서는 피지컬 아이디를 확인하여야 실제 어드레스를 확인할 수 있을 수 있다.The virtual IDs of the neural processors to which the synchronization signal according to the L3 sync target Sm_V should be transmitted are the first and second neural processors to which the synchronization signal according to the L3 sync target Sm_V should be transmitted. And after being identified as the fourth virtual IDs (VP0, VP1, VP3), the physical ID of the corresponding neural processor can be checked through the VPID table (TB_VTP). The neural processor can check the real address only after checking the physical ID.

VPID 테이블(TB_VTP)이 3, 0, 1, 2의 값을 가지고 있으므로, 제1, 제2 및 제4 가상 아이디(VP0, VP1, VP3)의 피지컬 아이디가 각각 2, 1, 3임을 알 수 있다. 즉, 제2 내지 제4 뉴럴 프로세서(PP1~PP3)가 L3 싱크 타겟(Sm_V)에 따른 동기화 신호를 수신하는 뉴럴 프로세서일 수 있다.Since the VPID table (TB_VTP) has values of 3, 0, 1, and 2, it can be seen that the physical IDs of the first, second, and fourth virtual IDs (VP0, VP1, and VP3) are 2, 1, and 3, respectively. . That is, the second to fourth neural processors PP1 to PP3 may be neural processors that receive synchronization signals according to the L3 sync target Sm_V.

도 18은 딥러닝 작업의 순서를 설명하기 위한 유향 비순환 그래프이다.18 is a directed acyclic graph for explaining the sequence of deep learning tasks.

도 18을 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 연산 작업은 유향 비순환 그래프를 통해서 표현될 수 있다. 이때, 현재 작업이 TaskN이라고 표현된다면, 이전의 작업은 Task(N-1)이고, 다음 작업은 Task(N+1)일 수 있다.Referring to FIG. 18 , a calculation task of a neural processing apparatus according to some embodiments of the present invention may be expressed through a directed acyclic graph. At this time, if the current task is expressed as TaskN, the previous task may be Task(N-1) and the next task may be Task(N+1).

즉, 현재의 작업인 TaskN이 수행되기 위해서는 Task(N-1)이 종료되어야 하고, 마찬가지로 다음 작업인 Task(N+1)이 수행되기 위해서는 현재의 작업인 TaskN이 완료되어야 한다.That is, in order for the current task, TaskN, to be performed, Task(N-1) must be completed, and similarly, in order for the next task, Task(N+1), to be performed, the current task, TaskN, must be completed.

따라서, 각각의 작업이 완료되었다는 동기화 신호가 작업을 수행한 뉴럴 프로세서로부터 전송이 되어야 하고, 동기화 신호는 다음 작업을 수행하여야 하는 디펜던시 체인에 의해서 정해질 수 있다. 이에 따라서, L3 싱크 타겟(Sm_V)는 다음 작업을 수행하여야 하는 뉴럴 프로세서에 대한 정보가 라이트(write)된 인스트럭션일 수 있다. L3 싱크 타겟(Sm_V)에 값이 라이트되면 그에 따라 동기화 신호가 전송될 수 있다.Therefore, a synchronization signal indicating that each task has been completed must be transmitted from the neural processor that performed the task, and the synchronization signal can be determined by a dependency chain in which the next task must be performed. Accordingly, the L3 sync target Sm_V may be an instruction in which information about a neural processor to perform the next task is written. When a value is written to the L3 sync target (Sm_V), a synchronization signal may be transmitted accordingly.

도 19는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L3 동기화를 위한 싱크 타겟에 따른 동기화 신호 송신 동작을 설명하기 위한 개념도이다.19 is a conceptual diagram illustrating a synchronization signal transmission operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.

도 19를 참조하면, 제1 뉴럴 프로세서(1000)가 싱크 타겟(Sm_V)에 따른 동기화 신호를 제2 내지 제4 뉴럴 프로세서(PP1~PP3)로 전송할 수 있다. 이를 통해서 SoC 레벨 즉, L3(level 3)의 동기화가 수행될 수 있다. Referring to FIG. 19 , the first neural processor 1000 may transmit synchronization signals according to the sync target Sm_V to the second to fourth neural processors PP1 to PP3. Through this, synchronization of the SoC level, that is, level 3 (L3) can be performed.

본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 제2 내지 제4 뉴럴 프로세서(PP1~PP3)에 각각 대응하는 제1 내지 제3 세마포어 메모리(smp1~smp3)를 포함할 수 있다. 제1 내지 제3 세마포어 메모리(smp1~smp3)는 제2 내지 제4 뉴럴 프로세서(PP1~PP3) 각각에 포함될 수 있다. 제1 내지 제3 세마포어 메모리(smp1~smp3)는 서로 동일한 형태를 가질 수 있다. 따라서, 이하 제1 세마포어 메모리(smp1)에 대해서만 상세히 설명한다.A neural processing apparatus according to some embodiments of the present invention may include first to third semaphore memories smp1 to smp3 respectively corresponding to the second to fourth neural processors PP1 to PP3. The first to third semaphore memories smp1 to smp3 may be included in each of the second to fourth neural processors PP1 to PP3. The first to third semaphore memories smp1 to smp3 may have the same shape as each other. Therefore, only the first semaphore memory smp1 will be described in detail below.

제1 세마포어 메모리(smp1)는 제2 뉴럴 프로세서(1000)에 대응할 수 있다. 제1 세마포어 메모리(smp1)는 제1 세트(Set1)에 포함된 4개의 뉴럴 프로세서에 각각 대응하는 4개의 필드를 포함할 수 있다.The first semaphore memory smp1 may correspond to the second neural processor 1000 . The first semaphore memory smp1 may include four fields respectively corresponding to the four neural processors included in the first set Set1.

예를 들어, 제1 세마포어 메모리(smp1)는 제1 내지 제4 필드를 포함하고, 제1 내지 제4 필드는 각각 제1 내지 제4 뉴럴 프로세서(PP0~PP3)에 대응할 수 있다. 즉, 제1 내지 제4 필드는 제1 내지 제4 뉴럴 프로세서(PP0~PP3)의 피지컬 아이디와 동일한 순서로 정렬될 수 있다.For example, the first semaphore memory smp1 may include first to fourth fields, and the first to fourth fields may respectively correspond to the first to fourth neural processors PP0 to PP3. That is, the first to fourth fields may be arranged in the same order as the physical IDs of the first to fourth neural processors PP0 to PP3.

즉, 제1 세마포어 메모리(smp1)의 제1 필드는 제1 뉴럴 프로세서(1000)에 대한 부분으로 제1 뉴럴 프로세서(1000)로부터 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 수신되면 1로 표현되고, 아니면 0으로 표현될 수 있다. 물론, 이와 반대로 표현하는 것도 가능할 수 있다.That is, the first field of the first semaphore memory smp1 is a part for the first neural processor 1000 and is expressed as 1 when a synchronization signal according to the L3 sync target Sm_V is received from the first neural processor 1000. , or can be expressed as 0. Of course, the opposite expression may also be possible.

마찬가지로, 제2 세마포어 메모리(smp2) 및 제3 세마포어 메모리(smp3)의 제1 필드값도 제1 뉴럴 프로세서(1000)에 의해서 L3 싱크 타겟(Sm_V)에 따른 동기화 신호를 수신하여 1로 표시될 수 있다. 이와 같이, 제1 세마포어 메모리(smp1)의 1, 0, 1, 1의 표시는 제1, 제3 및 제4 뉴럴 프로세서(PP0, PP2, PP3)에 의해서 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 수신됨을 의미할 수 있다.Similarly, the first field value of the second semaphore memory smp2 and the third semaphore memory smp3 may also be displayed as 1 by receiving a synchronization signal according to the L3 sync target Sm_V by the first neural processor 1000. there is. In this way, the indication of 1, 0, 1, 1 of the first semaphore memory smp1 is a synchronization signal according to the L3 sync target Sm_V by the first, third, and fourth neural processors PP0, PP2, and PP3. may mean that is received.

현재 작업인 TaskN이 종료되면, 제1 뉴럴 프로세서(1000)는 다음 작업인 Task(N+1)의 시작을 위해서 L3 싱크 타겟(Sm_V)에 따른 동기화 신호를 도 4의 L3 싱크 채널(6300)을 통해서 전송할 수 있다. 이러한 동기화는 다른 뉴럴 프로세서(1000)들에 의해서도 각각 수행될 수 있다.When the current task, TaskN, is finished, the first neural processor 1000 sends a synchronization signal according to the L3 sync target (Sm_V) through the L3 sync channel 6300 of FIG. 4 to start the next task, Task (N+1). can be transmitted through Such synchronization may also be performed by other neural processors 1000, respectively.

본 실시예의 뉴럴 프로세싱 장치의 동기화 작업은 중앙에서 제어하는 제어 프로세서가 따로 존재하지 않으므로 병렬적으로 수행할 수 있어 레이턴시의 발생을 최소화할 수 있다. 또한, 이러한 동기화에 의한 작업의 디펜던시를 고려하여 스케쥴링을 해야하는 오버헤드도 요구되지 않아 장치 전체의 효율이 극대화될 수 있다.Synchronization of the neural processing device according to the present embodiment can be performed in parallel since there is no centrally controlled control processor, thereby minimizing the occurrence of latency. In addition, the efficiency of the entire device can be maximized because the overhead of scheduling in consideration of the dependencies of tasks due to such synchronization is not required.

도 20은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L3 동기화를 위한 싱크 타겟에 따른 동기화 신호 수신 동작을 설명하기 위한 개념도이다.20 is a conceptual diagram for explaining a synchronization signal reception operation according to a sync target for L3 synchronization of a neural processing apparatus according to some embodiments of the present invention.

도 20을 참조하면, 제1 뉴럴 프로세서(1000)는 제1, 제3 및 제4 뉴럴 프로세서(PP0, PP2, PP3)로부터 동기화 신호를 수신할 수 있다. 이에 따라서, 제1 뉴럴 프로세서(1000)에 대응하는 제1 세마포어 메모리(smp1)의 제1 내지 제4 필드는 각각 1, 0, 1, 1로 채워질 수 있다.Referring to FIG. 20 , the first neural processor 1000 may receive synchronization signals from the first, third, and fourth neural processors PP0 , PP2 , and PP3 . Accordingly, the first to fourth fields of the first semaphore memory smp1 corresponding to the first neural processor 1000 may be filled with 1, 0, 1, 1, respectively.

본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 제1 내지 제4 필드에 각각 대응하는 제1 내지 제4 FIFO 버퍼(B1~B4)를 포함할 수 있다. 제1 내지 제4 FIFO 버퍼는 FIFO(First In First Out) 방식으로 제1 세마포어 메모리(smp1)의 제1 내지 제4 필드의 값을 각각 제1 뉴럴 프로세서(1000)에 제공할 수 있다.A neural processing apparatus according to some embodiments of the present invention may include first to fourth FIFO buffers B1 to B4 respectively corresponding to the first to fourth fields. The first to fourth FIFO buffers may provide values of the first to fourth fields of the first semaphore memory smp1 to the first neural processor 1000 in a first in first out (FIFO) manner.

일반적으로, 뉴럴 프로세싱 장치의 작업은 도 18과 같이 단순한 직선으로 표현되는 것만은 아니다. 즉, 하나의 작업은 이전의 여러 개의 작업에 따른 디펜던시 체인을 가질 수 있다. 이에 따라서, 하나 이상의 디펜던시 체인을 가지는 작업의 경우 세마포어 메모리가 여러 개가 필요할 수 있다.In general, the work of the neural processing device is not simply expressed as a straight line as shown in FIG. 18 . That is, one task can have a dependency chain according to several previous tasks. Accordingly, in the case of a task having more than one dependency chain, several semaphore memories may be required.

그러나, 세마포어 메모리의 개수가 늘어나면 그만큼 필요한 메모리 공간도 늘어나는 것이어서 작은 공간에 요구되는 리소스가 과다할 수 있다. 이에 따라, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 뉴럴 프로세서 당 1개의 세마포어 메모리에 FIFO 버퍼를 추가하여 메모리 공간의 효율적인 활용을 도모할 수 있다.However, as the number of semaphore memories increases, the required memory space also increases accordingly, so resources required for a small space may be excessive. Accordingly, the neural processing apparatus according to some embodiments of the present invention may promote efficient utilization of memory space by adding a FIFO buffer to one semaphore memory per neural processor.

즉, 여러 개의 디펜던시에 따른 동기화 신호가 FIFO 버퍼에 순차적으로 들어오면 1개의 세마포어 메모리로도 순차적으로 동기화 신호를 놓치지 않고 차례대로 처리할 수 있다. 따라서, 본 실시예는 메모리 효율도 높이면서 여러 개의 디펜던시 체인의 작업도 무리없이 수행할 수 있다.That is, if synchronization signals according to several dependencies are sequentially entered into the FIFO buffer, even one semaphore memory can sequentially process the synchronization signals without missing them. Therefore, this embodiment can perform tasks of several dependency chains without difficulty while increasing memory efficiency.

도 21은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L1 및 L2 동기화를 설명하기 위한 블록도이고, 도 22는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L1 및 L2 동기화를 설명하기 위한 래더 다이어그램이다.21 is a block diagram for explaining L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention, and FIG. 22 describes L1 and L2 synchronization of a neural processing apparatus according to some embodiments of the present invention. It is a ladder diagram for

도 21을 참조하면, 제1 뉴럴 코어(100a)는 제1 뉴럴 코어 스토어 유닛(112b), 제1 뉴럴 코어 로드 유닛(112a), 제1 로컬 메모리(120a), 제1 로컬 메모리 스토어 유닛(111b) 및 제1 로컬 메모리 로드 유닛(111a)을 포함할 수 있다.Referring to FIG. 21 , the first neural core 100a includes a first neural core store unit 112b, a first neural core load unit 112a, a first local memory 120a, and a first local memory store unit 111b. ) and a first local memory load unit 111a.

유사하게, 제2 뉴럴 코어(100b)는 제2 뉴럴 코어 스토어 유닛(112d), 제2 뉴럴 코어 로드 유닛(112c), 제2 로컬 메모리(120b), 제2 로컬 메모리 스토어 유닛(111d) 및 제2 로컬 메모리 로드 유닛(111c)을 포함할 수 있다.Similarly, the second neural core 100b includes a second neural core store unit 112d, a second neural core load unit 112c, a second local memory 120b, a second local memory store unit 111d, and a second neural core load unit 112c. 2 local memory load units 111c may be included.

제2 뉴럴 코어(100b)의 제2 뉴럴 코어 스토어 유닛(112d)이 L1 싱크 요청 신호를 생성한다(S10).The second neural core store unit 112d of the second neural core 100b generates an L1 sync request signal (S10).

L1 싱크 요청(sync request) 신호는 추후에 L1 싱크 생성(sync generate) 신호가 오면 그때, 동기화가 되고 그전까지는 대기(stall) 상태로 유지시킬 수 있다. 즉, 동기화를 위한 준비 상태에 L1 싱크 요청 신호가 생성될 수 있다.The L1 sync request signal is synchronized when an L1 sync generate signal is received later, and can be maintained in a stall state until then. That is, the L1 sync request signal may be generated in a ready state for synchronization.

제4 뉴럴 코어(100d)의 제4 뉴럴 코어 로드 유닛(112f)이 L2 싱크 요청 신호를 생성할 수 있다(S11).The fourth neural core load unit 112f of the fourth neural core 100d may generate an L2 sync request signal (S11).

복수의 뉴럴 코어가 있을 때, 각각의 동기화 준비 시점은 다를 수 있다. 당연히, 제4 뉴럴 코어(100d)처럼 일찍 L2 싱크 요청 신호가 생성될 수도 있다.When there are a plurality of neural cores, each synchronization preparation time may be different. Naturally, the L2 sync request signal may be generated early like the fourth neural core 100d.

이어서, 제2 로컬 메모리 스토어 유닛(111d)이 제2 로컬 메모리(120b)에 데이터를 저장한다(S12, ①). 이어서, 제2 로컬 메모리 스토어 유닛(111d)은 제2 뉴럴 코어 스토어 유닛(112d)에게 L1 싱크 생성 신호를 전송한다(S13, ②). 이때 L1 싱크 생성 신호는 L1 싱크 패스(L1 Sync Path)를 이용하여 전송될 수 있다. 이에 따라서, 제2 뉴럴 코어 스토어 유닛(112d)의 L1 싱크 요청 신호가 동기화될 수 있다.Subsequently, the second local memory store unit 111d stores data in the second local memory 120b (S12, ①). Subsequently, the second local memory store unit 111d transmits the L1 sync generation signal to the second neural core store unit 112d (S13, ②). In this case, the L1 sync generation signal may be transmitted using an L1 sync path. Accordingly, the L1 sync request signal of the second neural core store unit 112d may be synchronized.

이어서, 제2 뉴럴 코어 스토어 유닛(112d)이 제1 뉴럴 코어(100a)의 제1 뉴럴 코어 로드 유닛(112a), 제3 뉴럴 코어(100c)의 제3 뉴럴 코어 로드 유닛(112e) 및 제4 뉴럴 코어(100d)의 제4 뉴럴 코어 로드 유닛(112f)으로 L2 싱크 생성 신호를 브로드캐스팅할 수 있다(S14, S15, S16, ③). 이때, L2 싱크 생성 신호는 L2 싱크 패스(300)를 통해서 전송될 수 있다.Subsequently, the second neural core store unit 112d includes the first neural core load unit 112a of the first neural core 100a, the third neural core load unit 112e of the third neural core 100c, and the fourth neural core load unit 112e of the third neural core 100c. The L2 sync generation signal may be broadcast to the fourth neural core load unit 112f of the neural core 100d (S14, S15, S16, ③). At this time, the L2 sync generation signal may be transmitted through the L2 sync pass 300 .

이때, 이미 L2 싱크 요청 신호가 생성된 제4 뉴럴 코어(100d)는 바로 동기화가 진행되어 로드 작업이 수행된다(S17).At this time, the fourth neural core 100d for which the L2 sync request signal has already been generated is immediately synchronized and a load operation is performed (S17).

이와 달리, 제1 뉴럴 코어(100a) 및 제3 뉴럴 코어(100c)는 L2 싱크 요청 신호가 생성될 때(S18), 로드 작업이 수행될 수 있다(S19, ④, ⑤) In contrast, when the L2 sync request signal is generated (S18), the first neural core 100a and the third neural core 100c may perform a load task (S19, ④, ⑤)

로드 작업은 제1 뉴럴 코어 로드 유닛(112a)이 로컬 인터커넥션(200)을 통해서 제2 로컬 메모리(120b)에 데이터 요청을 수행하고(④), 요청에 대한 데이터 회신을 수신할 수 있다(⑤). In the load operation, the first neural core load unit 112a may request data from the second local memory 120b through the local interconnection 200 (④) and receive a data reply to the request (⑤). ).

유사하게 제3 뉴럴 코어(100c)도 L2 싱크 요청 신호가 생성될 때(S20), 로드 작업이 수행될 수 있다(S21).Similarly, when the L2 sync request signal is generated in the third neural core 100c (S20), a load operation may be performed (S21).

본 실시예의 L2(레벨 2)의 동기화와 L1(레벨 1)의 동기화 모두 제어 프로세서에 의해서 관리되는 것이 아니라 각각의 엘리먼트들이 병렬적으로 수행하는 것이라 레이턴시와 효율 면에서 큰 이점을 가져올 수 있다.Both synchronization of L2 (level 2) and synchronization of L1 (level 1) of this embodiment are not managed by the control processor, but each element performs them in parallel, which can bring great advantages in terms of latency and efficiency.

도 23은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 명령어 집합 구조를 설명하기 위한 도면이다.23 is a diagram for explaining an instruction set structure of a neural processing apparatus according to some embodiments of the present invention.

도 23을 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 명령어 집합 구조(ISA, Instruction set architecture)는 오퍼레이션 코드(opcode), L1 싱크 타겟(Target for L1 SYNC), L2 싱크 타겟(Target for L2 SYNC) 및 L3 싱크 타겟(Target for L3 SYNC)을 포함할 수 있다. 즉, 명령어 집합의 구조에 레벨 1 내지 3까지의 싱크 타겟이 모두 포함될 수 있다. 23, an instruction set architecture (ISA) of a neural processing device according to some embodiments of the present invention includes an operation code (opcode), an L1 sync target (Target for L1 SYNC), and an L2 sync target ( Target for L2 SYNC) and L3 sync target (Target for L3 SYNC). That is, sync targets of levels 1 to 3 may all be included in the structure of the instruction set.

도 24는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조를 설명하기 위한 블록도이다.24 is a block diagram for explaining a software layer structure of a neural processing apparatus according to some embodiments of the present invention.

도 24를 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 소프트웨어 계층 구조는 DL 프레임워크(10000), 컴파일러 스택(20000) 및 백엔드 모듈(30000)을 포함할 수 있다.Referring to FIG. 24 , a software layer structure of a neural processing apparatus 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 a user. For example, a trained neural network may be created using a program such as TensorFlow or PyTorch.

컴파일러 스택(20000)은 어댑테이션 레이어(21000), 컴퓨트 라이브러리(22000), 프론트엔드 컴파일러(23000), 백엔드 컴파일러(24000) 및 런타임 드라이버(25000)를 포함할 수 있다.The compiler stack 20000 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 may quantize the user's neural network model generated in the DL framework 10000 and perform graph correction. Also, the adaptation layer 21000 may convert a model type into a required type.

프론트엔드 컴파일러(23000)는 어댑테이션 레이어(21000)에서 전달받은 다양한 신경망 모델 및 그래프를 일정한 중간 표현(intermediate representation, IR)으로 변환해줄 수 있다. 변환된 IR은 추후 백엔드 컴파일러(24000)에서 다루기 쉬운 미리 설정된 표현일 수 있다. The front-end compiler 23000 may convert various neural network models and graphs transmitted from the adaptation layer 21000 into a constant intermediate representation (IR). The converted IR may be a preset expression that is easy to handle in the backend compiler 24000 later.

이러한, 프론트엔드 컴파일러(23000)의 IR은 그래프 차원에서 미리 할 수 있는 최적화가 수행될 수 있다. 또한, 프론트엔드 컴파일러(23000)는 하드웨어에 최적화된 레이아웃으로 변환시키는 작업을 통해서 최종적으로 IR을 생성할 수 있다.The IR of the front-end compiler 23000 may be preliminarily optimized at the graph level. In addition, the front-end compiler 23000 may finally generate an IR through an operation of converting the layout into a hardware-optimized layout.

벡엔드 컴파일러(24000)는 프론트엔드 컴파일러(23000)에서 변환된 IR을 최적화하고 바이너리 파일로 변환하여 런타임 드라이버가 사용할 수 있게 한다. 백엔드 컴파일러(24000)는 하드웨어의 세부 사항에 맞는 스케일로 잡(job)을 분할하여 최적화된 코드를 생성할 수 있다. The backend compiler 24000 optimizes the IR converted by the frontend compiler 23000 and converts it into a binary file so that the runtime driver can use it. The backend compiler 24000 may generate optimized code by dividing a job into a scale suitable for hardware details.

컴퓨트 라이브러리(22000)는 여러가지 오퍼레이션 중에 하드웨어에 적합한 형태로 설계된 템플릿 오퍼레이션을 저장할 수 있다. 컴퓨트 라이브러리(22000)는 하드웨어가 필요한 여러 템플릿 오퍼레이션을 벡엔드 컴파일러(24000)에 제공하여 최적화된 코드가 생성될 수 있게 한다.The compute library 22000 may store template operations designed in a form suitable for hardware among various operations. The compute library 22000 provides the backend compiler 24000 with several template operations that require hardware to generate optimized codes.

런타임 드라이버(25000)는 구동 중에 계속해서 모니터링을 수행하여 본 발명의 몇몇 실시예들에 따른 뉴럴 네트워크 장치의 구동을 수행할 수 있다. 구체적으로, 뉴럴 네트워크 장치의 인터페이스의 실행을 담당할 수 있다.The runtime driver 25000 may perform continuous monitoring during operation to drive the neural network device according to some embodiments of the present invention. Specifically, it may be responsible for executing interfaces of neural network devices.

백엔드 모듈(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. The ASIC 31000 may refer to a hardware chip determined according to a predetermined design method. The FPGA 32000 may be a programmable hardware chip. The C-model (33000) may refer to a model implemented by imitating hardware on software.

백엔드 모듈(30000)은 컴파일러 스택(20000)을 통해서 생성된 바이너리 코드를 이용하여 다양한 작업을 수행하고 결과를 도출할 수 있다.The backend module 30000 may perform various tasks and derive results using binary codes generated through the compiler stack 20000 .

도 25는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치가 수행하는 딥 러닝 연산을 설명하기 위한 개념도이다.25 is a conceptual diagram for explaining a deep learning operation performed by a neural processing apparatus according to some embodiments of the present invention.

도 25를 참조하면, 인공신경망 모델(40000)은, 기계학습 모델의 일 예로서, 기계학습(Machine Learning) 기술과 인지과학에서, 생물학적 신경망의 구조에 기초하여 구현된 통계학적 학습 알고리즘 또는 그 알고리즘을 실행하는 구조이다.Referring to FIG. 25, the artificial neural network model 40000, as an example of a machine learning model, is a statistical learning algorithm implemented based on the structure of a biological neural network or an algorithm thereof in machine learning technology and cognitive science. is the structure that runs

인공신경망 모델(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 by combining synapses, repeatedly adjust synaptic weights, and between correct outputs corresponding to specific inputs and inferred outputs. By learning to reduce the error of , it is possible to represent a machine learning model having problem solving ability. For example, the artificial neural network model 40000 may include an arbitrary probability model, a neural network model, and the like used in artificial intelligence learning methods such as machine learning and deep learning.

본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 이러한 인공신경망 모델(40000)의 형태를 구현하여 연산을 수행할 수 있다. 예를 들어, 인공신경망 모델(40000)은 입력 영상을 수신하고, 입력 영상에 포함된 대상의 적어도 일부에 대한 정보를 출력할 수 있다.A neural processing apparatus according to some embodiments of the present invention may implement the form of the artificial neural network model 40000 to perform calculations. For example, the artificial neural network model 40000 may receive an input image and output information about at least a part of an object included in the input image.

인공신경망 모델(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) composed of multi-layer nodes and connections between them. The artificial neural network model 40000 according to this embodiment may be implemented using one of various artificial neural network model structures including MLP. As shown in FIG. 25, the artificial neural network model 40000 includes an input layer 41000 that receives input signals or data 40100 from the outside, and an output layer that outputs output signals or data 40200 corresponding to the input data. (44000), which is located between the input layer 41000 and the output layer 44000, receives signals from the input layer 41000, extracts characteristics, and delivers n (where n is a positive integer) to the output layer 44000. It is composed of hidden layers (42000 to 43000). Here, the output layer 44000 receives signals from the hidden layers 42000 to 43000 and outputs them to the outside.

인공신경망 모델(40000)의 학습 방법에는, 교사 신호(정답)의 입력에 의해서 문제의 해결에 최적화되도록 학습하는 지도 학습(Supervised Learning) 방법과, 교사 신호를 필요로 하지 않는 비지도 학습(Unsupervised Learning) 방법이 있다. The learning method of the artificial neural network model (40000) includes a supervised learning method that learns to be optimized for problem solving by inputting a teacher signal (correct answer), and an unsupervised learning method that does not require a teacher signal. ) way.

뉴럴 프로세싱 장치는 인공신경망 모델(40000)을 학습시키기 위한 학습 데이터를 시뮬레이션을 통해 직접 생성할 수 있다. 이와 같이, 인공신경망 모델(40000)의 입력층(41000)과 출력층(44000)에 복수의 입력변수와 대응되는 복수의 출력변수가 각각 매칭되고, 입력층(41000), 은닉층(42000 내지 43000) 및 출력층(44000)에 포함된 노드들 사이의 시냅스 값이 조정됨으로써, 특정 입력에 대응한 올바른 출력이 추출될 수 있도록 학습될 수 있다. 이러한 학습 과정을 통해, 인공신경망 모델(40000)의 입력변수에 숨겨져 있는 특성을 파악할 수 있고, 입력변수에 기초하여 계산된 출력변수와 목표 출력 간의 오차가 줄어들도록 인공신경망 모델(40000)의 노드들 사이의 시냅스 값(또는 웨이트)을 조정할 수 있다. The neural processing apparatus may directly generate learning data for learning the artificial neural network model 40000 through simulation. In this way, a plurality of output variables corresponding to a plurality of input variables are matched in the input layer 41000 and the output layer 44000 of the artificial neural network model 40000, respectively, and the input layer 41000, hidden layers 42000 to 43000 and By adjusting synapse values between nodes included in the output layer 44000, learning can be performed so that a correct output corresponding to a specific input can be extracted. Through this learning process, the characteristics hidden in the input variables of the artificial neural network model 40000 can be identified, and the nodes of the artificial neural network model 40000 can reduce the error between the output variable calculated based on the input variable and the target output. You can adjust the synaptic value (or weight) between them.

도 26은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 뉴럴 네트워크의 학습 및 추론 동작을 설명하기 위한 개념도이다.26 is a conceptual diagram for explaining learning and reasoning operations of a neural network of a neural processing apparatus according to some embodiments of the present invention.

도 26을 참조하면, 학습 과정(Training Phase)에서는 다수의 학습 자료(TD)들이 인공신경망 모델(NN)로 포워딩되고, 다시 백워딩되는 과정을 거칠 수 있다. 이를 통해서 인공신경망 모델(NN)의 각 노드의 웨이트와 바이어스들이 조율되고 이를 통해서 점점 더욱 정확한 결과를 도출할 수 있게 학습이 수행될 수 있다. 이렇게 학습 과정(Training Phase)을 통해서 인공신경망 모델(NN)은 학습된 신경망 모델(NN_T)로 변환될 수 있다. Referring to FIG. 26 , in a training phase, a plurality of training materials (TD) may be forwarded to an artificial neural network model (NN) and then forwarded again. Through this, weights and biases of each node of the artificial neural network model (NN) are tuned, and through this, learning can be performed so that more and more accurate results can be derived. In this way, through the training phase, the artificial neural network model (NN) may 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 may be input to the learned neural network model NN_T again. The learned neural network model NN_T may derive result data RD through already learned weights and biases by taking new data ND as an input. For the result data RD, it may be important which learning material TD was used in the training phase and how many of the learning materials TD were used.

이하, 도 17, 도 19, 도 20, 도 27 및 도 28을 참조하여, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 동기화 방법을 설명한다. 상술한 실시예와 중복되는 부분은 간략히 하거나 생략한다.Hereinafter, a synchronization method of a neural processing apparatus according to some embodiments of the present invention will be described with reference to FIGS. 17, 19, 20, 27, and 28 . Parts overlapping with the above-described embodiment are simplified or omitted.

도 27은 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 동기화 방법을 설명하기 위한 순서도이고, 도 28은 도 27의 L3 싱크 타겟 저장 단계 및 FIFO 방식으로 제공 단계를 세부적으로 설명하기 위한 순서도이다.27 is a flowchart illustrating a synchronization method of a neural processing apparatus according to some embodiments of the present invention, and FIG. 28 is a flowchart illustrating in detail the L3 sync target storage step and the FIFO method providing step of FIG. 27 .

도 27을 참조하면, 제1 뉴럴 프로세서가 L3 싱크 타겟을 생성한다(S100).Referring to FIG. 27 , the first neural processor generates an L3 sync target (S100).

구체적으로, 도 17을 참조하면, L3 싱크 타겟(Sm_V)는 동기화 신호를 보내는 뉴럴 프로세서 각각이 생성한 신호일 수 있다. 즉, L3 싱크 타겟(Sm_V)는 예를 들어 4개의 필드를 포함할 수 있다. 이는 동일한 세트에 4개의 뉴럴 프로세서가 있다는 점에 기인할 수 있다. L3 싱크 타겟(Sm_V)의 각각의 필드는 제1 내지 제4 가상 아이디(VP0~VP3)에 대응할 수 있다. 즉, L3 싱크 타겟(Sm_V)에 1, 0, 1, 1이 기재되었다면, 제1 내지 제4 가상 아이디(VP0~VP3)에는 역순으로 1, 1, 0, 1이 각각 대응될 수 있다.Specifically, referring to FIG. 17 , the L3 sync target Sm_V may be a signal generated by each neural processor sending a synchronization signal. That is, the L3 sync target (Sm_V) may include, for example, 4 fields. This can be attributed to the fact that there are 4 neural processors in the same set. Each field of the L3 sync target Sm_V may correspond to first to fourth virtual IDs VP0 to VP3. That is, if 1, 0, 1, 1 are described in the L3 sync target Sm_V, 1, 1, 0, 1 may correspond to the first to fourth virtual IDs VP0 to VP3 in reverse order, respectively.

다시, 도 27을 참조하면, L3 싱크 타겟과 VPID 테이블을 이용하여 수신 대상인 제2 뉴럴 프로세서를 식별한다(S200).Referring again to FIG. 27 , a second neural processor to be received is identified using the L3 sync target and the VPID table (S200).

구체적으로, 도 17을 참조하면, L3 싱크 타겟(Sm_V)에 따른 동기화 신호를 보내야 하는 뉴럴 프로세서는 L3 싱크 타겟(Sm_V)에 의해서 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 전달되어야 하는 뉴럴 프로세서의 가상 아이디가, 제1, 제2 및 제4 가상 아이디(VP0, VP1, VP3)로 식별된 이후에는 VPID 테이블(TB_VTP)을 통해서 해당되는 뉴럴 프로세서의 피지컬 아이디를 확인할 수 있다. 뉴럴 프로세서는 피지컬 아이디를 확인하여야 실제 어드레스를 확인할 수 있을 수 있다.Specifically, referring to FIG. 17 , a neural processor that needs to send a synchronization signal according to the L3 sync target Sm_V is a neural processor to which a synchronization signal according to the L3 sync target Sm_V should be transmitted by the L3 sync target Sm_V. After the virtual IDs are identified as the first, second, and fourth virtual IDs (VP0, VP1, and VP3), the physical ID of the corresponding neural processor can be checked through the VPID table (TB_VTP). The neural processor can check the real address only after checking the physical ID.

VPID 테이블(TB_VTP)이 3, 0, 1, 2의 값을 가지고 있으므로, 제1, 제2 및 제4 가상 아이디(VP0, VP1, VP3)의 피지컬 아이디가 각각 2, 1, 3임을 알 수 있다. 즉, 제2 내지 제4 뉴럴 프로세서(PP1~PP3)가 L3 싱크 타겟(Sm_V)에 따른 동기화 신호를 수신하는 뉴럴 프로세서일 수 있다.Since the VPID table (TB_VTP) has values of 3, 0, 1, and 2, it can be seen that the physical IDs of the first, second, and fourth virtual IDs (VP0, VP1, and VP3) are 2, 1, and 3, respectively. . That is, the second to fourth neural processors PP1 to PP3 may be neural processors that receive synchronization signals according to the L3 sync target Sm_V.

다시, 도 27을 참조하면, L3 싱크 채널을 통해서 제2 뉴럴 프로세서의 세마포어 메모리에 L3 싱크 타겟에 따른 동기화 신호를 저장시킨다(S300).Referring again to FIG. 27, the synchronization signal according to the L3 sync target is stored in the semaphore memory of the second neural processor through the L3 sync channel (S300).

구체적으로, 도 19를 참조하면, 제1 세마포어 메모리(smp1)는 제1 내지 제4 필드를 포함하고, 제1 내지 제4 필드는 각각 제1 내지 제4 뉴럴 프로세서(PP0~PP3)에 대응할 수 있다. 즉, 제1 내지 제4 필드는 제1 내지 제4 뉴럴 프로세서(PP0~PP3)의 피지컬 아이디와 동일한 순서로 정렬될 수 있다.Specifically, referring to FIG. 19 , the first semaphore memory smp1 may include first to fourth fields, and the first to fourth fields may respectively correspond to the first to fourth neural processors PP0 to PP3. there is. That is, the first to fourth fields may be arranged in the same order as the physical IDs of the first to fourth neural processors PP0 to PP3.

즉, 제1 세마포어 메모리(smp1)의 제1 필드는 제1 뉴럴 프로세서(1000)에 대한 부분으로 제1 뉴럴 프로세서(1000)로부터 L3 싱크 타겟(Sm_V)에 따른 동기화 신호가 수신되면 1로 표현되고, 아니면 0으로 표현될 수 있다. 물론, 이와 반대로 표현하는 것도 가능할 수 있다.That is, the first field of the first semaphore memory smp1 is a part for the first neural processor 1000 and is expressed as 1 when a synchronization signal according to the L3 sync target Sm_V is received from the first neural processor 1000. , or can be expressed as 0. Of course, the opposite expression may also be possible.

다시, 도 27을 참조하면, 세마포어 메모리의 값을 FIFO 방식으로 제2 뉴럴 프로세서에 제공한다(S400).Again, referring to FIG. 27, the value of the semaphore memory is provided to the second neural processor in a FIFO method (S400).

구체적으로, 도 20을 참조하면, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치는 제1 내지 제4 필드에 각각 대응하는 제1 내지 제4 FIFO 버퍼(B1~B4)를 포함할 수 있다. 제1 내지 제4 FIFO 버퍼는 FIFO(First In First Out) 방식으로 제1 세마포어 메모리(smp1)의 제1 내지 제4 필드의 값을 각각 제1 뉴럴 프로세서(1000)에 제공할 수 있다.Specifically, referring to FIG. 20 , the neural processing apparatus according to some embodiments of the present invention may include first to fourth FIFO buffers B1 to B4 respectively corresponding to the first to fourth fields. The first to fourth FIFO buffers may provide values of the first to fourth fields of the first semaphore memory smp1 to the first neural processor 1000 in a first in first out (FIFO) manner.

도 28을 참조하여, S300 단계와 S400 단계를 세부적으로 설명한다.Referring to FIG. 28, steps S300 and S400 will be described in detail.

제2 뉴럴 프로세서의 세마포어 메모리의 제1 필드에 제1 뉴럴 프로세서의 L1 싱크 타겟에 따른 동기화 신호를 저장하고(S310), 세마포어 메모리의 제1 필드 값을 FIFO 방식으로 제2 뉴럴 프로세서에 제공한다(S410).The synchronization signal according to the L1 sync target of the first neural processor is stored in the first field of the semaphore memory of the second neural processor (S310), and the first field value of the semaphore memory is provided to the second neural processor in a FIFO manner ( S410).

유사하게, 제2 뉴럴 프로세서의 세마포어 메모리의 제2 필드에 제2 뉴럴 프로세서의 L1 싱크 타겟에 따른 동기화 신호를 저장하고(S320), 세마포어 메모리의 제2 필드 값을 FIFO 방식으로 제2 뉴럴 프로세서에 제공한다(S420).Similarly, the synchronization signal according to the L1 sync target of the second neural processor is stored in the second field of the semaphore memory of the second neural processor (S320), and the value of the second field of the semaphore memory is stored in the second neural processor in a FIFO manner. It is provided (S420).

제2 뉴럴 프로세서의 세마포어 메모리의 제3 필드에 제3 뉴럴 프로세서의 L1 싱크 타겟에 따른 동기화 신호를 저장하고(S330), 세마포어 메모리의 제3 필드 값을 FIFO 방식으로 제2 뉴럴 프로세서에 제공한다(S430).The synchronization signal according to the L1 sync target of the third neural processor is stored in the third field of the semaphore memory of the second neural processor (S330), and the value of the third field of the semaphore memory is provided to the second neural processor in a FIFO method ( S430).

제2 뉴럴 프로세서의 세마포어 메모리의 제4 필드에 제4 뉴럴 프로세서의 L1 싱크 타겟에 따른 동기화 신호를 저장하고(S340), 세마포어 메모리의 제4 필드 값을 FIFO 방식으로 제2 뉴럴 프로세서에 제공한다(S440).The synchronization signal according to the L1 sync target of the fourth neural processor is stored in the fourth field of the semaphore memory of the second neural processor (S340), and the value of the fourth field of the semaphore memory is provided to the second neural processor in a FIFO manner ( S440).

즉, 각각의 필드는 각각의 뉴럴 프로세서에 대응되고 병렬적으로 FIFO 형식으로 동기화가 진행될 수 있다. That is, each field corresponds to each neural processor, and synchronization may be performed in parallel in a FIFO format.

다시, 도 27을 참조하면, 제2 뉴럴 프로세서가 L3 싱크 타겟을 통해 동기화를 수행한다(S500).Again, referring to FIG. 27 , the second neural processor performs synchronization through the L3 sync target (S500).

이하, 도 21, 도 22, 도 29 및 도 30을 참조하여, 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 동기화 방법을 설명한다. 상술한 실시예와 중복되는 부분은 간략히 하거나 생략한다.Hereinafter, a synchronization method of a neural processing apparatus according to some embodiments of the present invention will be described with reference to FIGS. 21, 22, 29, and 30 . Parts overlapping with the above-described embodiment are simplified or omitted.

도 29는 본 발명의 몇몇 실시예들에 따른 뉴럴 프로세싱 장치의 L1 및 L2 레벨의 동기화 방법을 설명하기 위한 순서도이고, 도 30은 도 29의 데이터 요청 단계를 세부적으로 설명하기 위한 순서도이다.FIG. 29 is a flowchart illustrating a synchronization method of L1 and L2 levels of a neural processing apparatus according to some embodiments of the present invention, and FIG. 30 is a flowchart illustrating a data request step of FIG. 29 in detail.

도 29를 참조하면, 제1 뉴럴 코어의 로컬 메모리에 데이터가 저장된다(S1100). 이어서, 제1 뉴럴 코어 내에서, 로컬 메모리 스토어 유닛이 L1 싱크 타겟에 따른 동기화 신호를 뉴럴 코어 스토어 유닛으로 전송한다(S1200).Referring to FIG. 29 , data is stored in the local memory of the first neural core (S1100). Subsequently, within the first neural core, the local memory store unit transmits a synchronization signal according to the L1 sync target to the neural core store unit (S1200).

구체적으로, 도 21 및 도 22를 참조하면, 제2 로컬 메모리 스토어 유닛(111d)이 제2 로컬 메모리(120b)에 데이터를 저장한다(S12, ①). 이어서, 제2 로컬 메모리 스토어 유닛(111d)은 제2 뉴럴 코어 스토어 유닛(112d)에게 L1 싱크 생성 신호를 전송한다(S13, ②). 이때 L1 싱크 생성 신호는 L1 싱크 패스(L1 Sync Path)를 이용하여 전송될 수 있다. 이에 따라서, 제2 뉴럴 코어 스토어 유닛(112d)의 L1 싱크 요청 신호가 동기화될 수 있다.Specifically, referring to FIGS. 21 and 22 , the second local memory store unit 111d stores data in the second local memory 120b (S12, ①). Subsequently, the second local memory store unit 111d transmits the L1 sync generation signal to the second neural core store unit 112d (S13, ②). In this case, the L1 sync generation signal may be transmitted using an L1 sync path. Accordingly, the L1 sync request signal of the second neural core store unit 112d may be synchronized.

다시, 도 29를 참조하면, 제1 뉴럴 코어의 뉴럴 코어 스토어 유닛이, 제2 내지 제4 뉴럴 코어 각각의 뉴럴 코어 로드 유닛으로 L2 싱크 타겟에 따른 동기화 신호를 전송한다(S1300).Referring again to FIG. 29 , the neural core store unit of the first neural core transmits a synchronization signal according to the L2 sync target to the neural core load units of the second to fourth neural cores (S1300).

구체적으로, 도 21 및 도 22를 참조하면, 이어서, 제2 뉴럴 코어 스토어 유닛(112d)이 제1 뉴럴 코어(100a)의 제1 뉴럴 코어 로드 유닛(112a), 제3 뉴럴 코어(100c)의 제3 뉴럴 코어 로드 유닛(112e) 및 제4 뉴럴 코어(100d)의 제4 뉴럴 코어 로드 유닛(112f)으로 L2 싱크 생성 신호를 브로드캐스팅할 수 있다(S14, S15, S16, ③). 이때, L2 싱크 생성 신호는 L2 싱크 패스(300)를 통해서 전송될 수 있다.Specifically, referring to FIGS. 21 and 22 , the second neural core store unit 112d is configured to load the first neural core load unit 112a of the first neural core 100a and the third neural core 100c. The L2 sync generation signal may be broadcast to the third neural core load unit 112e and the fourth neural core load unit 112f of the fourth neural core 100d (S14, S15, S16, ③). At this time, the L2 sync generation signal may be transmitted through the L2 sync pass 300 .

다시, 도 29를 참조하면, 제2 내지 제4 뉴럴 코어 로드 유닛이 로컬 인터커넥션을 통해서 제1 뉴럴 코어의 로컬 메모리에 데이터를 요청한다(S1400).Referring again to FIG. 29 , the second to fourth neural core load units request data from the local memory of the first neural core through the local interconnection (S1400).

세부적으로 도 30을 참조하면, 제2 뉴럴 코어가 L2 싱크 타겟에 따른 동기화 신호를 수신하고(S1410), L2 싱크 요청 신호가 이미 생성되었는지 판단한다(S1420). 만일 그렇지 않다면, L2 싱크 요청 신호 생성을 대기하고(S1430), 만일 그렇다면, 제2 뉴럴 코어가 제1 뉴럴 코어의 로컬 메모리에 데이터를 요청한다(S1440).Referring to FIG. 30 in detail, the second neural core receives a synchronization signal according to the L2 sync target (S1410) and determines whether an L2 sync request signal has already been generated (S1420). If not, it waits for the L2 sync request signal to be generated (S1430). If so, the second neural core requests data from the local memory of the first neural core (S1440).

다시, 도 29를 참조하면, 제2 내지 제4 뉴럴 코어 로드 유닛이 데이터를 수신한다(S1500).Referring again to FIG. 29 , the second to fourth neural core load units receive data (S1500).

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely an example of the technical idea of the present embodiment, and various modifications and variations can be made to those skilled in the art without departing from the essential characteristics of the present embodiment. Therefore, the present embodiments are not intended to limit the technical idea of the present embodiment, but to explain, and the scope of the technical idea of the present embodiment is not limited by these embodiments. The scope of protection of this embodiment should be construed according to the claims below, and all technical ideas within the scope equivalent thereto should be construed as being included in the scope of rights of this embodiment.

Claims (30)

제1 및 제2 뉴럴 프로세서;first and second neural processors; 상기 제1 및 제2 뉴럴 프로세서가 공유하는 공유 메모리; 및a shared memory shared by the first and second neural processors; and 상기 제1 및 제2 뉴럴 프로세서 각각에 대응하고, L3 싱크 타겟을 수신하여 저장하는 제1 및 제2 세마포어 메모리로서, 상기 L3 싱크 타겟에 따라 상기 제1 및 제2 뉴럴 프로세서의 동기화가 수행되는 제1 및 제2 세마포어 메모리;First and second semaphore memories corresponding to the first and second neural processors and receiving and storing an L3 sync target, wherein synchronization of the first and second neural processors is performed according to the L3 sync target. first and second semaphore memories; 상기 제1 및 제2 뉴럴 프로세서와, 상기 공유 메모리를 연결하고, 상기 L3 싱크 타겟에 따른 동기화 신호가 전송되는 L3 싱크 채널을 포함하는 글로벌 인터커넥션을 포함하는,A global interconnection connecting the first and second neural processors and the shared memory and including an L3 sync channel through which a synchronization signal according to the L3 sync target is transmitted. 뉴럴 프로세싱 장치. Neural Processing Unit. 제1 항에 있어서,According to claim 1, 상기 글로벌 인터커넥션은,The global interconnection, 상기 L3 싱크 채널과,The L3 sync channel; 상기 공유 메모리, 상기 제1 및 제2 뉴럴 프로세서 사이에서 데이터를 전송하는 데이터 채널과,a data channel for transmitting data between the shared memory and the first and second neural processors; 상기 제1 및 제2 뉴럴 프로세서에 컨트롤 신호를 전송하는 컨트롤 채널을 포함하는,A control channel for transmitting a control signal to the first and second neural processors, 뉴럴 프로세싱 장치.Neural Processing Unit. 제1 항에 있어서,According to claim 1, 상기 제1 세마포어 메모리는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 필드를 포함하는,The first semaphore memory includes first and second fields corresponding to the first and second neural processors, respectively. 뉴럴 프로세싱 장치.Neural Processing Unit. 제3 항에 있어서,According to claim 3, 상기 제1 필드의 값을 순차적으로 상기 제1 뉴럴 프로세서에 전달하는 제1 FIFO 버퍼를 더 포함하는,Further comprising a first FIFO buffer for sequentially transferring values of the first field to the first neural processor. 뉴럴 프로세싱 장치.Neural Processing Unit. 제1 항에 있어서,According to claim 1, 상기 L3 싱크 타겟은 제1 및 제2 L3 싱크 타겟을 포함하고,The L3 sync target includes first and second L3 sync targets, 상기 제1 뉴럴 프로세서는 상기 제1 L3 싱크 타겟을 생성하고,The first neural processor generates the first L3 sync target; 상기 제2 뉴럴 프로세서는 상기 제2 L3 싱크 타겟을 생성하는,The second neural processor generates the second L3 sync target. 뉴럴 프로세싱 장치.Neural Processing Unit. 제1 항에 있어서,According to claim 1, 상기 L3 싱크 타겟은 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 싱크 타겟 필드를 포함하고,The L3 sync target includes first and second sync target fields corresponding to the first and second neural processors, respectively; 상기 제1 및 제2 싱크 타겟 필드는 상기 제1 및 제2 뉴럴 프로세서가 상기 L3 싱크 타겟에 따른 동기화 신호를 수신하는 지에 대한 정보를 포함하는,The first and second sync target fields include information on whether the first and second neural processors receive synchronization signals according to the L3 sync target. 뉴럴 프로세싱 장치.Neural Processing Unit. 제6 항에 있어서,According to claim 6, 상기 제1 및 제2 싱크 타겟 필드는 상기 제1 및 제2 뉴럴 프로세서 각각의 가상 아이디 순서대로 정렬되는,The first and second sync target fields are arranged in the order of virtual IDs of the first and second neural processors, respectively. 뉴럴 프로세싱 장치.Neural Processing Unit. 제7 항에 있어서,According to claim 7, 상기 제1 뉴럴 프로세서는 상기 L3 싱크 타겟과 VPID 테이블을 이용하여 상기 L3 싱크 타겟에 따른 동기화 신호를 수신하는 뉴럴 프로세서의 피지컬 아이디를 식별하고,The first neural processor identifies a physical ID of a neural processor receiving a synchronization signal according to the L3 sync target by using the L3 sync target and a VPID table; 상기 VPID 테이블은 상기 가상 아이디와 상기 피지컬 아이디를 변환하기 위한 정보를 포함하는,The VPID table includes information for converting the virtual ID and the physical ID. 뉴럴 프로세싱 장치.Neural Processing Unit. 제1 항에 있어서,According to claim 1, 상기 L3 싱크 타겟은 명령어 집합 구조(Instruction set architecture, ISA)에 포함되는,The L3 sync target is included in the instruction set architecture (ISA), 뉴럴 프로세싱 장치.Neural Processing Unit. 제1 항에 있어서,According to claim 1, 상기 뉴럴 프로세서는,The neural processor, 적어도 하나의 뉴럴 코어와,at least one neural core; 상기 적어도 하나의 뉴럴 코어 사이에서 데이터를 전송하는 로컬 인터커넥션을 포함하는,Including a local interconnection for transmitting data between the at least one neural core, 뉴럴 프로세싱 장치.Neural Processing Unit. 제10 항에 있어서,According to claim 10, 상기 뉴럴 프로세서는,The neural processor, 상기 적어도 하나의 뉴럴 코어 사이의 동기화를 수행하기 위한 L2 싱크 타겟에 따른 동기화 신호가 전송되는 L2 싱크 패스를 더 포함하는,Further comprising an L2 sync pass in which a synchronization signal according to an L2 sync target for performing synchronization between the at least one neural core is transmitted. 뉴럴 프로세싱 장치.Neural Processing Unit. 제10 항에 있어서,According to claim 10, 상기 적어도 하나의 뉴럴 코어 각각은,Each of the at least one neural core, 인풋 액티베이션 및 웨이트를 수신하여 딥러닝 연산을 수행하고, 아웃풋 액티베이션을 출력하는 프로세싱 유닛과,A processing unit that receives input activations and weights, performs deep learning calculations, and outputs output activations; 상기 인풋 액티베이션, 상기 웨이트 및 상기 아웃풋 액티베이션을 일시적으로 저장하는 로컬 메모리를 포함하는,Including a local memory for temporarily storing the input activation, the weight, and the output activation, 뉴럴 프로세싱 장치.Neural Processing Unit. 적어도 하나의 뉴럴 프로세서;at least one neural processor; 공유 메모리; 및shared memory; and 상기 적어도 하나의 뉴럴 프로세서 및 공유 메모리를 연결하고, 상기 뉴럴 프로세서의 L3 동기화에 사용되는 글로벌 인터커넥션을 포함하고,a global interconnection connecting the at least one neural processor and a shared memory and used for L3 synchronization of the neural processor; 상기 뉴럴 프로세서는 적어도 하나의 뉴럴 코어와,The neural processor includes at least one neural core; 상기 적어도 하나의 뉴럴 코어를 연결하는 로컬 인터커넥션과,a local interconnection connecting the at least one neural core; 상기 적어도 하나의 뉴럴 코어의 L2 동기화에 사용되는 L2 싱크 패스를 포함하고,An L2 sync pass used for L2 synchronization of the at least one neural core, 상기 뉴럴 코어는,The neural core, 연산 작업을 수행하는 프로세싱 유닛과,a processing unit that performs computational work; 데이터를 일시적으로 저장하는 로컬 메모리와,a local memory for temporarily storing data; 상기 로컬 메모리 및 상기 프로세싱 유닛의 L1 동기화에 사용되는 L1 싱크 패스를 포함하는,Including an L1 sync pass used for L1 synchronization of the local memory and the processing unit, 뉴럴 프로세싱 장치.Neural Processing Unit. 제13 항에 있어서,According to claim 13, 상기 글로벌 인터커넥션은,The global interconnection, 상기 적어도 하나의 뉴럴 프로세서 및 상기 공유 메모리 사이의 데이터를 전송하는 데이터 채널과,a data channel for transmitting data between the at least one neural processor and the shared memory; 상기 적어도 하나의 뉴럴 프로세서 사이의 컨트롤 신호를 전송하는 컨트롤 채널과,a control channel for transmitting a control signal between the at least one neural processor; 상기 L3 동기화에 사용되는 싱크 채널을 포함하는,Including a sync channel used for the L3 synchronization, 뉴럴 프로세싱 장치.Neural Processing Unit. 제13 항에 있어서,According to claim 13, 상기 뉴럴 프로세서는,The neural processor, 상기 적어도 하나의 뉴럴 코어 사이의 데이터를 전송하는 로컬 인터커넥션을 더 포함하는,Further comprising a local interconnection for transmitting data between the at least one neural core, 뉴럴 프로세싱 장치.Neural Processing Unit. 제13 항에 있어서,According to claim 13, 상기 로컬 메모리와, 상기 프로세싱 유닛을 포함하는 엘리먼트들과의 데이터 교환에 사용되는 데이터 패스를 포함하는,Including a data path used for data exchange between the local memory and elements including the processing unit, 뉴럴 프로세싱 장치.Neural Processing Unit. 제13 항에 있어서,According to claim 13, 상기 적어도 하나의 뉴럴 프로세서는 제1 및 제2 뉴럴 프로세서를 포함하고,The at least one neural processor includes first and second neural processors; 상기 제1 및 제2 뉴럴 프로세서 각각에 대응하고, L3 싱크 타겟에 대응하는 동기화 신호를 수신하여 저장하는 제1 및 제2 세마포어 메모리로서, 상기 제1 및 제2 세마포어 메모리의 값에 따라 상기 제1 및 제2 뉴럴 프로세서의 동기화가 수행되는 제1 및 제2 세마포어 메모리를 더 포함하는,First and second semaphore memories corresponding to the first and second neural processors and receiving and storing a synchronization signal corresponding to an L3 sync target, wherein the first and second semaphore memories correspond to values of the first and second semaphore memories. and first and second semaphore memories in which synchronization of the second neural processor is performed. 뉴럴 프로세싱 장치.Neural Processing Unit. 제17 항에 있어서,According to claim 17, 상기 제1 세마포어 메모리는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 필드를 포함하고,The first semaphore memory includes first and second fields corresponding to the first and second neural processors, respectively; 상기 제1 필드의 값을 순차적으로 상기 제1 뉴럴 프로세서에 전달하는 제1 FIFO 버퍼를 더 포함하는,Further comprising a first FIFO buffer for sequentially transferring values of the first field to the first neural processor. 뉴럴 프로세싱 장치.Neural Processing Unit. 제17 항에 있어서,According to claim 17, 상기 제1 뉴럴 프로세서는 명령어 집합 구조를 전송하고,The first neural processor transmits an instruction set structure; 상기 명령어 집합 구조는, 오퍼레이션 코드, 상기 L3 동기화를 위한 L3 싱크 타겟, 상기 L2 동기화를 위한 L2 싱크 타겟 및 상기 L1 동기화를 위한 L1 싱크 타겟을 포함하는,The instruction set structure includes an operation code, an L3 sync target for the L3 synchronization, an L2 sync target for the L2 synchronization, and an L1 sync target for the L1 synchronization. 뉴럴 프로세싱 장치.Neural Processing Unit. 제1 및 제2 뉴럴 프로세서를 포함하는 뉴럴 프로세싱 장치의 동기화 방법에 있어서,A method for synchronizing a neural processing device including first and second neural processors, 상기 제1 뉴럴 프로세서가 L3 동기화에 대한 L3 싱크 타겟을 생성하고, 상기 L3 싱크 타겟은 상기 제1 및 제2 뉴럴 프로세서의 가상 아이디 순서로 정렬되고,The first neural processor generates an L3 sync target for L3 synchronization, and the L3 sync target is arranged in order of virtual IDs of the first and second neural processors; 상기 L3 싱크 타겟과 VPID 테이블을 이용하여 상기 제2 뉴럴 프로세서의 피지컬 아이디를 식별하되, 상기 VPID 테이블은 뉴럴 프로세서의 상기 가상 아이디와 상기 피지컬 아이디의 변환 테이블이고,Identifying a physical ID of the second neural processor using the L3 sync target and a VPID table, wherein the VPID table is a conversion table between the virtual ID and the physical ID of the neural processor; 글로벌 인터커넥션의 L3 싱크 채널을 통해서, 상기 제2 뉴럴 프로세서의 제1 세마포어 메모리에 상기 L3 싱크 타겟에 따른 동기화 신호를 저장하고,storing a synchronization signal according to the L3 sync target in a first semaphore memory of the second neural processor through an L3 sync channel of a global interconnection; 상기 제2 뉴럴 프로세서가 상기 제1 세마포어 메모리의 값에 따라 L3 동기화를 수행하는 것을 포함하는,The second neural processor performing L3 synchronization according to the value of the first semaphore memory. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제20 항에 있어서,According to claim 20, 상기 제1 세마포어 메모리는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 필드를 포함하는,The first semaphore memory includes first and second fields corresponding to the first and second neural processors, respectively. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제21 항에 있어서,According to claim 21, 상기 L3 동기화를 수행하는 것은,Performing the L3 synchronization, 상기 제1 필드의 값을 FIFO 방식으로 상기 제2 뉴럴 프로세서에 제공하고,Providing the value of the first field to the second neural processor in a FIFO manner; 상기 제2 필드의 값을 FIFO 방식으로 상기 제2 뉴럴 프로세서에 제공하는 것을 포함하는,Including providing the value of the second field to the second neural processor in a FIFO manner. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제20 항에 있어서,According to claim 20, 상기 가상 아이디는 상기 제1 및 제2 뉴럴 프로세서에 각각 대응되는 제1 및 제2 가상 아이디를 포함하는,The virtual ID includes first and second virtual IDs corresponding to the first and second neural processors, respectively. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제20 항에 있어서,According to claim 20, 상기 제1 뉴럴 프로세서는,The first neural processor, 제1 및 제2 뉴럴 코어와,first and second neural cores; 상기 제1 및 제2 뉴럴 코어 사이의 데이터를 전송하는 로컬 인터커넥션과,a local interconnection for transmitting data between the first and second neural cores; 상기 제1 및 제2 뉴럴 코어 사이의 L2 싱크 타겟에 따른 동기화 신호를 전송하는 L2 싱크 패스를 포함하는,Including an L2 sync pass for transmitting a synchronization signal according to an L2 sync target between the first and second neural cores, 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제24 항에 있어서,According to claim 24, 상기 제1 뉴럴 코어는,The first neural core, 제1 인풋 액티베이션 및 제1 웨이트를 수신하여 딥러닝 연산을 수행하고, 제1 아웃풋 액티베이션을 출력하는 제1 프로세싱 유닛과,A first processing unit receiving a first input activation and a first weight, performing a deep learning operation, and outputting a first output activation; 상기 제1 인풋 액티베이션, 상기 제1 웨이트 및 상기 제1 아웃풋 액티베이션을 일시적으로 저장하는 제1 로컬 메모리와,a first local memory temporarily storing the first input activation, the first weight, and the first output activation; 상기 제1 로컬 메모리와 상기 제1 프로세싱 유닛 사이에서 L1 싱크 타겟에 따른 동기화 신호를 전송하는 제1 L1 싱크 패스를 포함하고,A first L1 sync pass for transmitting a synchronization signal according to an L1 sync target between the first local memory and the first processing unit; 상기 제2 뉴럴 코어는,The second neural core, 제2 인풋 액티베이션 및 제2 웨이트를 수신하여 딥러닝 연산을 수행하고, 제2 아웃풋 액티베이션을 출력하는 제2 프로세싱 유닛과,a second processing unit receiving a second input activation and a second weight, performing a deep learning operation, and outputting a second output activation; 상기 제2 인풋 액티베이션, 상기 제2 웨이트 및 상기 제2 아웃풋 액티베이션을 일시적으로 저장하는 제2 로컬 메모리와,a second local memory temporarily storing the second input activation, the second weight, and the second output activation; 상기 제2 로컬 메모리와 상기 제2 프로세싱 유닛 사이에서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하는 제2 L1 싱크 패스를 포함하는,And a second L1 sync pass for transmitting a synchronization signal according to the L1 sync target between the second local memory and the second processing unit. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제25 항에 있어서,According to claim 25, 상기 제1 로컬 메모리에 데이터를 저장하고,Storing data in the first local memory; 상기 제1 뉴럴 코어 내부에서, 상기 제1 L1 싱크 패스를 통해서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하고,Inside the first neural core, a synchronization signal according to the L1 sync target is transmitted through the first L1 sync pass; 상기 제1 뉴럴 코어가 상기 제2 L2 싱크 패스를 통해서, 상기 L2 싱크 타겟에 따른 동기화 신호를 상기 제2 뉴럴 코어로 전송하고,The first neural core transmits a synchronization signal according to the L2 sync target to the second neural core through the second L2 sync pass; 상기 제2 뉴럴 코어가 상기 로컬 인터커넥션을 통해서 데이터를 수신하는 것을 더 포함하는,Further comprising the second neural core receiving data through the local interconnection. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제1 및 제2 뉴럴 코어와, 상기 제1 및 제2 뉴럴 코어를 연결하는 로컬 인터커넥션과, 상기 제1 및 제2 뉴럴 코어의 L2 동기화에 사용되는 L2 싱크 패스를 포함하는 뉴럴 프로세싱 장치로서,A neural processing apparatus including first and second neural cores, a local interconnection connecting the first and second neural cores, and an L2 sync pass used for L2 synchronization of the first and second neural cores, 상기 제1 뉴럴 코어는, 연산 작업을 수행하는 제1 프로세싱 유닛과, 상기 제1 프로세싱 유닛에 입출력되는 데이터를 일시적으로 저장하는 제1 로컬 메모리와, 상기 제1 로컬 메모리 및 상기 제1 프로세싱 유닛의 L1 동기화에 사용되는 제1 L1 싱크 패스를 포함하고,The first neural core includes a first processing unit that performs calculation tasks, a first local memory that temporarily stores data input/output to the first processing unit, and a combination of the first local memory and the first processing unit. Including a first L1 sync pass used for L1 synchronization, 상기 제2 뉴럴 코어는, 연산 작업을 수행하는 제2 프로세싱 유닛과, 상기 제2 프로세싱 유닛에 입출력되는 데이터를 일시적으로 저장하는 제2 로컬 메모리와, 상기 제2 로컬 메모리 및 상기 제2 프로세싱 유닛의 L1 동기화에 사용되는 제2 L1 싱크 패스를 포함하는 뉴럴 프로세싱 장치의 동기화 방법에 있어서,The second neural core includes a second processing unit that performs calculation tasks, a second local memory that temporarily stores data input and output to the second processing unit, the second local memory and the second processing unit. A synchronization method of a neural processing device including a second L1 sync pass used for L1 synchronization, 상기 제1 로컬 메모리에 데이터를 저장하고,Storing data in the first local memory; 상기 제1 뉴럴 코어 내부에서, 상기 제1 L1 싱크 패스를 통해서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하고,Inside the first neural core, a synchronization signal according to the L1 sync target is transmitted through the first L1 sync pass; 상기 제1 뉴럴 코어가 상기 제2 L2 싱크 패스를 통해서, 상기 L2 싱크 타겟에 따른 동기화 신호를 상기 제2 뉴럴 코어로 전송하고,The first neural core transmits a synchronization signal according to the L2 sync target to the second neural core through the second L2 sync pass; 상기 제2 뉴럴 코어가 상기 로컬 인터커넥션을 통해서 데이터를 수신하는 것을 더 포함하는,Further comprising the second neural core receiving data through the local interconnection. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제27 항에 있어서,According to claim 27, 상기 제1 뉴럴 코어는 상기 제1 로컬 메모리와 상기 제1 로컬 인터커넥션 사이에서 데이터를 이동시키는 제1 LSU를 더 포함하고,the first neural core further comprises a first LSU for moving data between the first local memory and the first local interconnection; 상기 제1 LSU는, 상기 제1 로컬 메모리의 저장을 수행하는 제1 로컬 메모리 스토어 유닛과, 상기 제1 뉴럴 코어에서 외부로 저장을 수행하는 제1 뉴럴 코어 스토어 유닛을 포함하고,The first LSU includes a first local memory store unit that stores the first local memory and a first neural core store unit that stores data from the first neural core to the outside; 상기 제1 뉴럴 코어 내부에서, 상기 제1 L1 싱크 패스를 통해서 상기 L1 싱크 타겟에 따른 동기화 신호를 전송하는 것은,Transmitting the synchronization signal according to the L1 sync target through the first L1 sync pass in the first neural core, 상기 제1 로컬 메모리 스토어 유닛이 상기 L1 싱크 타겟에 따른 동기화 신호를 상기 제1 뉴럴 코어 스토어 유닛으로 전송하는 것을 포함하는,Transmitting, by the first local memory store unit, a synchronization signal according to the L1 sync target to the first neural core store unit. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제28 항에 있어서,29. The method of claim 28, 상기 제2 뉴럴 코어는 상기 제2 로컬 메모리와 상기 제2 로컬 인터커넥션 사이에서 데이터를 이동시키는 제2 LSU를 더 포함하고,The second neural core further comprises a second LSU for moving data between the second local memory and the second local interconnection; 상기 제2 LSU는, 상기 제2 뉴럴 코어에서 외부에서의 로드를 수행하는 제2 뉴럴 코어 로드 유닛을 포함하고,The second LSU includes a second neural core load unit that performs an external load on the second neural core; 상기 L2 싱크 타겟에 따른 동기화 신호를 전송하는 것은,Transmitting the synchronization signal according to the L2 sync target, 상기 제1 뉴럴 코어 스토어 유닛이 상기 L2 싱크 타겟에 따른 동기화 신호를 상기 제2 뉴럴 코어 로드 유닛으로 전송하는 것을 포함하는,The first neural core store unit transmits a synchronization signal according to the L2 sync target to the second neural core load unit. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device. 제27 항에 있어서,According to claim 27, 상기 뉴럴 프로세싱 장치는, 상기 제1 및 제2 뉴럴 코어와, 상기 로컬 인터커넥션과, 상기 L2 싱크 패스를 포함하는 제1 뉴럴 프로세서와, 상기 제1 뉴럴 프로세서와 다른 제2 뉴럴 프로세서와, 상기 제1 및 제2 뉴럴 프로세서 사이에서 데이터를 전송하는 글로벌 인터커넥션과, 상기 제1 및 제2 뉴럴 프로세서에 각각 대응하는 제1 및 제2 세마포어 메모리를 포함하고,The neural processing apparatus may include: a first neural processor including the first and second neural cores, the local interconnection, and the L2 sync path; a second neural processor different from the first neural processor; a global interconnection for transmitting data between first and second neural processors, and first and second semaphore memories respectively corresponding to the first and second neural processors; 상기 글로벌 인터커넥션은 상기 제1 및 제2 뉴럴 프로세서 사이에서 데이터, 제어 신호 및 L3 싱크 타겟에 따른 동기화 신호가 각각 전송되는 데이터 채널, 컨트롤 채널 및 L3 싱크 채널을 포함하고,The global interconnection includes a data channel, a control channel, and an L3 sync channel through which data, a control signal, and a synchronization signal according to an L3 sync target are respectively transmitted between the first and second neural processors; 상기 제1 뉴럴 프로세서가 상기 L3 싱크 타겟을 생성하고,The first neural processor generates the L3 sync target; 상기 제2 세마포어 메모리에 상기 L3 싱크 타겟에 따른 동기화 신호를 저장하고,storing a synchronization signal according to the L3 sync target in the second semaphore memory; 상기 제2 뉴럴 프로세서가 상기 제2 세마포어 메모리의 값을 통해 동기화를 수행하는 것을 포함하는,The second neural processor performing synchronization through the value of the second semaphore memory. 뉴럴 프로세싱 장치의 동기화 방법.Synchronization method of neural processing device.
PCT/KR2021/020253 2021-12-30 2021-12-30 Neural processing device and synchronization method thereof Ceased WO2023128009A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2024533970A JP7751861B2 (en) 2021-12-30 2021-12-30 Neural processing device and method for synchronizing the same
PCT/KR2021/020253 WO2023128009A1 (en) 2021-12-30 2021-12-30 Neural processing device and synchronization method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2021/020253 WO2023128009A1 (en) 2021-12-30 2021-12-30 Neural processing device and synchronization method thereof

Publications (1)

Publication Number Publication Date
WO2023128009A1 true WO2023128009A1 (en) 2023-07-06

Family

ID=86999303

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/020253 Ceased WO2023128009A1 (en) 2021-12-30 2021-12-30 Neural processing device and synchronization method thereof

Country Status (2)

Country Link
JP (1) JP7751861B2 (en)
WO (1) WO2023128009A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101959376B1 (en) * 2015-12-11 2019-07-04 바이두 유에스에이 엘엘씨 Systems and methods for a multi-core optimized recurrent neural network
KR20200047551A (en) * 2017-07-30 2020-05-07 뉴로블레이드, 리미티드. Memory-based distributed processor architecture
KR102190879B1 (en) * 2017-10-20 2020-12-14 그래프코어 리미티드 Synchronization amongst processor tiles
KR20210107174A (en) * 2017-03-29 2021-08-31 구글 엘엘씨 Synchronous hardware event collection

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310893B (en) 2016-08-05 2023-11-21 中科寒武纪科技股份有限公司 A device and method for performing neural network operations
CN112654968A (en) 2018-08-29 2021-04-13 高通股份有限公司 Method, apparatus and system for architecture for machine learning acceleration
EP3792778A1 (en) 2019-09-12 2021-03-17 GrAl Matter Labs S.A.S. Message based processing system and method of operating the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101959376B1 (en) * 2015-12-11 2019-07-04 바이두 유에스에이 엘엘씨 Systems and methods for a multi-core optimized recurrent neural network
KR20210107174A (en) * 2017-03-29 2021-08-31 구글 엘엘씨 Synchronous hardware event collection
KR20200047551A (en) * 2017-07-30 2020-05-07 뉴로블레이드, 리미티드. Memory-based distributed processor architecture
KR102190879B1 (en) * 2017-10-20 2020-12-14 그래프코어 리미티드 Synchronization amongst processor tiles

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHAN RONGKAI, FAN XIAOBO: "NeuralScale: A RISC-V Based Neural Processor Boosting AI Inference in Clouds", FIFTH WORKSHOP ON COMPUTER ARCHITECTURE RESEARCH WITH RISC-V (CARRV'21), 17 June 2021 (2021-06-17), XP093074417 *

Also Published As

Publication number Publication date
JP7751861B2 (en) 2025-10-09
JP2024545088A (en) 2024-12-05

Similar Documents

Publication Publication Date Title
WO2013115431A1 (en) Neural network computing apparatus and system, and method therefor
WO2019245348A1 (en) Neural processor
WO2015024492A1 (en) High-performance processor system and method based on a common unit
WO2023153818A1 (en) Method of providing neural network model and electronic apparatus for performing the same
WO2021054614A1 (en) Electronic device and method for controlling the electronic device thereof
WO2022092416A1 (en) Artificial neural network memory system based on artificial neural network data locality
WO2015016640A1 (en) Neural network computing device, system and method
EP4252203A1 (en) Action localization method, device, electronic equipment, and computer-readable storage medium
WO2015024482A1 (en) Processor system and method using variable length instruction word
WO2020242260A1 (en) Method and device for machine learning-based image compression using global context
WO2021256843A1 (en) Device and method for performing statistical calculation on homomorphic ciphertext
WO2023080276A1 (en) Query-based database linkage distributed deep learning system, and method therefor
WO2019050098A1 (en) Variable gain phase shifter
WO2019172685A1 (en) Electronic apparatus and control method thereof
WO2021066504A1 (en) Deep neutral network structure learning and simplifying method
WO2023101472A1 (en) Neural processing unit comprising programmed activation function execution unit
WO2023128009A1 (en) Neural processing device and synchronization method thereof
WO2023080275A1 (en) Deep learning framework application database server for classifying gender and age, and method therefor
WO2023121408A1 (en) Method and apparatus for performing convolution operation based on sparse data by using artificial neural network
WO2025170323A1 (en) System for processing heterogeneous generative artificial intelligence model
WO2022092988A1 (en) A memory device for an artificial neural network
WO2011002260A2 (en) Rotating reference codebook that is used in a multiple-input multiple-output (mimo) communication system
WO2011040707A2 (en) Multiple-input multiple-output communication system using explicit feedback
WO2024096381A1 (en) Method for partitioning and simulating neural network and activation, and computing device for same
WO2026005424A1 (en) Electronic device for providing artificial intelligence service through container prediction on basis of serverless platform, and operating method thereof

Legal Events

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

Ref document number: 21970078

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2024533970

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21970078

Country of ref document: EP

Kind code of ref document: A1