Weight generation method, data processing method and device, electronic device, medium

By using preset weight generators in the processing core to generate the connection weights of neurons, the problem of excessive connection weight occupies in the multi-core architecture is solved, saving storage space and hardware resources is achieved, and processing performance is improved.

CN113673688BActive Publication Date: 2025-02-07LYNXI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110976731.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2025-02-07
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

In the neuromorphic chip of the multi-nuclear architecture, the connection weight between neurons occupies a large amount of storage space, resulting in excessive storage resources.

Method used

By using a preset weight generator in the processing core to generate the connection weights of the neurons instead of storing the weight matrix in advance, thereby reducing the storage space usage.

Benefits of technology

It effectively reduces the storage space of the processing core and reduces the use of hardware processing resources during the computing process, thereby improving the hardware processing performance of the processing core.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113673688B_ABST
    Figure CN113673688B_ABST
Patent Text Reader

Abstract

The present disclosure provides a weight generation method, which is applied to a processing core of a many-core system, wherein the many-core system includes multiple processing cores, and the processing core includes multiple neurons. The weight generation method includes: using a preset weight generator to generate at least part of the connection weight corresponding to the first neuron in the target processing core; wherein the connection weight is the connection weight between the first neuron and the second neuron, and the connection weight is used to perform a membrane potential integral operation of the corresponding first neuron or second neuron. The present disclosure also provides a data processing method, device, processing core, many-core system, electronic device, and computer-readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a weight generation method, a data processing method and device, a processing core, a multi-core system, an electronic device, and a computer-readable medium. Background Art

[0002] In the related art, the connection weights between a large number of neurons in a neuromorphic chip with a many-core architecture are usually stored on the chip, occupying a large storage space.

[0003] Therefore, how to effectively reduce the on-chip storage resource usage of neuromorphic chips with many-core architecture has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present disclosure provides a weight generation method, a data processing method and device, a processing core, a multi-core system, an electronic device, and a computer-readable medium.

[0005] According to a first aspect of the present disclosure, an embodiment of the present disclosure provides a weight generation method, which is applied to a processing core of a many-core system, wherein the many-core system includes a plurality of processing cores, and the processing core includes a plurality of neurons, and the weight generation method includes:

[0006] Generating at least a portion of the connection weights corresponding to the first neuron in the target processing core using a preset weight generator;

[0007] The connection weight is the connection weight between the first neuron and the second neuron, and the connection weight is used to perform a membrane potential integral operation of the corresponding first neuron or second neuron.

[0008] In some embodiments, before using a preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core, the method further includes: receiving a weight generation instruction of the target processing core;

[0009] The step of using a preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core includes:

[0010] According to the weight generation instruction, a preset weight generator is used to generate at least a portion of the connection weights corresponding to the first neuron.

[0011] In some embodiments, the processing core includes an instruction storage space, the instruction storage space includes a weight generation instruction, the weight generation instruction includes an instruction execution time beat,

[0012] The step of using a preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core includes:

[0013] At the beginning of the instruction execution time, the weight generation instruction is obtained from the instruction storage space and executed, and at least part of the connection weights corresponding to the first neuron are generated using a preset weight generator.

[0014] In some embodiments, the method further includes: sending at least a portion of the connection weights corresponding to the first neuron to the target processing core.

[0015] In some embodiments, before using a preset weight generator to generate at least part of the connection weights corresponding to the first neuron in the target processing core, the method further includes:

[0016] Determining whether the target storage space includes all target connection weights corresponding to the first neuron;

[0017] If not included, the target connection weights not included in the target storage space are determined as at least part of the connection weights corresponding to the first neuron to be generated, wherein the target storage space includes an on-chip storage space and / or an off-chip memory.

[0018] In some embodiments, the method further comprises:

[0019] Reading the stored target connection weight from the target storage space;

[0020] All target connection weights corresponding to the first neuron are determined based on at least a portion of the connection weights corresponding to the first neuron generated by a preset weight generator and the stored target connection weights read from a target storage space.

[0021] In some embodiments, the method further comprises:

[0022] In the target storage space, applying for storage space for storing at least part of the connection weights corresponding to the first neuron;

[0023] If the application is successful, at least part of the connection weights corresponding to the first neuron are stored in the target storage space.

[0024] In some embodiments, the weight generator includes a first random number generator; the step of using the preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core includes:

[0025] Sending first control information to the first random number generator, the first control information including a connection matrix corresponding to a first neuron in a target processing core, the connection matrix including information for representing whether connection weights need to be generated between the first neuron and each second neuron;

[0026] The first random number generator is used to generate at least a portion of the connection weights between the first neuron and the second neuron corresponding to the connection weights required to be generated in response to the first control information according to the first random seed and the connection matrix.

[0027] In some embodiments, the weight generator includes a first random number generator;

[0028] The step of using a preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core includes:

[0029] Generate a connection matrix corresponding to a first neuron in a target processing core, wherein the connection matrix includes information for characterizing whether connection weights need to be generated between the first neuron and each second neuron;

[0030] The first random number generator is used to generate at least a portion of connection weights between a first neuron and a second neuron for which connection weights need to be generated according to a first random seed and the connection matrix.

[0031] In some embodiments, the weight generator further includes a second random number generator connected to the first random number generator;

[0032] The generating a connection matrix corresponding to the first neuron in the target processing core includes:

[0033] The connection matrix corresponding to the first neuron in the target processing core is generated by using the second random number generator.

[0034] In some embodiments, the step of using the second random number generator to generate a connection matrix corresponding to the first neuron in the target processing core includes:

[0035] Sending second control information to the second random number generator, wherein the second control information includes weight sparsity information corresponding to the first neuron in the target processing core, so that the second random number generator performs the following processing:

[0036] In response to the second control information, generating the connection matrix having a sparsity matching the weight sparsity information according to a second random seed;

[0037] The connection matrix corresponding to the first neuron in the target processing core is sent to the first random number generator.

[0038] In some embodiments, generating a connection matrix corresponding to a first neuron in a target processing core includes:

[0039] Randomly select a second neuron from a plurality of second neurons connected to the first neuron, and determine it as the second neuron that needs to generate a connection weight with the first neuron;

[0040] When the number of the selected second neurons is less than the target number, continue to randomly select the next second neuron and determine it as the second neuron that needs to generate a connection weight with the first neuron;

[0041] When the number of the selected second neurons is equal to the target number, the connection matrix corresponding to the first neurons in the target processing core is generated according to all the selected second neurons that need to generate connection weights with the first neurons.

[0042] In some embodiments, the connection matrix is ​​a matrix composed of 0 elements and 1 elements, each element corresponds to a first neuron and a second neuron of the target processing core, and each column element corresponds to a first neuron of the target processing core;

[0043] Each 0 element is used to represent that no connection weight needs to be generated between the corresponding first neuron and the second neuron, and each 1 element is used to represent that a connection weight needs to be generated between the corresponding first neuron and the second neuron.

[0044] In some embodiments, the first random number generator includes a uniform number generator and a distribution converter connected to the uniform number generator, wherein the distribution converter is configured with a preset distribution function and corresponding distribution parameters;

[0045] The uniform number generator is used to generate a uniform random number corresponding to a first neuron and a second neuron for which a connection weight needs to be generated according to the first random seed and the connection matrix, wherein the uniform random number satisfies a uniform distribution law;

[0046] The distribution transformer is used to transform the uniform random number into the connection weight that satisfies the preset distribution function according to the distribution parameter and the preset distribution function.

[0047] In some embodiments, the preset distribution function includes a Gaussian distribution function or a Poisson distribution function.

[0048] In some embodiments, the connection weight corresponding to the first neuron in the target processing core satisfies a preset distribution rule.

[0049] In some embodiments, the preset distribution law includes a Gaussian distribution function or a Poisson distribution function.

[0050] In some embodiments, when a plurality of the weight generators are configured, for the plurality of the first neurons, generating at least part of the connection weights corresponding to the first neurons in the target processing core by using a preset weight generator includes:

[0051] A plurality of the weight generators are used to generate at least a portion of the connection weights corresponding to a plurality of the first neurons in parallel, wherein each weight generator is used to generate at least a portion of the weight corresponding to a first neuron.

[0052] In some embodiments, the first neuron includes a currently firing neuron and / or a neuron having a connection weight with a currently firing second neuron.

[0053] According to a second aspect of the present disclosure, an embodiment of the present disclosure provides a weight generation method, which is applied to a processing core of a many-core system, wherein the many-core system includes a plurality of processing cores, and the processing core includes a plurality of neurons, and the method includes:

[0054] receiving at least part of the connection weights corresponding to the first neuron sent by at least one generating core,

[0055] Among them, at least part of the connection weights corresponding to the first neuron are generated by the generating core using a preset weight generator, and the connection weights are the connection weights between the first neuron and the second neuron, and the connection weights are used to perform membrane potential integral operations on the corresponding first neuron or second neuron.

[0056] According to a third aspect of the present disclosure, an embodiment of the present disclosure provides a data processing method, the data processing method comprising: in response to receiving an input pulse, using the above-mentioned weight generation method, obtaining a connection weight corresponding to a first neuron corresponding to the input pulse in a target processing core; the connection weight is a connection weight between the first neuron and the second neuron;

