Neuron output data calculation method and device, many-core system, and medium

CN114970838BActive Publication Date: 2026-09-29LYNXI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210468535.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2026-09-29
Estimated Expiration
2042-04-29

AI Technical Summary

Benefits of technology

[0009]本公开所提供的神经元输出数据计算方法及神经元输出数据计算装置、众核系统、计算机可读介质中,通过将前端神经元对目标神经元输出的值以时间步为单位,使得前端神经元在同一时间步向目标神经元输出的值放入一组输入值,以保证可以根据不同时间步对应的输入值,计算出目标神经元在不同时间步的输出数据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114970838B_ABST
    Figure CN114970838B_ABST
Patent Text Reader

Abstract

The present disclosure provides a neuron output data calculation method, which comprises: obtaining weight information of a target neuron of a neural network and input signals; wherein the weight information of the target neuron comprises effective weight values; each effective weight value is a non-zero connection weight value between the target neuron and a front-end neuron; the input signals of the target neuron comprise multiple groups of input values, each group of input values comprising values output by all front-end neurons of the target neuron to the target neuron at a same time step, different groups of input values corresponding to different time steps; and output data of the target neuron at each time step is calculated according to the weight information of the target neuron and the input values corresponding to each time step. The present disclosure also provides a neuron output data calculation device, a many-core system and a computer readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method and device for calculating neuron output data, a many-core system, and a computer-readable medium. Background Technology

[0002] With the continuous development of artificial intelligence technology, the application of neural networks is becoming more and more widespread. Neural networks in artificial intelligence technology are composed of a large number of neurons. Each neuron can connect to other neurons. The connection strength between neurons is represented by the connection weight value. The input data of each neuron is calculated from the output data of all the front-end neurons connected to it and the connection weight value.

[0003] The more complex a neural network is, the better its performance (such as accuracy) will be. However, the more complex the neural network, the more front neurons each neuron may be connected to, and the greater the computing power required to calculate the input data of the neurons. Summary of the Invention

[0004] This disclosure provides a method for calculating neuron output data, a device for calculating neuron output data, a many-core system, and a computer-readable medium.

[0005] In a first aspect, this disclosure provides a method for calculating neuron output data. The method includes: acquiring the weight information and input signal of a target neuron in a neural network; wherein the weight information of the target neuron includes effective weight values; each effective weight value is a non-zero connection weight value between the target neuron and a front-end neuron; the input signal of the target neuron includes multiple sets of input values, each set of input values ​​including the values ​​output by all front-end neurons of the target neuron to the target neuron at the same time step, with different sets of input values ​​corresponding to different time steps; and calculating the output data of the target neuron at each time step based on the weight information of the target neuron and the input values ​​corresponding to each time step.

[0006] Secondly, this disclosure provides a neuron output data calculation device, which includes: a first module for acquiring the weight information and input signal of a target neuron in a neural network; wherein the weight information of the target neuron includes effective weight values; each effective weight value is a non-zero connection weight value between the target neuron and a front-end neuron; the input signal of the target neuron includes multiple sets of input values, each set of input values ​​including the values ​​output by all front-end neurons of the target neuron to the target neuron at the same time step, and different sets of input values ​​correspond to different time steps; and a second module for calculating the output data of the target neuron at each time step based on the weight information of the target neuron and the input values ​​corresponding to each time step.

[0007] Thirdly, this disclosure provides a many-core system comprising: a plurality of processing cores; and an on-chip network configured to interact with data and external data between the plurality of processing cores; wherein one or more of the processing cores store one or more instructions, and the one or more instructions are executed by the one or more processing cores to enable the one or more processing cores to perform the above-described neuron output data calculation method.

[0008] Fourthly, this disclosure provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processing core, implements the above-described neuron output data calculation method.

[0009] The neuron output data calculation method, neuron output data calculation device, many-core system, and computer-readable medium provided in this disclosure calculate the output data of the target neuron at different time steps by using the output value of the front-end neuron to the target neuron in units of time steps. This ensures that the output data of the target neuron at different time steps can be calculated based on the input values ​​corresponding to different time steps.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0011] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0012] Figure 1 A flowchart illustrating a method for calculating neuron output data provided in this embodiment of the disclosure;

[0013] Figure 2 A flowchart of some steps in a neuron output data calculation method provided in this embodiment of the disclosure;

[0014] Figure 3 A flowchart of some steps in a neuron output data calculation method provided in this embodiment of the disclosure;

[0015] Figure 4 This is a schematic diagram showing the connections of some neurons in a neural network.

