IP Library › Granted Patent US 10,410,112
Granted Patent B2
US 10,410,112 · App. 16/039,567 · Granted Sep 10, 2019

Apparatus and method for performing a forward operation of artificil neural networks

Inventors: Shaoli Liu (Beijing, CN); Qi Guo (Beijing, CN); Yunji Chen (Beijing, CN); Tianshi Chen (Beijing, CN)
Assignee: CAMBRICON TECHNOLOGIES CORPORATION LIMITED
G06N3/04G06F9/3885G06N3/02
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,410,112
App. No.
16/039,567
Granted
Sep 10, 2019
Kind
B2
Abstract

Aspects for executing forward propagation of artificial neural network are described here. As an example, the aspects may include a plurality of computation modules connected via an interconnection unit; and a controller unit configured to decode an instruction into one or more groups of micro-instructions, wherein the plurality of computation modules are configured to perform respective groups of the micro-instructions.

Claims (73)

1. An apparatus for forward propagation of a multilayer neural network, comprising:

a plurality of computation modules connected via an interconnection unit; and

a controller unit configured to decode an instruction into one or more groups of micro-instructions,

wherein the plurality of computation modules are configured to perform respective groups of the micro-instructions, and

wherein the plurality of computation modules include:

multiple slave computation modules configured to parallelly calculate multiple groups of slave output values based on an input vector received via the interconnection unit, and

a master computation module configured

to calculate a merged intermediate vector based on one or more intermediate result vectors combined by the interconnection unit based on the multiple groups of slave output values calculated by the multiple slave computation modules, and

to generate an output vector based on the merged intermediate vector.

2. The apparatus of claim 1 , wherein the master computation module is configured to perform one operation selected from the group consisting of:

adding a bias value to the merged intermediate vector;

activating the merged intermediate vector with an activation function;

outputting a predetermined value based on a comparison between the merged intermediate vector and a random number; and

pooling the merged intermediate vector.

3. The apparatus of claim 2 , wherein the master computation module includes:

a master neuron caching unit configured to cache data;

a master computation unit configured to perform the selected operation;

a master data dependency relationship determination unit configured to prevent the instruction from being executed based on a determination that a conflict exists between the instruction and other instructions.

4. The apparatus of claim 1 , wherein each of the slave computation modules includes a slave neuron caching unit configured to store the input vector.

5. The apparatus of claim 1 , wherein the interconnection unit is structured as a binary tree including one or more levels, each of which includes one or more nodes,

wherein each of the nodes at one level is connected to two nodes at a lower level, and

wherein each of the nodes transmits same data to the two nodes at the lower level and combines data received from the two nodes at the lower level.

6. The apparatus of claim 1 , wherein each of the slave computation modules includes:

a slave computation unit configured to receive the one or more groups of micro-instructions and to perform arithmetic logical operations;

a slave data dependency relationship determination unit configured to perform reading/writing operations to a slave neuron caching unit, a weight value caching unit, and a weight gradient caching unit based on a determination that no conflict exists between the reading/writing operations; and

a weight value caching unit configured to store weight vectors.

7. The apparatus of claim 6 , wherein the slave data dependency relationship determination unit configured to

determine whether there is dependent relationship between a first micro-instruction which has not been executed and a second micro-instruction which is being executed;

if there is no dependent relationship, allow the micro-instruction which has not been executed to be executed immediately, otherwise, the micro-instruction which has not been executed will not be allowed to execute until the execution of all the micro-instructions upon which that micro-instruction which has not been executed depend is completed.

8. The apparatus of claim 1 , wherein the instruction is selected from the group consisting of

a CONFIG instruction for configuring constants required by computation of the current layer prior to starting computation of the artificial neural network of each layer,

a COMPUTE instruction for completing arithmetical logic computation of the multilayer neural network of each layer, and

an IO instruction for reading in the input data required by computation from an external address space and storing the data back into the external space after completion of computation.

9. The apparatus of claim 1 , further comprising:

an instruction caching unit configured to store the instruction; and

a direct memory access unit configured to transmit data to the computation modules from an external storage device and receive data from the computation modules to the external storage device.

10. A method for forward propagation of a multilayer neural network, comprising:

receiving, by a controller unit, an instruction;

decoding, by the controller unit, the instruction into one or more groups of micro-instructions;

assigning, by the controller unit, the one or more groups of micro-instruction respectively to a plurality of computation modules;

parallelly calculating, by multiple slave computation modules, multiple groups of slave output values based on an input data vector received via an interconnection unit;

combining, by the interconnection unit, the multiple groups of slave output values to generate an intermediate result vector;

calculating, by a master computation module, a merged intermediate vector based on at least the intermediate result vector; and

generating, by the master computation module, an output vector based on the merged intermediate vector.

11. The method of claim 10 , further comprising performing an operation selected from the group consisting of:

adding a bias value to the merged intermediate vector;

activating the merged intermediate vector with an activation function;

outputting a predetermined value based on a comparison between the merged intermediate vector and a random number; and

pooling the merged intermediate vector.

12. The method of claim 11 , further comprising:

caching data by a master neuron caching unit included in the mast computation module; and

preventing, by a master data dependency relationship determination unit, the instruction from being executed based on a determination that a conflict exists between the instruction and other instructions.

13. The method of claim 10 , further comprising storing, by a slave neuron caching unit included in each of the slave computation modules, the input vector.

14. The method of claim 10 , wherein the interconnection unit is structured as a binary tree including one or more levels, each of which includes one or more nodes,

wherein each of the nodes at one level is connected to two nodes at a lower level, and

wherein each of the nodes transmits same data to the two nodes at the lower level and combines data received from the two nodes at the lower level.

15. The method of 11 , further comprising:

receiving, by a slave computation unit included in the slave computation module, the one or more groups of micro-instructions;

performing arithmetic logical operations according to the micro-instructions;

perform, by a slave data dependency relationship determination unit, reading/writing operations to a slave neuron caching unit, a weight value caching unit, and a weight gradient caching unit based on a determination that no conflict exists between the reading/writing operations; and

storing, by a weight value caching unit include in the slave computation module, weight vectors.

16. The method of claim 15 , further comprising:

determining, by the slave data dependency relationship determination unit, whether there is dependent relationship between a first micro-instruction which has not been executed and a second micro-instruction which is being executed;

allowing, by the slave data dependency relationship determination unit, the micro-instruction which has not been executed to be executed immediately if there is no dependent relationship;

preventing, by the slave data dependency relationship determination unit, the micro-instruction which has not been executed from being executed if dependent relationship exists.

17. The method of claim 10 , wherein the instruction is selected from the group consisting of

a CONFIG instruction for configuring constants required by computation of the current layer prior to starting computation of the artificial neural network of each layer,

a COMPUTE instruction for completing arithmetical logic computation of the multilayer neural network of each layer, and

an IO instruction for reading in the input data required by computation from an external address space and storing the data back into the external space after completion of computation.

18. The method of claim 10 , further comprising:

storing, by an instruction caching unit, the instruction;

transmitting data, by a direct memory access unit, to the computation modules from an external storage device; and

receiving data, by a direct memory access unit, from the computation modules to the external storage device.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 19, 2018
From: LIU, SHAOLI; GUO, QI; CHEN, YUNJI; CHEN, TIANSHI
To: CAMBRICON TECHNOLOGIES CORPORATION LIMITED
Reel/Frame 046398/0896 →
Priority Claims (1)
CN 2016 1 0037645 · Jan 20, 2016 · national
Continuity (2)
Continuation In Part PCTCN2016078281 · Apr 1, 2016
Related Publication 20180322381A1 · Nov 8, 2018