[0057] A membrane potential integration operation is performed on the first neuron according to the input pulse corresponding to the first neuron and the corresponding connection weight.

[0058] According to a fourth aspect of the present disclosure, an embodiment of the present disclosure provides a data processing method, the data processing method comprising: when a first neuron of a target processing core meets a release condition, using the above-mentioned weight generation method, obtaining a connection weight between the first neuron and a second neuron;

[0059] Input information is sent to the second neuron, where the input information includes an input pulse and a connection weight between the first neuron and the second neuron, so that the second neuron performs a membrane potential integration operation according to the input pulse and the connection weight.

[0060] According to a fifth aspect of the present disclosure, an embodiment of the present disclosure provides a weight generation device, which is applied to a processing core of a many-core system, wherein the many-core system includes a plurality of processing cores, and the processing core includes a plurality of neurons, wherein the weight generation device includes: a control module and a weight generator;

[0061] The control module is configured to control the weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core;

[0062] The connection weight is the connection weight between the first neuron and the second neuron, and the connection weight is used to perform a membrane potential integral operation of the corresponding first neuron or second neuron.

[0063] According to a sixth aspect of the present disclosure, an embodiment of the present disclosure provides a weight generation device, which is applied to a processing core of a many-core system, wherein the many-core system includes a plurality of processing cores, and the processing core includes a plurality of neurons, including:

[0064] A receiving unit is configured to receive at least part of the connection weights corresponding to the first neuron sent by at least one generating core,

[0065] Among them, at least part of the connection weights corresponding to the first neuron are generated by the generating core using a preset weight generator, and the connection weights are the connection weights between the first neuron and the second neuron, and the connection weights are used to perform membrane potential integral operations on the corresponding first neuron or second neuron.

[0066] According to a seventh aspect of the present disclosure, an embodiment of the present disclosure provides a data processing device, the data processing device comprising: a weight acquisition unit, configured to, in response to receiving an input pulse, acquire a connection weight corresponding to a first neuron corresponding to the input pulse in a target processing core using the weight generation device as described above; the connection weight is a connection weight between the first neuron and the second neuron;

[0067] The integral issuing unit is configured to perform a membrane potential integral operation on the first neuron according to the input pulse corresponding to the first neuron and the corresponding connection weight.

[0068] According to an eighth aspect of the present disclosure, an embodiment of the present disclosure provides a data processing device, the data processing device comprising: a weight acquisition unit, configured to, when a first neuron of a target processing core meets a release condition, acquire a connection weight between the first neuron and a second neuron using the weight generation device as described above;

[0069] The integral issuing unit is configured to send input information to the second neuron, wherein the input information includes an input pulse and a connection weight between the first neuron and the second neuron, so that the second neuron can perform a membrane potential integral operation according to the input pulse and the connection weight.

[0070] According to the ninth aspect of the present disclosure, an embodiment of the present disclosure provides a processing core, which includes a weight generation device and / or a data processing device, the weight generation device includes the above-mentioned weight generation device, and the data processing device includes the above-mentioned data processing device.

[0071] According to a tenth aspect of the present disclosure, an embodiment of the present disclosure provides a many-core system, which includes multiple processing cores, at least one of which uses the above-mentioned processing core.

[0072] According to the eleventh aspect of the present disclosure, an embodiment of the present disclosure provides an electronic device, which includes: multiple processing cores; and an on-chip network, configured to exchange data between the multiple processing cores and external data; wherein one or more instructions are stored in one or more of the processing cores, and one or more of the instructions are executed by one or more of the processing cores, so that one or more of the processing cores can execute the above-mentioned weight generation method or data processing method.

[0073] According to the twelfth aspect of the present disclosure, an embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, wherein the computer program implements the above-mentioned weight generation method or data processing method when executed by a processing core.

[0074] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:

[0076] Figure 1 A schematic diagram of the structure of a many-core system according to an embodiment of the present disclosure;

[0077] Figure 2 for Figure 1 A schematic diagram of the structure of a processing core;

[0078] Figure 3A flow chart of a weight generation method provided in an embodiment of the present disclosure;

[0079] Figure 4 A schematic diagram of a connection relationship between a first neuron of a target processing core B and a second neuron of a processing core A;

[0080] Figure 5 is a structural schematic diagram of a weight generator in an embodiment of the present disclosure;

[0081] Figure 6 is a schematic diagram of the structure of a first random number generator in an embodiment of the present disclosure;

[0082] Figure 7 A flow chart of a weight generation method provided in an embodiment of the present disclosure;

[0083] Figure 8 A flowchart of a data processing method provided by an embodiment of the present disclosure;

[0084] Fig. 9 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0085] Fig.10 A block diagram of a weight generation device provided by an embodiment of the present disclosure;

[0086] Fig.11 A block diagram of a data processing device provided in an embodiment of the present disclosure;

[0087] Fig.12 A block diagram of another data processing device provided by an embodiment of the present disclosure;

[0088] Fig.13 A block diagram of a composition of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0089] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill 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 the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0090] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0091] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0092] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0093] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those 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 the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0094] Brain-like computing imitates the operating mechanism of the biological brain to build an electronic brain similar to the biological brain, which is used to process data with higher accuracy and processing efficiency. The architecture based on the von Neumann system has limited support for brain-like computing, which limits the application scope of neural networks and has low energy efficiency. Therefore, in order to obtain a new architecture system that better matches neural computing, neuromorphic chips (for example, brain-like computing chips) came into being. Neuromorphic chips are usually multi-core structures.

[0095] Figure 1 is a schematic diagram of the structure of a many-core system according to an embodiment of the present disclosure, Figure 2 for Figure 1 A schematic diagram of the structure of a processing core in the multi-core system. The multi-core system includes multiple processing cores, each of which usually includes a group (multiple) of neurons, a group of axons, a group of dendrites and a synapse array, which can simulate the behavior of a biological neuron cluster. Each processing core in the multi-core system can complete the dendrite integral calculation process and cell body calculation process of a corresponding group of neurons. Among them, the dendrite is a structure for receiving external stimuli and generating input current, the axon is a structure for transmitting pulses to the synapse of the subsequent neuron, the synapse is a structure for connecting neurons, and the synapse array is an array composed of synapses, connecting a group of axons and a group of dendrites.

[0096] For each neuron in the processing core, the dendrite integral calculation process is used to describe the process of integrating the pulse data of all input axons connected to the dendrites of the neuron. The dendrite integral calculation process is also referred to as the membrane potential integral operation in the disclosed embodiment. The cell body operation process is responsible for updating the membrane potential of the neuron and judging the release of pulses. The cell body operation process is also referred to as the release operation in the disclosed embodiment. If the membrane potential of any neuron meets the release condition, the axon of the neuron will release a pulse represented by 1 to the successor neuron connected to the neuron; otherwise, the axon of the neuron will release a pulse represented by 0 to the successor neuron connected to the neuron. This enables the multi-core system, as a very large-scale integrated system of electronic analog circuits, to more accurately simulate the neural biological structure in the nervous system.

[0097] In the related art, synaptic arrays are usually used to simulate the connection relationship between a group of neurons of a processing core and a group of neurons of another processing core, as an array storage structure for storing the connection topology and connection weights (also called synaptic weights) between a group of neurons of a processing core and a group of neurons of another processing core. However, the weight matrix stored corresponding to the synaptic array usually contains a large number of connection weights between neurons, which occupies a large storage space of the processing core. In some application scenarios, weight parameters need to be transferred between neurons for calculation during the calculation process, which also occupies more hardware processing resources, which to a certain extent limits the improvement of the hardware processing performance of the processing core, that is, limits the improvement of the performance of the multi-core system.

[0098] In order to effectively solve the technical problems existing in the above-mentioned related technologies, the embodiments of the present disclosure provide a weight generation method and data processing method, device, processing core, many-core system, electronic device, and computer-readable medium. According to the technical solution provided by the embodiments of the present disclosure, each processing core does not need to store the weight matrix required for the operation of neurons, but generates the expected connection weights along with the operation process of neurons to perform corresponding operations. It can be achieved that in the process of brain simulation in the many-core system, the storage space occupied by each processing core is effectively reduced, and the storage space of the processing core of the many-core system is saved. At the same time, in some application scenarios, there is no need to transfer weight parameters between neurons during the operation process, but the corresponding weight parameters are generated along with the operation process of neurons, thereby effectively reducing the occupation of hardware processing resources and improving the hardware processing performance of the processing core to a certain extent, that is, improving the performance of the many-core system.

[0099] The technical solution of the embodiment of the present disclosure is described in detail below with reference to the relevant drawings.

[0100] Figure 3 A flowchart of a weight generation method provided in an embodiment of the present disclosure, referring to Figure 3The embodiment of the present disclosure provides a weight generation method, which is applied to a processing core of a many-core system. The method can be performed by a weight generation device, which can be implemented by software and / or hardware, and which can be integrated into the processing core of the many-core system. The weight generation method includes:

[0101] Step S1: using a preset weight generator to generate at least part of the connection weights corresponding to the first neuron in the target processing core.

[0102] The connection weight is the connection weight between the first neuron and the second neuron, and the connection weight is used to perform a membrane potential integral operation of the corresponding first neuron or second neuron.

[0103] The target processing core may be any processing core in the multi-core system, for example, the current processing core (or generating core) executing the weight generation method, and the current processing core may use a weight generator to generate at least a portion of the connection weights corresponding to the first neuron included therein. The target processing core may also be any processing core other than the current processing core, and the current processing core may use a weight generator to generate at least a portion of the connection weights corresponding to the first neuron included in other processing cores, and the present disclosure does not limit this.

[0104] The second neuron may be a neuron in any processing core connected to the first neuron, and may be in the same processing core as the first neuron, or in a different processing core from the first neuron, and the present disclosure does not limit this. The connection relationship between the first neuron and the second neuron may be preset, for example, a connection matrix is ​​preset with information for characterizing whether connection weights need to be generated between the first neuron and the second neuron, and the connection matrix may be stored in the generating core or may be received by the generating core. The connection relationship between the first neuron and the second neuron may also be generated online, for example, generated online according to a random number generator and a random seed, and the present disclosure does not limit this.

[0105] In the embodiments of the present disclosure, the first neuron can be a predecessor neuron or a successor neuron of the second neuron, and the present disclosure does not limit this. The first neuron as a predecessor neuron of the second neuron can be understood as transmitting a firing pulse to the second neuron when the first neuron fires. The first neuron as a successor neuron of the second neuron can be understood as the first neuron receiving a firing pulse transmitted by the firing second neuron.

[0106] In an embodiment of the present disclosure, each first neuron may correspond to at least one second neuron, and each second neuron may correspond to at least one first neuron. The target processing core may include at least one first neuron. The present disclosure does not limit the number of first neurons, the number of second neurons, and the correspondence between the first neurons and the second neurons.

[0107] The first neuron may be a first neuron that needs to perform membrane potential integral calculation, or a second neuron with a connection weight therewith may be a neuron that needs to perform membrane potential integral calculation, or any first neuron in the processing core. It should be understood that for any processing core, determining all connection weights corresponding to each first neuron included therein may determine the synaptic array of the processing core.

[0108] In some embodiments, the first neuron includes a currently firing neuron and / or a neuron having a connection weight with a currently firing second neuron.

[0109] In the embodiments of the present disclosure, when applied to sparse computing scenarios, the first neuron can be a currently emitted neuron and / or a neuron that has a connection weight with a currently emitted second neuron. Generating the connection weight corresponding to the first neuron can meet the membrane potential integral operation requirements without generating the connection weights of all neurons in the processing core, thereby reducing the amount of data generated by the weights and improving the efficiency of weight generation.

[0110] Among them, at least part of the connection weights corresponding to the first neuron can be at least part of the connection weights required for the current membrane potential integral operation, or at least part of the connection weights among all the connection weights corresponding to the first neuron, and the present disclosure does not impose any restrictions on this.

[0111] The connection weight may be any value, which is not limited in the present disclosure.

[0112] In the embodiments of the present disclosure, for the first neuron in the target processing core, there is no need to pre-store the weight matrix required for the operation of the first neuron through the synaptic array, and the connection weight between the first neuron and the connected second neuron is generated by a preset weight generator, thereby saving the storage space of the processing core, and in some application scenarios, when transmitting a pulse to the first neuron of the target processing core or when the first neuron of the target processing core transmits a pulse to the second neuron, there is no need to transmit the relevant weight parameters, thereby effectively reducing the occupation of hardware processing resources and improving the hardware processing performance of the processing core to a certain extent, that is, improving the performance of the many-core system.

[0113] In some optional embodiments, the target processing core is any processing core other than the current processing core, and the present disclosure does not limit how the current processing core uses a preset weight generator to generate at least part of the connection weights corresponding to the first neuron in the target processing core. For example, the current processing core may use a weight generator to generate at least part of the connection weights corresponding to the first neuron in the target processing core according to a weight generation instruction sent by the target processing core or a pre-stored weight generation instruction. The weight generation instruction is used to instruct the current processing core to generate at least part of the connection weights corresponding to the first neuron in the target processing core, and the present disclosure does not limit the form and content of the weight generation instruction.

[0114] In one possible implementation, the weight generation instruction may include, but is not limited to: the core position of the target processing core, the first random seed, the distribution function type, the number of connection weights to be generated, the connection matrix, and the instruction execution time.

[0115] Among them, the first random seed is used to generate connection weights, the distribution function type is used to determine the distribution function (distribution law) that the generated connection weights need to satisfy, and the connection matrix may include information for characterizing whether connection weights need to be generated between the first neuron and each second neuron in the target processing core, that is, the target processing core can specify which neurons need to generate connection weights and the number of connection weights to be generated through the connection matrix. The instruction execution time is used to characterize the time for executing the weight generation instruction. Among them, when multiple weight generation instructions are included, in the instruction storage space, multiple weight generation instructions can be stored in sequence according to the order of the instruction execution time to form an instruction string.

[0116] In some embodiments, the weight generation instruction may also include a memory location of the target processing core, so that the current processing core can cache at least part of the generated connection weights corresponding to the first neuron of the target processing core to the memory space corresponding to the memory location after generating the connection weights corresponding to the first neuron of the target processing core.

[0117] In some embodiments, the weight generation instruction may also include weight sparsity information of the connection weights to be generated and a second random seed, and the weight sparsity information and the second random seed are used to generate the required connection matrix.

[0118] In some optional embodiments, before step S1, the weight generation method may further include:

[0119] receiving a weight generation instruction of the target processing core;

[0120] The step of generating at least part of the connection weights corresponding to the first neuron in the target processing core by using a preset weight generator may include:

[0121] According to the weight generation instruction, a preset weight generator is used to generate at least a portion of the connection weights corresponding to the first neuron.

[0122] In some embodiments, when the target processing core needs to use weight parameters, a weight generation instruction can be sent to one or more generation cores for generating connection weights, and each generation core generates at least part of the connection weights required by the target processing core in response to the weight generation instruction of the target processing core.

[0123] The time beat of receiving the weight generation instruction of the target processing core may be the instruction execution time beat, or may be earlier than the instruction execution time beat, and the present disclosure does not impose any limitation on this.

[0124] In this way, at least part of the connection weights can be generated according to the weight generation instruction, which can save the in-core code space and storage space of the target processing core.

[0125] In some optional embodiments, the processing core includes an instruction storage space, the instruction storage space includes a weight generation instruction, and the weight generation instruction includes an instruction execution time beat.

[0126] The step of generating at least part of the connection weights corresponding to the first neuron in the target processing core by using a preset weight generator may include:

[0127] At the beginning of the instruction execution time, the weight generation instruction is obtained from the instruction storage space and executed, and at least part of the connection weights corresponding to the first neuron are generated using a preset weight generator.

[0128] Among them, the weight generation instructions in the instruction storage space of the processing core can be stored after receiving the weight generation instructions sent by the target processing core in advance of the instruction execution time, or they can be pre-stored in the instruction storage space without the need for the target processing core to send them. The present disclosure does not impose any restrictions on this.

[0129] In an embodiment of the present disclosure, at the beginning of the instruction execution clock, the corresponding weight generation instruction is obtained and executed from the instruction storage space to generate at least part of the connection weight, which can reduce the frequency of data interaction between processing cores and reduce the system delay caused by data interaction.

[0130] In some embodiments, after step S1, the weight generation method may further include:

[0131] At least a portion of the connection weights corresponding to the first neuron are sent to the target processing core.

[0132] Exemplarily, at least part of the connection weights corresponding to the first neuron may be sent to a target processing core via an on-chip network.

[0133] In the embodiments of the present disclosure, at least part of the connection weights corresponding to the first neurons in the target processing core other than the current processing core can be generated. Some processing cores in the many-core system include a weight generator to ensure the generation of connection weights corresponding to each first neuron in the many-core system, thereby saving the in-core code space and storage space of some processing cores.

[0134] In some optional embodiments, the target processing core may store a portion of the connection weights in a target storage space, wherein the target storage space may include an on-chip memory space (e.g., a storage space within the processing core) and / or an off-chip memory, wherein the off-chip memory is, for example, a double data rate synchronous dynamic random access memory (DDR). For this portion of the weight parameters, the target processing core may obtain them by reading the on-chip memory space or the off-chip memory, while the other portion of the connection weights required by the target processing core (e.g., the portion of the connection weights that does not exist in the target storage space) may be generated online.

[0135] The connection weights stored in the on-chip memory space (for example, the storage space in the processing core) or the off-chip memory may be pre-generated and stored, or may be generated online and then stored, and the present disclosure does not impose any restrictions on this.

[0136] Among them, the processing core that reads the target storage space to obtain at least part of the weight parameters can be the current processing core (generation core) that executes the weight generation method, and the at least part of the weight parameters read can be the connection weight corresponding to the first neuron included in it, or can be the connection weight corresponding to the first neuron in other processing cores (target processing cores). It should be understood that when the target processing core is a non-generation core, the target storage space can also be read to obtain the connection weight corresponding to the first neuron included in it, and the present disclosure does not limit this.