[0016] Figure 5 This is a schematic diagram showing the weight information of neurons B1, B2, and B3 in a neural network.

[0017] Figure 6 Let A1, A2, A3, and A4 be the output values ​​of neurons A1, A2, A3, and A4 to neurons B1, B2, and B3 at time steps T1, T2, T3, T4, and T5.

[0018] Figure 7 This is a schematic diagram illustrating the calculation process of calculating the inputs of neurons B1, B2, and B3 in a neural network using a neuron output data calculation method provided in this embodiment of the disclosure.

[0019] Figure 8 This is a schematic diagram illustrating the calculation process of a neuron output data calculation method provided in an embodiment of this disclosure;

[0020] Figure 9 This is a schematic diagram illustrating the calculation process of a neuron output data calculation method provided in an embodiment of this disclosure;

[0021] Figure 10 A block diagram illustrating the composition of a neural network connection weight storage device provided in this embodiment of the disclosure;

[0022] Figure 11 This is a block diagram of a many-core system provided in an embodiment of the present disclosure. Detailed Implementation

[0023] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0024] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0025] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0027] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0028] Figure 1 A flowchart illustrating a method for calculating neuron output data provided in an embodiment of this disclosure.

[0029] Reference Figure 1 This disclosure provides a method for calculating neuron output data.

[0030] The neural network in this disclosure can be a spiking neural network (SNN), an artificial neural network (ANN), or other neural networks composed of multiple neurons.

[0031] Specifically, the neural network in this embodiment of the disclosure can be a neural network loaded on a many-core system. At least some of the processing cores of the many-core system correspond to one or more neurons of the neural network, and are responsible for storing the weight information of these one or more neurons and other neurons, as well as calculating the input data and output data of these one or more neurons, etc.

[0032] The neuron output data calculation method of this disclosure can be executed by a device with computing capabilities in a many-core system, such as a processing core in the many-core system, by the processing core calling computer-readable program instructions stored in the storage space of the many-core system; the neuron output data calculation method of this disclosure can also be executed by an electronic device with computing capabilities outside the many-core system, such as a server connected to the many-core system.

[0033] The neuron output data calculation method of this disclosure specifically includes:

[0034] S101. Obtain the weight information and input signal of the target neuron in the neural network;

[0035] The target neuron's weight information includes effective weight values; each effective weight value is a non-zero connection weight value between the target neuron and a front-end neuron; the target neuron's input signal includes multiple sets of input values, each set of input values ​​including the values ​​output by all front-end neurons of the target neuron to the target neuron at the same time step, with different sets of input values ​​corresponding to different time steps.

[0036] The processing kernel (specifically, the processing kernel corresponding to the target neuron in a many-kernel system) acquires the weight information and input signal of the target neuron.

[0037] The target neuron is a neuron loaded into the neural network of the many-core system, and its weight information includes effective weight values. Each effective weight value is a non-zero connection weight value between the target neuron and a front-end neuron.

[0038] When the connection weights between the target neuron and multiple front-end neurons are not zero, the weight information of the target neuron includes multiple valid weight values. In some embodiments, these multiple valid weight values ​​are stored in a predetermined order.

[0039] The input signal of the target neuron includes multiple sets of input values, each set of input values ​​corresponding to a different time step, which includes the output values ​​of all the front neurons of the target neuron at that time step.

[0040] In some embodiments, obtaining the weight information and input signal of the target neuron includes: reading in parallel the connection weight values ​​between the front neurons of multiple target neurons and the target neuron from the storage space where the effective weight values ​​of the target neuron are located.

[0041] That is, when obtaining the weight information and input signal of the target neuron from the storage space, the connection weight values ​​of multiple front-end neurons and the target neuron can be read from the storage space at one time through parallel reading.

[0042] S102. Calculate the output data of the target neuron at each time step based on the weight information of the target neuron and the input values ​​corresponding to each time step.

[0043] After acquiring the weight information and input signal of the target neuron, the processing kernel calculates the output data of the target neuron at each time step based on the weight information of the target neuron and the input value corresponding to each time step.

[0044] Compared to existing technologies that calculate the output data of a target neuron based on the output value of each front neuron and the connection weight between the front neuron and the target neuron, the neuron output data calculation method of this disclosure calculates the output data of the target neuron by using the output value of the front neuron to the target neuron as a unit of time step. This allows the output value of the front neuron to the target neuron at the same time step to be placed into a set of input values, so that the output data of the target neuron at different time steps can be calculated based on the input values ​​corresponding to different time steps.

[0045] In some embodiments, the weight information of the target neuron also includes index information.

[0046] The index information includes multiple identification information, each of which corresponds to a front-end neuron of the target neuron and is used to indicate whether the connection weight value between the front-end neuron and the target neuron is zero.

[0047] In some embodiments, the index information is also arranged in a predetermined order, that is, the order of the index information, the effective weight values, and each group of input values ​​is consistent and can correspond one-to-one.

[0048] In some embodiments, for any given time step, the effective front-end neuron corresponding to that time step can be determined based on the index information and the input value corresponding to that time step, and the output data of the target neuron can be calculated based on the effective front-end neuron.

[0049] Figure 2 This is a flowchart illustrating the specific steps involved in determining the effective front-end neuron for a given time step based on index information and the corresponding input value. The flowchart shows the steps for calculating the output data of the target neuron based on the effective front-end neuron.

[0050] Reference Figure 2 The step of calculating the input of the target neuron based on the weight information and input signal of the target neuron in the neuron output data calculation method provided in this embodiment of the present disclosure specifically includes:

[0051] S201. Based on the index information of the target neuron and the input value corresponding to the time step, determine the effective front-end neuron corresponding to the time step.

[0052] Among them, the connection weight value between the effective front-end neuron and the target neuron is not zero, and the output value of the effective front-end neuron to the target neuron is not zero.

[0053] Since the input values ​​at different time steps may be different, the effective front-end neurons at different time steps may also be different. Therefore, it is necessary to determine the effective front-end neurons at each time step.

[0054] In some embodiments, each identifier in the weight information of the target neuron is a 1-bit data. 0 indicates that the connection weight between the front-end neuron and the target neuron corresponding to the identifier is zero, and 1 indicates that the connection weight between the front-end neuron and the target neuron corresponding to the identifier is not zero.

[0055] If the target neuron has four front-end neurons connected to it, namely the first neuron, the second neuron, the third neuron, and the fourth neuron, where the connection weights between the first and third neurons and the target neuron are not zero, and the connection weights between the second and fourth neurons and the target neuron are zero, then the weight information of the target neuron is 1010.

[0056] In some embodiments, the neural network is a spiking neural network, meaning that the value output by the front-end neuron to the target neuron is also 0 or 1.

[0057] Based on the target neuron index information and the input value corresponding to that time step, the effective front-end neurons corresponding to that time step can include:

[0058] Perform a bitwise AND operation between the index information of the target neuron and the input value corresponding to the time step; determine the front-end neuron corresponding to the non-zero result of the bitwise AND operation as the effective front-end neuron for the time step.

[0059] If the AND result of the identifier information and the value output to the target neuron is zero, it means that the identifier information of the front-end neuron is 0, or the value output by the front-end neuron to the target neuron at this time step is 0, or both the identifier information of the front-end neuron and the value output by the front-end neuron to the target neuron at this time step are 0. In other words, the front-end neuron cannot contribute to the output data of the target neuron at this time step and is an invalid front-end neuron at this time step.

[0060] If the AND result of the identifier information and the value output to the target neuron is not zero, it means that the identifier information of the front-end neuron is not 0 and the value output by the front-end neuron to the target neuron at this time step is not 0. That is, the front-end neuron can contribute to the output data of the target neuron and is a valid front-end neuron.

[0061] S202. Obtain the connection weight values ​​between the effective front-end neurons and the target neuron from the effective weight values ​​of the target neuron, and calculate the output data of the target neuron at this time step based on the connection weight values ​​between all effective front-end neurons and the target neuron.

[0062] After acquiring the effective front-end neurons, the processing kernel obtains the connection weight values ​​between the effective front-end neurons and the target neurons from the effective weight values ​​of the target neurons (since the connection weight values ​​between the effective front-end neurons and the target neurons are not zero, the effective weight values ​​of the target neurons must include the connection weight values ​​between the effective front-end neurons and the target neurons), and calculates the output data of the target neurons based on the connection weight values ​​between all effective front-end neurons and the target neurons.

[0063] In the actual process of obtaining the connection weight values ​​between effective front-end neurons and target neurons, all effective front-end neurons and target neurons can be obtained by parallel reading from the storage space where the effective weight values ​​of the target neurons are located (the effective weight values ​​of the target neurons can be distributed and stored in multiple storage spaces).

[0064] Compared to existing technologies that calculate the output data of a target neuron based on the output value of each front neuron to the target neuron at a time step and the connection weight value between the front neuron and the target neuron, the neuron output data calculation method provided in this disclosure filters out front neurons with a connection weight value of zero to the target neuron and front neurons with an output value of zero to the target neuron at that time step. The input of the target neuron at a time step is calculated only using the remaining front neurons (i.e., those with a connection weight value of non-zero to the target neuron and an output value of non-zero to the target neuron). This reduces invalid calculations (front neurons with a connection weight value of zero to the target neuron or an output value of zero to the target neuron obviously do not contribute to the output data of the target neuron, and calculating the output data of the target neuron based on them is invalid calculation), thus saving system computing power.