[0137] It should be understood that using a preset weight generator to generate at least part of the connection weights corresponding to the first neuron in the target processing core may be to generate at least part of the connection weights corresponding to the first neuron that has not yet been stored in the target storage space, or may be to respond to a weight generation instruction sent by the target processing core and generate at least part of the connection weights corresponding to the weight generation instruction.

[0138] In some optional embodiments, before step S1, the method further includes: determining whether the target storage space includes all target connection weights corresponding to the first neuron;

[0139] If not included, the target connection weights not included in the target storage space are determined as at least part of the connection weights corresponding to the first neuron to be generated.

[0140] Among them, the target connection weight is the connection weight that the target processing core needs to use in the current operation process, which can be all the connection weights corresponding to the first neuron, or it can be part of the connection weights corresponding to the first neuron.

[0141] In this way, at least part of the connection weights corresponding to the first neuron to be generated can be determined, so as to be generated by a weight generator, thereby determining all target connection weights.

[0142] In some optional embodiments, the weight generation method may further include:

[0143] Reading the stored target connection weight from the target storage space;

[0144] All target connection weights corresponding to the first neuron are determined based on at least a portion of the connection weights corresponding to the first neuron generated by a preset weight generator and the stored target connection weights read from a target storage space.

[0145] In this way, the stored target connection weights can be obtained by reading the target storage space, and the target connection weights that have not yet been stored can be achieved by online generation, thereby reducing the frequency of generating weights and the amount of generated data.

[0146] In some optional embodiments, the weight generation method may further include:

[0147] In the target storage space, applying for storage space for storing at least part of the connection weights corresponding to the first neuron;

[0148] If the application is successful, at least part of the connection weights corresponding to the first neuron are stored in the target storage space.

[0149] In some optional embodiments, after generating at least part of the connection weights required by the target processing core each time, an attempt may be made to apply to the on-chip memory space and / or off-chip memory to store the at least part of the connection weights. When the remaining storage space of the on-chip memory space of the target processing core is insufficient or the bandwidth of the off-chip memory is insufficient, the cache of the generated at least part of the connection weights will be rejected.

[0150] In some embodiments, after the at least partial connection weight is cached to the on-chip memory space or off-chip memory of the target processing core, the at least partial connection weight may be overwritten by other temporary data storage generated subsequently, and the at least partial connection weight will be marked as invalid. When the target processing core needs to use the at least partial connection weight for operation, it can check whether the at least partial connection weight has been generated and the at least partial connection weight is still valid. If both conditions are met, it is determined that the target storage space includes the at least partial connection weight, and the existing at least partial connection weight can be used directly, otherwise it is regenerated online.

[0151] In this way, at least part of the connection weights can be stored in the target storage space, and when needed, they can be directly read from the target storage space without performing a generation operation each time.

[0152] In the disclosed embodiment, brain simulation mainly simulates physical characteristics. Simulating physical characteristics means that the specific value of the weight is less concerned, while the trend of the weight change is more concerned. Therefore, in order to make the generated connection weights meet the expected distribution trend, the disclosed embodiment constrains the weight value generated by the weight generator by setting distribution constraints, so that the connection weight corresponding to the first neuron generated by the weight generator can meet the preset distribution law. The preset distribution law may include a preset distribution function, so that the connection weight of the neuron generated by the weight generator can meet the expected distribution requirements. In some embodiments, the preset distribution function may include a Gaussian distribution (normal distribution) function or a Poisson distribution function.

[0153] In some embodiments, a connection matrix corresponding to the first neuron of the target processing core is set in advance based on the weight sparsity information corresponding to the first neuron of the target processing core, the connection matrix includes information for characterizing whether connection weights need to be generated between the first neuron in the target processing core and each second neuron, each element in the connection matrix is ​​used to characterize whether a connection weight needs to be generated between each first neuron in the target processing core and a second neuron, and the weight sparsity information is used to control the number of elements in the connection matrix used to characterize the connection weights that need to be generated between the first neuron and the second neuron, and to control the number of elements in the connection matrix used to characterize the connection weights that do not need to be generated between the first neuron and the second neuron.

[0154] In some embodiments, the connection matrix is ​​a matrix composed of 0 elements and 1 elements, each element corresponds to a first neuron and a second neuron of the target processing core, and each column element corresponds to a first neuron of the target processing core. Each 0 element is used to represent that no connection weight needs to be generated between the corresponding first neuron and the second neuron, and each 1 element is used to represent that a connection weight needs to be generated between the corresponding first neuron and the second neuron. The above-mentioned weight sparsity information can be understood as the proportion of 1 elements or the proportion of 0 elements in the connection matrix.

[0155] For ease of understanding, the following is an exemplary description in which the first neuron is located in the target processing core B and the second neuron is located in the processing core A. It should be understood that the present disclosure is not limited thereto.

[0156] Figure 4 The diagram is a connection relationship diagram between the first neuron of a target processing core B and the second neuron of a processing core A. As an example, the target processing core B includes the first neuron B1, the first neuron B2 and the first neuron B3, and the processing core A includes the second neuron A1, the second neuron A2, the second neuron A3 and the second neuron A4. Each first neuron in the target processing core B has a connection relationship with each second neuron of the processing core A, that is, the first neuron of the target processing core and the second neuron of the processing core are in a fully connected relationship. Among them, there is no need to generate a connection weight between the first neuron B1 and the second neuron A2, but the first neuron B1 and the second neurons A1, A3 and A4 all need to generate a connection weight, there is no need to generate a connection weight between the first neuron B2 and the second neuron A1, the first neuron B2 and the second neurons A2, A3 and A4 all need to generate a connection weight, there is no need to generate a connection weight between the first neuron B3 and the second neurons A3 and A4, and the first neuron B3 and the second neurons A1 and A2 all need to generate a connection weight. Then for the first neuron B1 of the target processing core B, its corresponding connection weights include the connection weight a11 between the connected second neuron A1, the connection weight a13 between the connected second neuron A3, and the connection weight a14 between the connected second neuron A4; for the first neuron B2 of the target processing core B, its corresponding connection weights include the connection weight a22 between the connected second neuron A2, the connection weight a23 between the connected second neuron A3, and the connection weight a24 between the connected second neuron A4; for the first neuron B3 of the target processing core B, its corresponding connection weights include the connection weight a31 between the connected second neuron A1, and the connection weight a32 between the connected second neuron A2.

[0157] according to Figure 4From the connection relationship shown, it can be seen that the connection matrix corresponding to the first neuron B1 of the target processing core B is [1, 0, 1, 1], the connection matrix corresponding to the first neuron B2 of the target processing core B is [0, 1, 1, 1], and the connection matrix corresponding to the first neuron B3 of the target processing core B is [1, 1, 0, 0]. Then the connection matrix corresponding to the target processing core B is a 4-row and 3-column matrix composed of 0s and 1s, and each column element corresponds to a first neuron of the target processing core B.

[0158] In some embodiments, connection weights may need to be generated between the first neuron of the target processing core B and each second neuron of the processing core A, and the corresponding connection matrix is ​​a matrix with all 1 elements.

[0159] In some embodiments, in order to reduce the amount of calculation, the connection weights between the first neuron of the target processing core B and the second neuron of the processing core A may be partially generated, that is, the connection weights between the first neuron of the target processing core B and the second neuron of the processing core A have a certain sparsity. For example, Figure 4 The first neuron B1 shown does not need to generate connection weights with the second neurons A2 and A3, the first neuron B2 does not need to generate connection weights with the second neurons A1, A3 and A4, the first neuron B3 does not need to generate connection weights with the second neurons A1, A2 and A4, the corresponding connection weights between the first neuron and the second neuron that do not need to generate connection weights will be disabled or set to 0, and the corresponding connection weights between the first neuron and the second neuron that need to generate connection weights will be retained. Accordingly, the elements in the connection matrix corresponding to the neurons that do not need to generate connection weights are 0 elements, and the elements corresponding to the neurons that need to generate connection weights are 1 elements.

[0160] In some embodiments, when a connection matrix corresponding to a first neuron of a target processing core is pre-set, the weight generator may include a first random number generator, and step S1 may further include: sending first control information to the first random number generator.

[0161] In this embodiment, the first control information includes a connection matrix corresponding to the first neuron in the target processing core, and the connection matrix includes information for characterizing whether connection weights need to be generated between the first neuron in the target processing core and each second neuron.

[0162] In this embodiment, the first random number generator is used to generate the connection weights between the first neuron and the second neuron for which connection weights need to be generated according to the first random seed and the connection matrix in response to the first control information. In other words, for the first neuron and the second neuron corresponding to 1 element in the connection matrix, the first random number generator generates the connection weights between the first neuron and the second neuron corresponding to the 1 element according to the first random seed.

[0163] In this embodiment, the first random seed information can be a preset random seed, and the first random seed can be pre-set and stored in the first random number generator. The first random number generator can generate a random number sequence according to the preset first random seed, and multiply the random number sequence with the elements in the connection matrix that are located at the same row number and the same column number. Then, the elements in the random number sequence corresponding to the 0 elements in the connection matrix will be set to 0, and the elements in the random number sequence corresponding to the 1 elements in the connection matrix will remain unchanged, thereby obtaining at least a portion of the connection weights between the first neuron and the second neuron for which the connection weights need to be generated.

[0164] In this embodiment, in order to generate connection weights that meet the expected distribution requirements, the first random number generator may also pre-set distribution constraints, which may include a preset distribution function and distribution parameters. When generating connection weights, distribution constraints are performed so that the connection weights corresponding to the first neuron generated by the first random number generator can satisfy the preset distribution function, that is, the preset distribution law. In some embodiments, the preset distribution function may include a Gaussian distribution (normal distribution) function or a Poisson distribution function.

[0165] Among them, according to the same first random seed, the random number sequence generated by the first random number generator each time is the same.

[0166] In some embodiments, in the case where the connection matrix corresponding to the first neuron of the target processing core is not pre-set, the step of generating the connection weight corresponding to the first neuron in the target processing core using a preset weight generator may further include: the step of generating the connection matrix corresponding to the first neuron in the target processing core, and the step of generating at least part of the connection weights corresponding to the first neuron and the second neuron for which the connection weights need to be generated based on the first random seed and the connection matrix using a first random number generator. In this embodiment, the description of the connection matrix and the first random number generator can be found in the above-mentioned related description, which will not be repeated here.

[0167] It should be noted that the step of generating the connection matrix and the step of generating the connection weights may be that when the element in the generated connection matrix is ​​1, the operation of generating the corresponding connection weights is performed, and when the element in the generated connection matrix is ​​0, the operation of generating the connection weights is not performed. It may also be that when all elements in the generated connection matrix are generated, all connection weights corresponding to the connection matrix are generated. The present disclosure does not limit this.

[0168] Figure 5 Schematic diagram of a weight generator in an embodiment of the present disclosure. In some embodiments, when a connection matrix corresponding to the first neuron of a target processing core is not pre-set, Figure 5 As shown, as an example, the weight generator may include a first random number generator and a second random number generator connected to the first random number generator, the second random number generator being used to generate a connection matrix corresponding to a first neuron of a target processing core, and the first random number generator being used to generate at least a portion of the connection weights corresponding to the first neuron and a second neuron for which connection weights need to be generated.

[0169] In this embodiment, the step of generating a connection matrix corresponding to the first neuron in the target processing core may further include: using a second random number generator to generate a connection matrix corresponding to the first neuron in the target processing core, so that the first random number generator generates at least part of the connection weights between the first neuron and the second neuron for which connection weights need to be generated based on the first random seed and the connection matrix.

[0170] In this embodiment, the step of using the second random number generator to generate a connection matrix corresponding to the first neuron in the target processing core may further include: sending second control information to the second random number generator.

[0171] In this embodiment, the second control information includes weight sparsity information corresponding to the first neuron in the target processing core.

[0172] In this embodiment, the second random number generator is used to generate a connection matrix whose sparsity matches the weight sparsity information in response to the second control information according to the second random seed, and send the connection matrix corresponding to the first neuron in the target processing core to the first random number generator.

[0173] In this embodiment, the second random seed may include a preset random seed, the second random seed may be pre-set and stored in the second random number generator, and the second random number generator may generate a connection matrix whose sparsity matches the weight sparsity information according to the preset second random seed and weight sparsity information, and the sparsity of the connection matrix refers to the proportion of 1 elements or the proportion of 0 elements. Among them, the weight sparsity information may include the weight sparsity corresponding to the first neuron in the target processing core, and the connection relationship between the first neuron and the second neuron in the target processing core, and the weight sparsity is the proportion of connection relationships that need to generate connection weights or the proportion of connection relationships that do not need to generate connection weights among all connection relationships.

[0174] Among them, the connection matrix whose sparsity matches the weight sparsity information means that: the proportion of 1 elements in the connection matrix is ​​the same as the proportion of connection relationships that need to generate connection weights in the weight sparsity information, or the proportion of 0 elements in the connection matrix is ​​the same as the proportion of connection relationships that do not need to generate connection weights in the weight sparsity information.

[0175] Among them, according to the same second random seed, the random number sequence generated by the second random number generator each time is the same.

[0176] In this embodiment, the second random seed information may include a preset random seed, the second random seed information is different from the first random seed information, and may be the same as or different from the initial random seed information, the second random seed information may be pre-set and stored in the second random number generator, and the second random number generator may generate at least a portion of the connection weights corresponding to the first neuron and the second neuron having a connection relationship according to the preset random seed and the connection matrix. In other words, for the first neuron and the second neuron corresponding to 1 element in the connection matrix, the second random number generator generates at least a portion of the connection weights corresponding to the first neuron and the second neuron corresponding to the 1 element according to the second random seed information.

[0177] In this embodiment, the description about how the second random number generator can generate at least part of the connection weights corresponding to the first neuron and the second neuron with a connection relationship based on a preset random seed and a connection matrix can be specifically referred to the above description about how the weight generator generates at least part of the connection weights corresponding to the first neuron and the second neuron with a connection relationship based on the initial random seed information and the connection matrix, which will not be repeated here.

[0178] In some embodiments, the step of generating a connection matrix corresponding to a first neuron in a target processing core may further include: randomly selecting a second neuron from a plurality of second neurons connected to the first neuron, and determining it as a second neuron for which a connection weight needs to be generated with the first neuron; when the number of selected second neurons is less than the target number, continuing to randomly select the next second neuron, and determining it as a second neuron for which a connection weight needs to be generated with the first neuron; when the number of selected second neurons is equal to the target number, generating a connection matrix corresponding to the first neuron in the target processing core based on all selected second neurons for which a connection weight needs to be generated with the first neuron.

[0179] The number of times the second neurons are randomly selected may be greater than or equal to the target number, and all the second neurons selected that need to generate connection weights with the first neurons are different second neurons.

[0180] Exemplarily, the initial value of the counter can be configured as zero, and the target value can be configured as the target number. Specifically, each of the multiple second neurons connected to the first neuron has a neuron identifier, which can be expressed in digital form, for example, 1, 2, 3, 4, etc. A neuron identifier of a second neuron is randomly generated, and the second neuron is determined as a second neuron that needs to generate a connection weight with the first neuron, and the count of the counter is increased by 1. In the case where the count value of the counter is less than the value of the target number, a neuron identifier of a second neuron is continuously randomly generated, and the second neuron is determined as a second neuron that needs to generate a connection weight with the first neuron, and the count of the counter is increased by 1. In the case where the count value of the counter is equal to the value of the target number, a connection matrix corresponding to the first neuron in the target processing core is generated according to all the selected second neurons that need to generate connection weights with the first neuron, for example, the matrix elements corresponding to the second neurons that need to generate connection weights with the first neuron are set to 1, and the matrix elements corresponding to the second neurons that do not need to generate connection weights with the first neuron are set to 0, thereby generating a connection matrix corresponding to the first neuron in the target processing core.

[0181] It should be noted that, when the neuron identifier of the second neuron currently randomly selected is the same as the neuron identifier of the second neuron previously selected, the neuron identifier of the second neuron currently selected is ignored, and the neuron identifier of the next second neuron is randomly selected.

[0182] Figure 6 is a schematic diagram of the structure of a first random number generator in an embodiment of the present disclosure. In some embodiments, such as Figure 6 As shown, the first random number generator may include a uniform number generator and a distribution converter connected in series with the uniform number generator, the uniform number generator is preset with a uniform distribution function and corresponding uniform distribution parameters, and the distribution converter is configured with a preset distribution function and corresponding distribution parameters.

[0183] Among them, the uniform number generator is used to generate uniform random numbers corresponding to the first neuron and the second neuron with a connection relationship according to the first random seed and the connection matrix, and the generated uniform random numbers satisfy the uniform distribution law.

[0184] The distribution transformer is used to transform the uniform random number that conforms to the uniform distribution into the connection weight that conforms to the preset distribution law, and is specifically used to transform the uniform random number that conforms to the uniform distribution into the connection weight that satisfies the preset distribution function, that is, the connection weight that satisfies the preset distribution law, according to the preset distribution function and the corresponding distribution parameter. The preset distribution function may include a Gaussian distribution function or a Poisson distribution function.

[0185] In this embodiment, the uniform number generator may include at least one linear feedback shift register (LFSR).

[0186] In this embodiment, the distribution transformer has different distribution transformation modes according to different preset distribution functions. The distribution transformer may perform distribution transformation by an algorithm or by table lookup.

[0187] In some embodiments, when a plurality of the weight generators are configured, for the plurality of the first neurons, generating at least part of the connection weights corresponding to the first neurons in the target processing core by using a preset weight generator includes:

[0188] A plurality of the weight generators are used to generate at least a portion of the connection weights corresponding to a plurality of the first neurons in parallel, wherein each weight generator is used to generate at least a portion of the connection weights corresponding to a first neuron.