[0065] Especially when the connection weights between the target neuron and multiple front-end neurons are zero, or when the output data of multiple front-end neurons of the target neuron is zero at that time step, the neuron output data calculation method provided in this disclosure can greatly reduce invalid calculations and save system computing power. The more zero connection weights between the target neuron and multiple front-end neurons, and the more zero output data of the front-end neurons of the target neuron, the more invalid calculations are reduced by the neuron output data calculation method provided in this disclosure, and the more system computing power can be saved.

[0066] In some embodiments, the output data of the target neuron can be calculated by accumulating the connection weight values ​​between the effective front-end neurons and the target neuron.

[0067] Figure 3 This is a flowchart illustrating the specific steps involved in calculating the output data of the target neuron by accumulating the connection weights between the effective front-end neurons and the target neuron.

[0068] Reference Figure 3 The step of obtaining the connection weight values ​​between the effective front-end neurons and the target neuron from the effective weight values ​​of the target neuron, and calculating the output data of the target neuron at this time step based on the connection weight values ​​between all effective front-end neurons and the target neuron (step S202) specifically includes:

[0069] S301. Obtain the connection weight values ​​between the effective front-end neuron and the target neuron corresponding to this time step.

[0070] S302. Accumulate the connection weight values ​​of all effective front-end neurons and target neurons corresponding to this time step to determine the output data of the target neuron at this time step.

[0071] Since the output value of the front neuron to the target neuron is 1 or 0, when the output value of the front neuron to the target neuron is 1, the value received by the target neuron corresponding to the front neuron is the connection weight value between the front neuron and the target neuron; when the output value of the front neuron to the target neuron is 0, the value received by the target neuron corresponding to the front neuron is also 0.

[0072] Since the target neuron corresponding to the invalid front-end neuron receives a value of 0, the value received by the target neuron is obtained by summing the values ​​received by the target neurons corresponding to all valid front-end neurons.

[0073] If the front-end neuron is a valid front-end neuron, that is, the value of the output of the front-end neuron to the target neuron is 1, then the value received by the target neuron corresponding to the front-end neuron is the connection weight value between the front-end neuron and the target neuron. Therefore, the value received by the target neuron can be obtained by summing the connection weight values ​​between all valid front-end neurons and the target neuron.

[0074] After determining the effective front-end neurons, the processing kernel obtains the connection weight values ​​between the effective front-end neurons and the target neuron from the effective weight values ​​of the target neuron, and calculates the value received by the target neuron by accumulating the connection weights between all effective front-end neurons and the target neuron.

[0075] After acquiring the value received by the target neuron, the membrane potential of the target neuron is updated based on the received value. The updated membrane potential is then compared with the firing threshold of the target neuron. If the updated membrane potential reaches the firing threshold, the target neuron fires, and the output data of the target neuron is 1. If the updated membrane potential does not reach the firing threshold, the target neuron does not fire, and the output data of the target neuron is 0.

[0076] In the actual process of obtaining the connection weight values ​​of effective front-end neurons, the connection weight values ​​of all effective front-end neurons and the target neuron can be read in parallel from the storage space where the effective weights of the target neuron are located.

[0077] In the actual process of calculating the output data of the target neuron at each time step based on the connection weight values ​​of all the effective front-end neurons and the target neuron, multiple computing units can be used for parallel computation.