[0189] In this embodiment, if membrane potential integration operation is required for multiple first neurons or second neurons, and each first neuron or second neuron uses at least one corresponding connection weight for operation, the corresponding multiple weight generators can be used to generate the corresponding connection weights of the multiple first neurons in parallel.

[0190] In this embodiment, the description of each weight generator generating the connection weight corresponding to the first neuron can refer to the above description, which will not be repeated here. It should be understood that multiple weight generators can be reused to generate connection weights corresponding to a larger number of first neurons.

[0191] In this way, the efficiency of generating connection weights can be improved.

[0192] Figure 7 A flowchart of a weight generation method provided in an embodiment of the present disclosure, referring to Figure 7 The embodiment of the present disclosure provides a weight generation method, which is applied to a processing core of a many-core system. The method can be performed by a weight generation device, which can be implemented by software and / or hardware, and which can be integrated into the processing core of the many-core system. The weight generation method includes:

[0193] Step S11: Receive at least part of the connection weights corresponding to the first neuron sent by at least one generating core.

[0194] Among them, at least part of the connection weights corresponding to the first neuron are generated by the generating core using a preset weight generator, and the connection weights are the connection weights between the first neuron and the second neuron, and the connection weights are used to perform membrane potential integral operations on the corresponding first neuron or second neuron.

[0195] The generating core may be the processing core mentioned above which can generate at least part of the connection weights corresponding to the first neuron using a preset weight generator, and the number of the generating cores may be one or more.

[0196] Exemplarily, when a processing core needs a large number of weight parameters in a short period of time, at least part of the connection weights corresponding to the first neurons generated by multiple generation cores can be received respectively to quickly determine the target connection weight corresponding to the first neuron.

[0197] As mentioned above, each generation core may generate and send at least a portion of the connection weights corresponding to the first neuron in response to a received weight generation instruction or according to a pre-stored weight generation instruction, which will not be described in detail here.

[0198] In some optional embodiments, the method further includes:

[0199] Determining whether the target storage space includes all target connection weights corresponding to the first neuron;

[0200] If not included, determining a weight generation instruction according to the target connection weight not included in the target storage space;

[0201] The weight generation instruction is sent to at least one of the generation cores, wherein the target storage space includes an on-chip storage space and / or an off-chip memory.

[0202] The weight generation instruction is used to generate the target connection weight corresponding to the first neuron not included in the target storage space. There may be multiple weight generation instructions, each of which may correspond to a generation core, and the weight generation instructions may be sent to the corresponding generation cores through the on-chip network. As long as the generation core can generate the target connection weight corresponding to the first neuron not included in the target storage space according to the weight generation instruction, the present disclosure does not limit this.

[0203] Figure 8 A flowchart of a data processing method provided in an embodiment of the present disclosure, referring to Figure 8 The embodiment of the present disclosure provides a data processing method, which is applied to a processing core of a many-core system. The method can be executed by a data processing device, which can be implemented by software and / or hardware, and which can be integrated into the processing core of the many-core system. The data processing method includes:

[0204] Step S21, in response to receiving an input pulse, using the above-mentioned weight generation method, obtain the connection weight corresponding to the first neuron corresponding to the input pulse in the target processing core; the connection weight is the connection weight between the first neuron and the second neuron.

[0205] The second neuron is a predecessor neuron of the first neuron, and the input pulse is a pulse emitted by the second neuron to the first neuron in the target processing core.

[0206] In some optional embodiments, the second neuron is located in the predecessor processing core of the target processing core, and can receive a routing packet from the predecessor processing core, which may include but is not limited to: an input pulse, an identifier of the second neuron that issues the input pulse, an identifier of the destination processing core (i.e., the destination processing core), and an identifier of the destination neuron (i.e., the first neuron). The connection weight corresponding to the first neuron is the connection weight between the first neuron and the second neuron in the predecessor processing core.

[0207] In some optional embodiments, the second neuron is located in the target processing core, and the second neuron that emits pulses to the first neuron and the connection weight between the first neuron and the second neuron can be determined by the target processing core.

[0208] Step S22: performing a membrane potential integration operation on the first neuron according to the input pulse corresponding to the first neuron and the corresponding connection weight.

[0209] Specifically, according to the input pulses corresponding to the first neuron and the corresponding connection weights, the step of performing membrane potential integral calculation on the first neuron may include: weighting and summing all input pulses connected to the first neuron according to the corresponding connection weights to obtain the integral potential of the first neuron. After the step of performing membrane potential integral calculation on the first neuron according to the input pulses corresponding to the first neuron and the corresponding connection weights, it also includes: adding the integral potential of the first neuron to the historical membrane potential to update the membrane potential of the first neuron, and when the updated membrane potential exceeds the preset membrane potential threshold, it is determined that the first neuron meets the firing condition, that is, it is necessary to fire a pulse; otherwise, it is determined that the first neuron does not meet the firing condition, that is, it is not necessary to fire a pulse.

[0210] Fig. 9 A flowchart of another data processing method provided in an embodiment of the present disclosure, referring to Fig. 9 The embodiment of the present disclosure provides another data processing method, which is applied to a processing core of a many-core system. The method can be executed by a data processing device, which can be implemented by software and / or hardware, and which can be integrated into the processing core of the many-core system. The data processing method includes:

[0211] Step S31: When the first neuron of the target processing core meets the emission condition, the connection weight between the first neuron and the second neuron is obtained by using the above-mentioned weight generation method.

[0212] Step S32: sending input information to the second neuron, wherein the input information includes an input pulse and a connection weight between the first neuron and the second neuron, so that the second neuron performs a membrane potential integration operation according to the input pulse and the connection weight.

[0213] The second neuron is a successor neuron of the first neuron, and the input pulse is a firing pulse sent by the first neuron to the second neuron.

[0214] In some optional embodiments, the second neuron is located in a subsequent processing core of the target processing core. The input pulse is a pulse sent by the target processing core to the subsequent processing core. Specifically, the input information sent to the subsequent processing core may include, but is not limited to: the input pulse, the identifier of the first neuron that issues the input pulse, the identifier of the target processing core (i.e., the subsequent processing core), and the identifier of the target neuron (i.e., the second neuron).

[0215] In some optional embodiments, the second neuron is located in the target processing core, and the first neuron that emits a pulse to the second neuron and the connection weight between the first neuron and the second neuron can be determined by the target processing core.

[0216] For a detailed description of the process of performing membrane potential integral calculation on the second neuron, reference can be made to the above description of the steps of performing membrane potential integral calculation on the first neuron according to the input pulses corresponding to the first neuron and the corresponding connection weights, which will not be repeated here.

[0217] Fig.10 A block diagram of a weight generation device provided in an embodiment of the present disclosure, the device is applied to a processing core of a many-core system, the many-core system includes multiple processing cores, the processing core includes multiple neurons, such as Fig.10 As shown, the weight generating device 300 includes: a control module 301 and a weight generator 302 .

[0218] The control module 301 is configured to control the weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core;

[0219] The connection weight is the connection weight between the first neuron and the second neuron, and the connection weight is used to perform a membrane potential integral operation of the corresponding first neuron or second neuron.

[0220] In some embodiments, the weight generator 302 includes a first random number generator; the control module 301 is configured to: send first control information to the first random number generator, the first control information includes a connection matrix corresponding to the first neuron in the target processing core, and the connection matrix includes information for characterizing whether connection weights need to be generated between the first neuron in the target processing core and each second neuron. The first random number generator is configured to generate at least part of the connection weights corresponding to the first neuron and the second neuron for which connection weights need to be generated in response to the first control information according to the first random seed and the connection matrix.

[0221] In some embodiments, Figure 5 and Fig.10 As shown, the weight generator 302 includes a first random number generator and a second random number generator connected to the first random number generator. The control module 301 is configured to: generate a connection matrix corresponding to the first neuron in the target processing core using the second random number generator, and the connection matrix includes information for characterizing whether a connection weight needs to be generated between the first neuron and the second neuron in the target processing core. The first random number generator is configured to: generate at least part of the connection weights corresponding to the first neuron and the second neuron for which a connection weight needs to be generated according to the first random seed and the connection matrix.

[0222] In some embodiments, Figure 5 and Fig.10 As shown, the control module 301 is configured to: send second control information to the second random number generator, the control information including weight sparsity information corresponding to the first neuron in the target processing core. The second random number generator is configured to: generate a connection matrix whose sparsity matches the weight sparsity information according to the second random seed in response to the second control information; and send the connection matrix corresponding to the first neuron in the target processing core to the first random number generator.

[0223] In some embodiments, Figure 6 As shown, the first random number generator includes a uniform number generator and a distribution converter connected to the uniform number generator, and the distribution converter is configured with a preset distribution function and corresponding distribution parameters. The uniform number generator is configured to: generate uniform random numbers corresponding to the first neuron and the second neuron for which connection weights need to be generated according to the first random seed and the connection matrix, and the uniform random numbers satisfy the uniform distribution law. The distribution converter is configured to: transform the uniform random numbers into connection weights that satisfy the preset distribution function according to the preset distribution function and the corresponding distribution parameters.

[0224] The specific implementation of the weight generating device 300 and the weight generator 302 can refer to the description in the above-mentioned embodiment of the weight generating method, which will not be repeated here.

[0225] Another weight generation device provided by an embodiment of the present disclosure is applied to a processing core of a many-core system, wherein the many-core system includes a plurality of processing cores, and the processing core includes a plurality of neurons, including:

[0226] The receiving unit is configured to receive at least part of the connection weights corresponding to the first neuron sent by at least one generating core.

[0227] Among them, at least part of the connection weights corresponding to the first neuron are generated by the generating core using a preset weight generator, and the connection weights are the connection weights between the first neuron and the second neuron, and the connection weights are used to perform membrane potential integral operations on the corresponding first neuron or second neuron.

[0228] The implementation of the weight generating device can refer to the description in the above-mentioned embodiment of the weight generating method, which will not be repeated here.

[0229] Fig.11 A block diagram of a data processing device provided in an embodiment of the present disclosure, such as Fig.11 As shown, the data processing device 400 includes a weight acquisition unit 401 and a score issuing unit 402 .

[0230] The weight acquisition unit 401 is configured to, in response to receiving an input pulse, acquire the connection weight corresponding to the first neuron corresponding to the input pulse in the target processing core using the weight generation device as described above; the connection weight is the connection weight between the first neuron and the second neuron. The integral issuance unit 402 is configured to perform a membrane potential integral operation on the first neuron according to the input pulse corresponding to the first neuron and the corresponding connection weight.

[0231] In some embodiments, the weight acquisition unit 401 may adopt the above-mentioned weight generation device.

[0232] For the specific implementation of the data processing device 400, please refer to the above-mentioned weight generation device and Figure 8 The description in the embodiment of the data processing method shown will not be repeated here.

[0233] Fig.12 A block diagram of a data processing device provided in an embodiment of the present disclosure, such as Fig.12 As shown, the data processing device 500 includes a weight acquisition unit 501 and a score issuing unit 502 .

[0234] The weight acquisition unit 501 is configured to acquire the connection weight between the first neuron and the second neuron using the weight generation device when the first neuron of the target processing core meets the issuing condition. The integral issuing unit 502 is configured to send input information to the second neuron, the input information including the input pulse and the connection weight between the first neuron and the second neuron, so that the second neuron performs membrane potential integral operation according to the input pulse and the connection weight.

[0235] In some embodiments, the weight acquisition unit 501 may adopt the above-mentioned weight generation device.

[0236] For the specific implementation of the data processing device 500, please refer to the above-mentioned weight generation device and Fig. 9 The description in the embodiment of the data processing method shown will not be repeated here.

[0237] The embodiment of the present disclosure also provides a processing core, which includes the above-mentioned weight generating device.

[0238] The embodiment of the present disclosure also provides a processing core, which includes the above-mentioned data processing device.

[0239] The embodiment of the present disclosure also provides a processing core, which includes the above-mentioned weight generation device and the above-mentioned data processing device.

[0240] The embodiment of the present disclosure further provides a many-core system, which includes multiple processing cores, at least one processing core adopts the processing core described in any of the above embodiments.

[0241] Fig.13 A block diagram of a composition of an electronic device provided in an embodiment of the present disclosure.

[0242] Reference Fig.13 An embodiment of the present disclosure provides an electronic device, which includes multiple processing cores 601 and an on-chip network 602, wherein the multiple processing cores 601 are connected to the on-chip network 602, and the on-chip network 602 is used to exchange data between the multiple processing cores and external data.

[0243] Among them, one or more instructions are stored in one or more processing cores 601, and the one or more instructions are executed by one or more processing cores 601, so that one or more processing cores 601 can execute the above-mentioned weight generation method or data processing method.

[0244] In addition, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, wherein the computer program implements the above-mentioned weight generation method or data processing method when executed by a processing core.

[0245] The embodiments of the present disclosure also provide a computer program product, which includes a computer program, and the computer program implements the above-mentioned weight generation method or data processing method when executed by a processing core.

[0246] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the 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 by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium 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 technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0247] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A weight generation method, applied to a processing core of a many-core system, wherein the many-core system includes a plurality of processing cores, and the processing core includes a plurality of neurons, wherein the weight generation method comprises: Generating at least a portion of the connection weights corresponding to the first neuron in the target processing core using a preset weight generator; Wherein, the connection weight is the connection weight between the first neuron and the second neuron, and the connection weight is used to perform a membrane potential integral operation of the corresponding first neuron or second neuron; The weight generator includes a first random number generator and a second random number generator connected to the first random number generator; The second random number generator is used to generate a connection matrix whose sparsity matches the weight sparsity information according to the second random seed in response to the second control information, and send the connection matrix corresponding to the first neuron in the target processing core to the first random number generator, wherein the second control information includes the weight sparsity information corresponding to the first neuron in the target processing core; The first random number generator is used to generate at least a portion of connection weights between a first neuron and a second neuron for which connection weights need to be generated according to a first random seed and the connection matrix.

2. The weight generation method according to claim 1, wherein: Before using a preset weight generator to generate at least part of the connection weights corresponding to the first neuron in the target processing core, the method further includes: receiving a weight generation instruction of the target processing core; The step of using a preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core includes: According to the weight generation instruction, a preset weight generator is used to generate at least a portion of the connection weights corresponding to the first neuron.

3. The weight generation method according to claim 1, wherein the processing core comprises an instruction storage space, wherein the instruction storage space comprises a weight generation instruction, and wherein the weight generation instruction comprises an instruction execution time. in, The step of using a preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core includes: At the beginning of the instruction execution time beat, the weight generation instruction is obtained from the instruction storage space and executed, and at least part of the connection weights corresponding to the first neuron are generated using a preset weight generator.

4. The weight generation method according to claim 2 or 3, further comprising: At least a portion of the connection weights corresponding to the first neuron are sent to the target processing core.

5. The weight generation method according to claim 1, wherein: Before using a preset weight generator to generate at least part of the connection weights corresponding to the first neuron in the target processing core, the method further includes: Determining whether the target storage space includes all target connection weights corresponding to the first neuron; If not included, the target connection weights not included in the target storage space are determined as at least part of the connection weights corresponding to the first neuron to be generated, wherein the target storage space includes an on-chip storage space and / or an off-chip memory.

6. The weight generation method according to claim 5, further comprising: Reading the stored target connection weight from the target storage space; All target connection weights corresponding to the first neuron are determined based on at least a portion of the connection weights corresponding to the first neuron generated by a preset weight generator and the stored target connection weights read from a target storage space.

7. The weight generation method according to claim 1, further comprising: In the target storage space, applying for storage space for storing at least part of the connection weights corresponding to the first neuron; If the application is successful, at least part of the connection weights corresponding to the first neuron are stored in the target storage space.

8. The weight generation method according to claim 1, wherein the weight generator comprises a first random number generator; the step of using the preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core comprises: Sending first control information to the first random number generator, where the first control information includes a connection matrix corresponding to a first neuron in a target processing core, where the connection matrix includes information for representing whether connection weights need to be generated between the first neuron and each second neuron; The first random number generator is used to generate at least a portion of the connection weights between the first neuron and the second neuron corresponding to the connection weights required to be generated in response to the first control information according to the first random seed and the connection matrix.

9. The weight generation method according to claim 1, wherein: The step of using a preset weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core includes: Generate a connection matrix corresponding to a first neuron in a target processing core, wherein the connection matrix includes information for characterizing whether connection weights need to be generated between the first neuron and each second neuron; The first random number generator is used to generate at least a portion of connection weights between a first neuron and a second neuron for which connection weights need to be generated according to a first random seed and the connection matrix.

10. The weight generation method according to claim 9, wherein: The generating a connection matrix corresponding to the first neuron in the target processing core includes: The connection matrix corresponding to the first neuron in the target processing core is generated by using the second random number generator.

11. The weight generation method according to claim 9, wherein generating a connection matrix corresponding to the first neuron in the target processing core comprises: Randomly select a second neuron from a plurality of second neurons connected to the first neuron, and determine it as the second neuron that needs to generate a connection weight with the first neuron; When the number of the selected second neurons is less than the target number, continue to randomly select the next second neuron and determine it as the second neuron that needs to generate a connection weight with the first neuron; When the number of the selected second neurons is equal to the target number, the connection matrix corresponding to the first neurons in the target processing core is generated according to all the selected second neurons that need to generate connection weights with the first neurons.

12. The weight generation method according to any one of claims 8 to 11, wherein the connection matrix is ​​a matrix consisting of 0 elements and 1 elements, each element corresponds to a first neuron and a second neuron of the target processing core, and each column element corresponds to a first neuron of the target processing core; Each 0 element is used to represent that no connection weight needs to be generated between the corresponding first neuron and the second neuron, and each 1 element is used to represent that a connection weight needs to be generated between the corresponding first neuron and the second neuron.