[0078] Reference Figure 8 Using multiple computing units (i.e. Figure 8 Parallel computation is performed on the square (in the middle). In some embodiments, the computation unit corresponds one-to-one with the front-end neuron of the target neuron. That is, each computation unit calculates the value output by the front-end neuron to the target neuron based on the value output by the front-end neuron to the target neuron at that time step, the identification information, and the effective weight value. If the connection weight value between a front-end neuron and the target neuron is zero or the value output to the target neuron is zero, the computation unit corresponding to the front-end neuron does not need to perform the computation, or the computation result is directly zero.

[0079] For reference Figure 8 The front-end neurons corresponding to weight values ​​1 and 2 (i.e., Figure 8 If the shaded computational unit is an effective front-end neuron, then the corresponding computational unit participates in calculating the output data of the target neuron, while the other computational units (i.e., the shaded computational units) participate in calculating the output data of the target neuron. Figure 8 The computational units without shaded areas do not participate in the computation.

[0080] The process of calculating the output data of the target neuron is as follows Figure 9 As shown, refer to Figure 9 According to Figure 8 The connection weight values ​​corresponding to the effective front-end neurons determined in the manner shown are input into the accumulator. That is, weight value 1 and weight value 2 are input into the accumulator and accumulated to update the membrane potential of the target neuron. Based on the updated membrane potential, it is determined whether the target neuron fires, thereby determining the output data of the target neuron at this time step.

[0081] In some embodiments, the calculation of the target neuron's output data at each time step based on the target neuron's weight information and the input values ​​corresponding to each time step can also be performed in parallel.

[0082] In other words, the computing unit performs parallel computation of the target neuron's output data at multiple time steps.

[0083] In some embodiments, after obtaining the input value of the front-end neuron of the target neuron at one time step, the output data of the front-end neuron at that time step is not immediately calculated based on the input value. Instead, after obtaining the input values ​​of the front-end neuron at multiple time steps, the output data of the target neuron at multiple time steps is calculated in parallel.

[0084] Since the weight information of the target neuron is required in the process of calculating the output data of the target neuron at each time step, if the output data of the front-end neuron is calculated in parallel at multiple time steps, the weight information of the target neuron can be read only once in the process of calculating the output data of the front-end neuron at multiple time steps, which reduces the frequency of reading the weight information of the target neuron and increases the efficiency of computation.

[0085] The process of calculating the output data of multiple target neurons can also be performed in parallel, that is, the output data of multiple target neurons at multiple time steps can be calculated in parallel.

[0086] Figures 4 to 7 This is a schematic diagram of a specific embodiment for parallel computation of the output data of a target neuron at multiple time steps.

[0087] Figure 4 This is a schematic diagram showing the connections of some neurons in a neural network.

[0088] Reference Figure 4 A1, A2, A3, A4, B1, B2, B3, C1, C2, C3, and C4 are neurons in a neural network (such as a spiking neural network). There are connections between A1, A2, A3, and A4 and B1, B2, and B3, as well as between B1, B2, and B3 and C1, C2, C3, and C4. A1, A2, A3, and A4 are the front-end neurons of B1, B2, and B3, and B1, B2, and B3 are the front-end neurons of C1, C2, C3, and C4.

[0089] Figure 5 This is a schematic diagram showing the weight information of B1, B2, and B3.

[0090] Reference Figure 5 The connection weights of B1 with A1 and A4 are non-zero (weights 1 and 2 respectively), and the connection weights with A2 and A3 are zero (or there are no connection weights). The connection weight of B2 with A4 is non-zero (weight 1), and the connection weights with A1, A2, and A3 are zero (or there are no connection weights). The connection weight of B3 with A2 is non-zero (weight 1), and the connection weights with A1, A3, and A4 are zero (or there are no connection weights).

[0091] Figure 6This represents the output values ​​of neurons A1, A2, A3, and A4 at time steps T1, T2, T3, T4, and T5, corresponding to B1, B2, and B3. The first row shows the output values ​​of A1 at these time steps; the second row shows the output values ​​of A2 at these time steps; and the third row shows the output values ​​of A3 at these time steps. The output values ​​at 5 time steps B1, B2, and B3; correspondingly, the first row shows the output values ​​of neurons A1, A2, A3, and A4 at time step B1, B2, and B3 in time step T1; the second row shows the output values ​​of neurons A1, A2, A3, and A4 at time step B1, B2, and B3 in time step T2; the third row shows the output values ​​of neurons A1, A2, A3, and A4 at time step B1, B2, and B3 in time step T3; the fourth row shows the output values ​​of neurons A1, A2, A3, and A4 at time step B1, B2, and B3 in time step T4; and the fifth row shows the output values ​​of neurons A1, A2, A3, and A4 at time step B1, B2, and B3 in time step T5.

[0092] Figure 7 The output values ​​of time steps T1, T2, T3, T4, T5 from A1, A2, A3, A4 to B1, B2, B3 are as follows: Figure 6 The weight information of B1, B2, and B3 is shown below. Figure 5 The diagram illustrates a partial calculation process for calculating the output data of B1, B2, and B3 using a neuron output data calculation method provided in this embodiment.

[0093] Reference Figure 7If B1 is the target neuron, at time step T1, the output value of A1, A2, A3, and A4 to B1 is 1101, and the identifier information in B1's weight information is 1001. The AND result of 1101 and 1001 is 1001. Therefore, A1 and A4 are effective front-end neurons. We only need to accumulate the connection weight values ​​(i.e., weight value 1 and weight value 2) between A1, A4, and B1 to determine the output data of B1 at time step T1. At time step T2, the output value of A1, A2, A3, and A4 to B1 is 0000. A1, A2, A3, and A4 are not effective front-end neurons, so no calculation is needed. We can obtain that the received value of B1 at time step T2 is 0. The output data of B1 at time step T2 is determined by comparing 0 with the output threshold. At time step T3, the output value of A1, A2, A3, and A4 to B1 is 1010, and the identifier information in B1's weight information is 1001. The AND operation of 1010 and 1001 results in 1000, therefore A1 is an effective front-end neuron. Thus, the output data of B1 at time step T3 is determined based on the connection weight value between A1 and B1 (i.e., weight value 1). At time step T4, the output values ​​of A1, A2, A3, and A4 to B1 are 0101. The identifier information in B1's weight information is 1001. The AND operation of 0101 and 1001 results in 0001, therefore A4 is an effective front-end neuron. Thus, the output data of B1 at time step T4 is calculated based on the connection weight value between A4 and B1 (i.e., weight value 2). At time step T5, the output values ​​of A1, A2, A3, and A4 to B1 are 0000. Since A1, A2, A3, and A4 are not effective front-end neurons, no calculation is needed. The value received by B1 at time step T5 is 0. The output data of B1 at time step T2 is determined by comparing 0 with the output threshold.

[0094] In actual calculations, using Figure 7The AND operation between the data in the first row and the data in the second row is the process of performing a parallel AND operation on the output values ​​and identification information of A1, A2, A3, and A4 towards B1 at time steps T1, T2, T3, T4, and T5 to determine the effective front-end neurons at time steps T1, T2, T3, T4, and T5. Similarly, if B2 is the target neuron, at time step T1, the output value of A1, A2, A3, and A4 to B2 is 1101, the identifier information in B2's weight information is 0001, and the AND result of 1101 and 0001 is 0001. A4 is an effective front-end neuron, and the output data of B2 at time step T1 is determined according to the connection weight value between A4 and B1 (i.e., weight value 1). At time step T2, the output value of A1, A2, A3, and A4 to B2 is 0000. A1, A2, A3, and A4 are not effective front-end neurons, so no calculation is needed. The value received by B2 at time step T2 can be obtained as 0, and the output data of B2 at time step T2 is determined by comparing 0 with the firing threshold. At time step T3, the output value of A1, A2, A3, and A4 to B2 is 1010, the identifier information in B2's weight information is 0001, and the AND result of 1010 and 0001 is 000. Since A1, A2, A3, and A4 are not effective front-end neurons, no calculation is needed to obtain the value received by B2 at time step T3 as 0. The output data of B2 at time step T3 is determined by comparing 0 with the firing threshold. At time step T4, the output value of A1, A2, A3, and A4 to B2 is 0101. The identifier information in B2's weight information is 0001. The AND result of 0101 and 0001 is 0001. Therefore, A4 is an effective front-end neuron. Thus, the output data of B2 at time step T4 is determined based on the connection weight value between A4 and B1 (i.e., weight value 1). At time step T5, the output value of A1, A2, A3, and A4 to B2 is 0000. Since A1, A2, A3, and A4 are not effective front-end neurons, no calculation is needed to obtain the value received by B2 at time step T5 as 0. The output data of B2 at time step T5 is determined by comparing 0 with the firing threshold.

[0095] In actual calculations, using Figure 7 The AND operation between the data in the first row and the data in the third row is the process of performing a parallel AND operation on the output values ​​and identification information of A1, A2, A3, and A4 towards B2 at time steps T1, T2, T3, T4, and T5 to determine the effective front-end neurons at time steps T1, T2, T3, T4, and T5.

[0096] If B3 is the target neuron, at time step T1, the output value of A1, A2, A3, and A4 to B3 is 1101. The identifier information in B1's weight information is 0100. The AND result of 1101 and 0100 is 0100. A2 is an effective front-end neuron. The output data of B3 at time step T1 is determined according to the connection weight value between A2 and B1 (i.e., weight value 1). At time step T2, the output value of A1, A2, A3, and A4 to B3 is 0000. A1, A2, A3, and A4 are not effective front-end neurons, so no calculation is needed. The value received by B3 at time step T2 can be obtained as 0. The output data of B3 at time step T2 is determined by comparing 0 with the firing threshold. At time step T3, the output value of A1, A2, A3, and A4 to B3 is 1010. The identifier information in B3's weight information is 0100. The AND result of 1010 and 0100 is 0000. 1. Since A2, A3, and A4 are not effective front-end neurons, no calculation is needed. The value received by B3 at time step T3 is 0. The output data of B3 at time step T3 is determined by comparing 0 with the firing threshold. At time step T4, the output value of A1, A2, A3, and A4 to B3 is 0101. The identifier in B3's weight information is 0100. The AND result of 0101 and 0100 is 0100. Therefore, A2 is an effective front-end neuron. Thus, the output data of B3 at time step T4 is determined based on the connection weight value between A2 and B1 (i.e., weight value 1). At time step T5, the output value of A1, A2, A3, and A4 to B3 is 0000. Since A1, A2, A3, and A4 are not effective front-end neurons, no calculation is needed. The value received by B3 at time step T5 is 0. The output data of B3 at time step T5 is determined by comparing 0 with the firing threshold.

[0097] In actual calculations, using Figure 7 The AND operation between the data in the first row and the data in the fourth row is the process of performing a parallel AND operation on the input values ​​and identification information of A1, A2, A3, and A4 towards B3 at time steps T1, T2, T3, T4, and T5 to determine the effective front-end neurons at time steps T1, T2, T3, T4, and T5.

[0098] In actual computation, the calculation of the effective neurons corresponding to B1, B2, and B3 at time steps T1, T2, T3, T4, and T5 can also be performed in parallel. That is, using... Figure 7 The processes of ANDing the first row of data with the second row of data, the first row of data with the third row of data, and the first row of data with the fourth row of data can be performed in parallel.

[0099] Figure 10 This is a block diagram of a neural network connection weight storage device provided in an embodiment of the present disclosure.

[0100] Reference Figure 10 This disclosure provides a neuron output data computing device 1000, which includes:

[0101] The first module 1001 is used to obtain the weight information and input signal of the target neuron of the neural network;

[0102] The weight information of the target neuron at each time step includes effective weight values; each effective weight value is a non-zero connection weight value between the target neuron at each time step and a front-end neuron; the input signal of the target neuron at each time step includes multiple sets of input values, each set of input values ​​includes the values ​​output by all front-end neurons of the target neuron at the same time step to the target neuron, and different sets of input values ​​correspond to different time steps;

[0103] The second module 1002 is used to calculate the output data of the target neuron at each time step based on the weight information of the target neuron at each time step and the input value corresponding to each time step.

[0104] Figure 11 This is a block diagram of a many-core system provided in an embodiment of the present disclosure.

[0105] Reference Figure 11 This disclosure provides a many-core system, which includes multiple processing cores 1101 and an on-chip network 1102. The multiple processing cores 1101 are all connected to the on-chip network 1102, and the on-chip network 1102 is used to exchange data between the multiple processing cores and external data.

[0106] One or more processing cores 1101 store one or more instructions, and the one or more instructions are executed by one or more processing cores 1101 to enable one or more processing cores 1101 to perform the above-described neuron output data calculation method.

[0107] Furthermore, this disclosure also provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processing core, implements the above-described neuron output data calculation method.

[0108] This disclosure also provides another computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processing core, implements the above-described method for calculating neuron output data of a neural network.

[0109] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0110] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for calculating neuron output data, applied to many-core systems, comprising: Obtain the weight information and input signal of the target neuron in the neural network; whereby, The weight information of the target neuron includes effective weight values; each effective weight value is a non-zero connection weight value between the target neuron and a front-end neuron; the input signal of the target neuron includes multiple sets of input values, each set of input values ​​includes the values ​​output by all front-end neurons of the target neuron to the target neuron at the same time step, and different sets of input values ​​correspond to different time steps; Based on the weight information of the target neuron and the input values ​​corresponding to each time step, calculate the output data of the target neuron at each time step; The many-core system includes computing units that correspond one-to-one with the front-end neurons of the target neuron, and the weight information of the target neuron is distributed and stored in multiple storage spaces of the many-core system. The weight information of the target neuron also includes index information; the index information includes multiple identification information, each identification information corresponding to a front-end neuron of the target neuron, used to indicate whether the connection weight value between the front-end neuron and the target neuron is zero; The step of calculating the output data of the target neuron at each time step based on the weight information of the target neuron and the input values ​​corresponding to each time step includes: For any given time step, based on the index information of the target neuron and the input value corresponding to that time step, the effective front-end neuron corresponding to that time step is determined. The connection weight value between the effective front-end neuron and the target neuron is not zero, and the value output by the effective front-end neuron to the target neuron at that time step is not zero. The connection weight values ​​between the effective front-end neurons and the target neuron are obtained from the effective weight values ​​of the target neuron, and the output data of the target neuron at this time step is calculated based on the connection weight values ​​between all the effective front-end neurons and the target neuron. The output data of the target neuron at this time step is calculated by the computing units corresponding to all the effective front-end neurons. The output data of the target neuron at multiple time steps is obtained by the computing unit in parallel; the index information, the effective weight value and each set of input values ​​are arranged in a preset order so that the index information, the effective weight value and each set of input values ​​correspond one-to-one; in the process of the computing unit obtaining the output data of the target neuron at multiple time steps in parallel, the weight information of the target neuron is read only once.

2. The method according to claim 1, wherein, The neural network is a spiking neural network; the step of obtaining the connection weight values ​​between the effective front-end neurons and the target neuron from the effective weight values ​​of the target neuron, and calculating the output data of the target neuron at this time step based on the connection weight values ​​between all the effective front-end neurons and the target neuron, includes: Obtain the connection weight values ​​between the effective front-end neuron and the target neuron corresponding to this time step; The connection weights of all valid front-end neurons corresponding to this time step and the target neuron are accumulated to determine the output data of the target neuron at this time step.

3. The method according to claim 1, wherein, Each identifier in the weight information is a 1-bit data. 0 indicates that the connection weight between the front-end neuron corresponding to that identifier and the target neuron is zero, and 1 indicates that the connection weight between the front-end neuron corresponding to that identifier and the target neuron is not zero. Determining the effective front-end neuron corresponding to that time step based on the index information of the target neuron and the input value corresponding to that time step includes: Perform a bitwise AND operation between the index information of the target neuron and the input value corresponding to that time step; The front-end neuron corresponding to the non-zero result in the calculation is determined as the effective front-end neuron for that time step.

4. The method according to claim 1, wherein, The number of target neurons is multiple. The step of calculating the output data of the target neurons at each time step based on their weight information and the input values ​​corresponding to each time step includes: Based on the weight information of the multiple target neurons and the input values ​​of the multiple target neurons at each time step, the output data of the multiple target neurons at each time step are calculated in parallel.

5. A neuron output data computing device, comprising: The first module is used to obtain the weight information and input signal of the target neuron in the neural network; The weight information of the target neuron includes effective weight values; each effective weight value is a non-zero connection weight value between the target neuron and a front-end neuron; the input signal of the target neuron includes multiple sets of input values, each set of input values ​​includes the values ​​output by all front-end neurons of the target neuron to the target neuron at the same time step, and different sets of input values ​​correspond to different time steps; The second module is used to calculate the output data of the target neuron at each time step based on the weight information of the target neuron and the input values ​​corresponding to each time step. The weight information of the target neuron is distributed and stored in multiple storage spaces of the many-core system; the many-core system includes computing units that correspond one-to-one with the front-end neurons of the target neuron. The weight information of the target neuron also includes index information; the index information includes multiple identification information, each identification information corresponding to a front-end neuron of the target neuron, used to indicate whether the connection weight value between the front-end neuron and the target neuron is zero; The step of calculating the output data of the target neuron at each time step based on the weight information of the target neuron and the input values ​​corresponding to each time step includes: For any given time step, based on the index information of the target neuron and the input value corresponding to that time step, the effective front-end neuron corresponding to that time step is determined. The connection weight value between the effective front-end neuron and the target neuron is not zero, and the value output by the effective front-end neuron to the target neuron at that time step is not zero. The connection weight values ​​between the effective front-end neurons and the target neuron are obtained from the effective weight values ​​of the target neuron, and the output data of the target neuron at this time step is calculated based on the connection weight values ​​between all the effective front-end neurons and the target neuron. The output data of the target neuron at this time step is calculated by the computing units corresponding to all the effective front-end neurons. The output data of the target neuron at multiple time steps is obtained by the computing unit in parallel; the index information, the effective weight value and each set of input values ​​are arranged in a preset order so that the index information, the effective weight value and each set of input values ​​correspond one-to-one; in the process of the computing unit obtaining the output data of the target neuron at multiple time steps in parallel, the weight information of the target neuron is read only once.

6. A many-core system, comprising: Multiple processing cores, at least some of which have neurons, and the neurons in the multiple processing cores form a neural network; The on-chip network is configured to interact with data between the multiple processing cores and external data; One or more processing cores store one or more instructions, and the one or more instructions are executed by one or more processing cores to enable the one or more processing cores to perform the neuron output data calculation method according to any one of claims 1-4.

7. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by the processing kernel, it implements the neuron output data calculation method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Data processing method and device, chip and medium

    CN114064561A

  • Device and method for supporting fast artificial neural network operation

    WO2018112892A1