13. The weight generation method according to any one of claims 8 to 11, wherein the first random number generator comprises a uniform number generator and a distribution transformer connected to the uniform number generator, wherein the distribution transformer is configured with a preset distribution function and corresponding distribution parameters; The uniform number generator is used to generate a uniform random number corresponding to a first neuron and a second neuron for which a connection weight needs to be generated according to the first random seed and the connection matrix, wherein the uniform random number satisfies a uniform distribution law; The distribution transformer is used to transform the uniform random number into the connection weight that satisfies the preset distribution function according to the distribution parameter and the preset distribution function. 14 . The weight generation method according to claim 13 , wherein the preset distribution function comprises a Gaussian distribution function or a Poisson distribution function.

15. The weight generation method according to claim 1, wherein the connection weight corresponding to the first neuron in the target processing core satisfies a preset distribution rule. 16 . The weight generation method according to claim 15 , wherein the preset distribution rule comprises a Gaussian distribution function or a Poisson distribution function.

17. The weight generation method according to claim 1, wherein: In the case where a plurality of the weight generators are configured, for the plurality of the first neurons, generating at least part of the connection weights corresponding to the first neurons in the target processing core by using a preset weight generator includes: A plurality of the weight generators are used to generate at least a portion of the connection weights corresponding to a plurality of the first neurons in parallel, wherein each weight generator is used to generate at least a portion of the weight corresponding to a first neuron.

18. The weight generation method according to claim 1, wherein: The first neurons include neurons that are currently firing and / or neurons that have connection weights with second neurons that are currently firing.

19. A weight generation method, applied to a processing core of a many-core system, the many-core system comprising a plurality of processing cores, the processing core comprising a plurality of neurons, the method comprising: receiving at least part of the connection weights corresponding to the first neuron sent by at least one generating core, Wherein, at least part of the connection weights corresponding to the first neuron are generated by the generating core using a preset weight generator, the connection weights are connection weights between the first neuron and the second neuron, and the connection weights are used to perform a membrane potential integral operation of the corresponding first neuron or second neuron; The weight generator includes a first random number generator and a second random number generator connected to the first random number generator; The second random number generator is used to generate a connection matrix whose sparsity matches the weight sparsity information according to the second random seed in response to the second control information, and send the connection matrix corresponding to the first neuron in the target processing core to the first random number generator, wherein the second control information includes the weight sparsity information corresponding to the first neuron in the target processing core; The first random number generator is used to generate at least a portion of connection weights between a first neuron and a second neuron for which connection weights need to be generated according to a first random seed and the connection matrix.

20. The method according to claim 19, further comprising: Determining whether the target storage space includes all target connection weights corresponding to the first neuron; If not included, determining a weight generation instruction according to the target connection weight not included in the target storage space; The weight generation instruction is sent to at least one of the generation cores, wherein the target storage space includes an on-chip storage space and / or an off-chip memory.

21. A data processing method, comprising: In response to receiving an input pulse, using the weight generation method described in any one of claims 1 to 20 above, obtaining a connection weight corresponding to a first neuron in a target processing core corresponding to the input pulse; the connection weight is a connection weight between the first neuron and the second neuron; A membrane potential integration operation is performed on the first neuron according to the input pulse corresponding to the first neuron and the corresponding connection weight.

22. A data processing method, comprising: When a first neuron of the target processing core meets the release condition, obtaining a connection weight between the first neuron and the second neuron using the weight generation method described in any one of claims 1 to 20; Input information is sent to the second neuron, where the input information includes an input pulse and a connection weight between the first neuron and the second neuron, so that the second neuron performs a membrane potential integration operation according to the input pulse and the connection weight.

23. A weight generation device, applied to a processing core of a many-core system, the many-core system comprising a plurality of processing cores, the processing core comprising a plurality of neurons, the weight generation device comprising: Control module and weight generator; The control module is configured to control the weight generator to generate at least a portion of the connection weights corresponding to the first neuron in the target processing core; Wherein, the connection weight is the connection weight between the first neuron and the second neuron, and the connection weight is used to perform a membrane potential integral operation of the corresponding first neuron or second neuron; The weight generator includes a first random number generator and a second random number generator connected to the first random number generator; The second random number generator is used to generate a connection matrix whose sparsity matches the weight sparsity information according to the second random seed in response to the second control information, and send the connection matrix corresponding to the first neuron in the target processing core to the first random number generator, wherein the second control information includes the weight sparsity information corresponding to the first neuron in the target processing core; The first random number generator is used to generate at least a portion of connection weights between a first neuron and a second neuron for which connection weights need to be generated according to a first random seed and the connection matrix.

24. The weight generating device according to claim 23, wherein: The control module is configured to: send first control information to the first random number generator, the first control information including a connection matrix corresponding to the first neuron in the target processing core, the connection matrix including information for representing whether connection weights need to be generated between the first neuron in the target processing core and each second neuron; The first random number generator is configured to generate, in response to the first control information, at least a portion of connection weights between a first neuron and a second neuron corresponding to the connection weights required to be generated according to a first random seed and the connection matrix.

25. The weight generating device according to claim 23, wherein: The control module is configured to: generate a connection matrix corresponding to the first neuron in the target processing core using the second random number generator, wherein the connection matrix includes information for characterizing whether connection weights need to be generated between the first neuron in the target processing core and each second neuron; The first random number generator is configured to generate at least a portion of connection weights between a first neuron and a second neuron for which connection weights need to be generated, according to a first random seed and the connection matrix.

26. The weight generation device according to claim 25, wherein the control module is configured to: send second control information to the second random number generator, the second control information comprising weight sparsity information corresponding to the first neuron in the target processing core; The second random number generator is configured to: generate the connection matrix whose sparsity matches the weight sparsity information according to a second random seed in response to the second control information; and send the connection matrix corresponding to the first neuron in the target processing core to the first random number generator.

27. The weight generating device according to claim 25 or 26, wherein the first random number generator comprises a uniform number generator and a distribution transformer connected to the uniform number generator, wherein the distribution transformer is configured with a preset distribution function and corresponding distribution parameters; The uniform number generator is configured to: generate uniform random numbers corresponding to the first neuron and the second neuron for which connection weights need to be generated according to the first random seed and the connection matrix, wherein the uniform random numbers satisfy a uniform distribution law; The distribution transformer is configured to transform the uniform random number into at least part of the connection weights satisfying the preset distribution function according to the preset distribution function and the corresponding distribution parameters.

28. A weight generation device, applied to a processing core of a many-core system, the many-core system comprising a plurality of processing cores, the processing core comprising a plurality of neurons, comprising: A receiving unit is configured to receive at least part of the connection weights corresponding to the first neuron sent by at least one generating core, Wherein, at least part of the connection weights corresponding to the first neuron are generated by the generating core using a preset weight generator, the connection weights are connection weights between the first neuron and the second neuron, and the connection weights are used to perform a membrane potential integral operation of the corresponding first neuron or second neuron; The weight generator includes a first random number generator and a second random number generator connected to the first random number generator; The second random number generator is used to generate a connection matrix whose sparsity matches the weight sparsity information according to the second random seed in response to the second control information, and send the connection matrix corresponding to the first neuron in the target processing core to the first random number generator, wherein the second control information includes the weight sparsity information corresponding to the first neuron in the target processing core; The first random number generator is used to generate at least a portion of connection weights between a first neuron and a second neuron for which connection weights need to be generated according to a first random seed and the connection matrix.

29. A data processing device, comprising: A weight acquisition unit, configured to, in response to receiving an input pulse, acquire a connection weight corresponding to a first neuron corresponding to the input pulse in a target processing core using a weight generation device according to any one of claims 23 to 27 or a weight generation device according to claim 28; the connection weight is a connection weight between the first neuron and the second neuron; The integral issuing unit is configured to perform a membrane potential integral operation on the first neuron according to the input pulse corresponding to the first neuron and the corresponding connection weight.

30. A data processing device, comprising: A weight acquisition unit, configured to acquire a connection weight between the first neuron and the second neuron by using the weight generation device according to any one of claims 23 to 27 or the weight generation device according to claim 28 when the first neuron of the target processing core meets the release condition; The integral issuing unit is configured to send input information to the second neuron, wherein the input information includes an input pulse and a connection weight between the first neuron and the second neuron, so that the second neuron can perform a membrane potential integral operation according to the input pulse and the connection weight.

31. A processing core comprising a weight generating device and / or a data processing device; The weight generating device comprises a weight generating device as claimed in any one of claims 23 to 28; The data processing device comprises the data processing device according to claim 29 or the data processing device according to claim 30.

32. A many-core system comprising a plurality of processing cores, at least one of the processing cores being the processing core of claim 31.

33. An electronic device comprising: Multiple processing cores; as well as An on-chip network configured to exchange data between the plurality of processing cores and external data; One or more instructions are stored in one or more of the processing cores, and one or more of the instructions are executed by one or more of the processing cores so that one or more of the processing cores can execute the weight generation method as described in any one of claims 1-20, or the data processing method as described in claim 21, or the data processing method as described in claim 22.

34. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by the processing core, it implements the weight generation method according to any one of claims 1 to 20, or the data processing method according to claim 21, or the data processing method according to claim 22.

Citation Information

Patent Citations

  • Neural network model verification method and device, computer equipment and storage medium

    CN112348177A

  • Memoryless weight storage hardware for neural networks

    US20190042913A1