WO2023208027A1 - Information processing method and information processing unit, and device, medium and product - Google Patents

Information processing method and information processing unit, and device, medium and product Download PDF

Info

Publication number
WO2023208027A1
WO2023208027A1 PCT/CN2023/090799 CN2023090799W WO2023208027A1 WO 2023208027 A1 WO2023208027 A1 WO 2023208027A1 CN 2023090799 W CN2023090799 W CN 2023090799W WO 2023208027 A1 WO2023208027 A1 WO 2023208027A1
Authority
WO
WIPO (PCT)
Prior art keywords
neuron
information
storage space
processing
computing
Prior art date
Application number
PCT/CN2023/090799
Other languages
French (fr)
Chinese (zh)
Inventor
吴臻志
祝夭龙
Original Assignee
北京灵汐科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202210475019.6A external-priority patent/CN114861895A/en
Priority claimed from CN202210476435.8A external-priority patent/CN114861896A/en
Priority claimed from CN202210467443.6A external-priority patent/CN114816755A/en
Application filed by 北京灵汐科技有限公司 filed Critical 北京灵汐科技有限公司
Publication of WO2023208027A1 publication Critical patent/WO2023208027A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons

Definitions

  • Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an information processing method and processing unit, electronic equipment, computer-readable storage media, and computer program products.
  • Artificial intelligence is the study of using computers to simulate certain human thinking processes and intelligent behaviors (such as learning, reasoning, thinking or planning, etc.). It mainly includes the principles of computer realization of intelligence, the manufacture of computers similar to human brain intelligence, and the use of Computers can achieve higher-level applications. With the continuous development of artificial intelligence technology, the application of neural networks is becoming more and more widespread, and neural networks in artificial intelligence technology can be constructed from a large number of neurons.
  • Embodiments of the present disclosure provide an information processing method and processing unit, electronic equipment, computer-readable storage media, and computer program products.
  • embodiments of the present disclosure provide an information processing method, which is applied to a many-core system. At least part of the processing cores of the many-core system are loaded with neurons of a neural network.
  • the information processing method including: dynamically scheduling storage resources according to the issuance information of the neuron, so that the neuron performs issuance processing based on the scheduled storage resources, and/or dynamically scheduling computing resources according to the issuance information of the neuron, For the neurons to perform computing tasks based on the scheduled computing resources; wherein the storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
  • the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system, and the weight information of the non-sparse neurons of the neural network is stored in the many-core system.
  • the neural network neuron information storage method includes: determining whether the neuron is a sparse neuron or a non-sparse neuron at the current moment according to the recent firing activity of the neuron of the neural network; If the current moment is a sparse neuron, and the neuron was a non-sparse neuron at the moment before the current moment, the weight information of the neuron is transferred from the on-chip storage space of the many-core system to the many-core system.
  • Additional storage space outside the system when the neuron is a non-sparse neuron at the current time, and the neuron was a sparse neuron at the time before the current time, the weight information of the neuron is obtained from the public
  • the additional storage space outside the core system is transferred to the on-chip storage space of the many-core system.
  • the first neuron when the first neuron satisfies the conditions related to firing, it is determined whether there is information required for firing processing of the first neuron in the processing core, and the first neuron is loaded in the firing core. Any one of the neurons of the processing core; when there is no information required for the firing processing of the first neuron in the processing core, obtain the third from an external storage space outside the many-core system. Information required for firing processing of a neuron; storing the information required for firing processing in the processing core, and performing operations corresponding to firing-related conditions satisfied by the first neuron.
  • the calculation amount of each of the multiple calculation nodes within a predetermined time period is determined; when the calculation amount among the various calculation nodes is unbalanced, at least one nerve in the calculation node that is overloaded with the calculation amount is The computing task of the element is transferred to the target computing node, where the target computing node is a computing node that satisfies preset conditions and is not overloaded in computing capacity.
  • the synaptic information of the synapse connected to the current computing node is determined.
  • the synaptic information includes the position information of the successor neuron of the neuron corresponding to the current computing node, and the position information of the neuron corresponding to the current computing node.
  • Synaptic weight send the synaptic weight of the neuron corresponding to the current computing node to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation, wherein, when there is a task transfer notification When at least part of the position information of the subsequent neurons is carried by the task transfer notification, and the task transfer notification is a task transfer notification generated by executing any one of the information processing methods described in the embodiments of the present disclosure.
  • embodiments of the present disclosure provide an information processing unit, which is applied to a many-core system. At least part of the processing cores of the many-core system are loaded with neurons of a neural network.
  • the information processing unit It includes: a dynamic scheduling subunit configured to dynamically schedule storage resources according to the issuance information of the neuron, so that the neuron can perform issuance processing based on the scheduled storage resources, and/or, according to the neuron's issuance information. Release information and dynamically schedule computing resources for the neurons to perform computing tasks based on the scheduled computing resources; wherein the storage resources include on-chip storage space of the many-core system and/or external storage space of the many-core system of additional storage space.
  • the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system, and the weight information of the non-sparse neurons of the neural network is stored in the many-core system.
  • the dynamic scheduling subunit includes: a neural network neuron information storage device; the neural network neuron information storage device includes: a judgment module configured to be active according to the recent release of neurons of the neural network Determine whether the neuron at the current moment is a sparse neuron or a non- Sparse neuron; the first execution module is configured to change the weight of the neuron when the neuron is a sparse neuron at the current moment and the neuron is a non-sparse neuron at the moment before the current moment.
  • the second execution module is configured to be a non-sparse neuron at the current moment of the neuron, and the neuron
  • the weight information of the neurons is transferred from the external storage space outside the many-core system to the on-chip storage space of the many-core system.
  • the dynamic scheduling subunit includes: a neural network neuron information processing device;
  • the neural network neuron information processing device includes: a judgment module configured to: , determine whether there is information required for the firing processing of the neuron in the processing core, and the neuron is any one of the neurons loaded in the processing core;
  • the acquisition module is configured to When the information required for the firing processing of the neuron does not exist in the system, the information required for the firing processing of the neuron is obtained from an external storage space outside the many-core system;
  • the execution module is configured to transfer the firing Information required for processing is stored in the processing core, and operations corresponding to firing-related conditions satisfied by the neuron are performed.
  • the dynamic scheduling subunit includes: a scheduling device for computing resources; the scheduling device for computing resources includes: a computing amount determination module configured to determine the time of each computing node among multiple computing nodes. The amount of calculation within a predetermined time period; the task transfer module is configured to transfer the calculation task of at least one neuron in the calculation node with overloaded calculation amount to Target computing node, wherein the target computing node is a computing node that meets preset conditions and is overloaded with calculations.
  • the dynamic scheduling subunit includes: a data processing device; the data processing device includes: an associated synapse information determination module configured to determine synapse information of a synapse connected to the current data processing device , the synaptic information includes the position information of the successor neuron of the neuron corresponding to the current data processing device and the synaptic weight of the neuron corresponding to the current data processing device; the sending module is configured to send the neuron corresponding to the current data processing device.
  • the synaptic weight of the neuron is sent to the computing node corresponding to the succeeding neuron, so that the computing node corresponding to the succeeding neuron performs synaptic integral calculation, wherein, in the case of a task transfer notification, at least some of the succeeding neurons
  • the location information of the element is carried by the task transfer notification.
  • an embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program, the embodiment of the present disclosure is implemented. Any information processing method.
  • embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, any information processing method of the embodiments of the disclosure is implemented.
  • embodiments of the present disclosure provide a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is in a processor of an electronic device When running, the processor in the electronic device executes the information processing method described in any one of the embodiments of the present disclosure.
  • Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
  • FIG. 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • FIG. 3 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 4a is a schematic coordinate diagram of the firing value of a neuron changing with time.
  • Figure 4b is a schematic coordinate diagram of neuron activity changing with time.
  • FIG. 5 is a schematic diagram of a many-core system loaded with neural networks provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 9 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 10 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 11 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 12 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 13 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 14 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 15 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 16 is a schematic diagram of a neural network provided by an embodiment of the present disclosure.
  • Figure 17 is a block diagram of an information processing unit provided by an embodiment of the present disclosure.
  • Figure 18 is a block diagram of a neural network neuron information storage device provided by an embodiment of the present disclosure.
  • Figure 19 is a block diagram of a neural network neuron information processing device provided by an embodiment of the present disclosure.
  • Figure 20 is a block diagram of a computing resource scheduling device provided by an embodiment of the present disclosure.
  • Figure 21 is a block diagram of a data processing device provided by an embodiment of the present disclosure.
  • Figure 22 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • Figure 23 is a block diagram of a computer-readable storage medium provided by an embodiment of the present disclosure.
  • the neural network in artificial intelligence technology is composed of a large number of neurons. Each neuron can connect to other neurons.
  • the connection strength between neurons is represented by the connection weight, and any neuron can send corresponding signals to the target neuron, so that After receiving the emitted signal, the target neuron performs corresponding processing based on the connection weight and the emitted signal.
  • the storage of connection weights and target neurons and other related information requires a large amount of storage space. How to optimize the storage of the above information? Become one of the practical problems faced.
  • neural networks can be executed through processing chips.
  • the neural network can be loaded on a many-core system. Since the connection weights of the neural network need to occupy storage space, when the neural network is loaded on a many-core system ,The connection weight can be stored in the on-chip ,storage space of the many-core system or in the additional ,storage space outside the many-core system.
  • the relevant information of the target neuron can be stored in the on-chip storage space of the many-core system, or in an external storage space outside the many-core system.
  • connection weights For example, connection weights
  • some information may need to be sacrificed (for example, Reduce the accuracy of connection weights), which may affect the performance of the neural network.
  • the information required for neuron firing processing is stored in the on-chip storage space (for example, processing (inside the core) may cause the storage cost of the many-core system to be too high, which may affect the power consumption of the processing core.
  • the processing core requires larger storage space, and its size (i.e. area) will inevitably be affected.
  • relevant information for example, connection weights
  • the relevant information for example, connection weights
  • many-core systems need to read relevant information from the external storage space. Reading relevant information from the external storage space is expensive in terms of power consumption and takes up a large amount of bandwidth, which not only increases the time required to read information The cost of power consumption will also affect the processing speed and efficiency of the neural network.
  • computing resources are usually allocated only based on the static connection characteristics of neurons, which may cause uneven computing pressure and load, thereby reducing the overall computing efficiency.
  • the relevant technology cannot scientifically and balancedly schedule storage resources and computing resources for the neurons of the neural network. Due to unreasonable scheduling of storage resources, it may cause the acquisition cost of relevant information such as weights and target neurons to be high or affect the neural network. Due to unreasonable scheduling of computing resources, the processing speed and efficiency of the network may lead to uneven computing pressure, which is also not conducive to improving the processing speed and efficiency of the neural network.
  • embodiments of the present disclosure provide an information processing method and processing unit, electronic equipment, computer-readable storage media, and computer program products.
  • the information processing method of the embodiment of the present disclosure dynamically schedules storage resources according to the release information of neurons, so that the neurons perform release processing based on the scheduled storage resources, and/or dynamically schedules computing resources according to the release information of neurons. , for neurons to perform computing tasks based on scheduled computing resources.
  • the scheduling of storage resources and computing resources is determined based on the release information of neurons, the impact of whether neurons are active on storage resources and computing resources is fully considered in this process. Therefore, the scheduling of resources is more reasonable.
  • the scheduled resources can more closely meet the current needs of neurons; on the other hand, the scheduling of storage resources and computing resources is not a one-time event, but a dynamic scheduling process, that is, it can be based on changes in the activity of neurons. The situation is adjusted in a timely manner so that the storage resources and computing resources are always relatively consistent with the current needs of the neurons. While meeting the needs of the neurons, the storage resources and computing resources are fully utilized.
  • the information processing method in the embodiment of the present disclosure can be executed by electronic equipment such as a terminal device or a server.
  • the terminal device can be a vehicle-mounted device, user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal phone, etc.
  • PDA Personal Digital Assistant
  • the information processing method can be implemented by the processor calling computer-readable program instructions stored in the memory.
  • the information processing method of the embodiment of the present disclosure may be executed through a server, where the server may be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
  • embodiments of the present disclosure provide an information processing method.
  • Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
  • the information processing method of the embodiment of the present disclosure can be applied to a many-core system. At least some of the processing cores of the many-core system are loaded with neurons of a neural network.
  • the information processing method includes:
  • step S1 dynamically schedule storage resources according to the neuron's firing information, so that the neuron can perform firing processing based on the scheduled storage resources, and/or dynamically schedule computing resources according to the neuron's firing information, so that the neuron can perform firing processing based on the scheduled storage resources.
  • the element executes computing tasks based on scheduled computing resources;
  • the storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
  • the neural network in the embodiment of the present disclosure may be a spiking neural network (SNN), an artificial neural network (Artificial Neural Network, ANN), or other neural networks composed of multiple neurons.
  • SNN spiking neural network
  • ANN Artificial Neural Network
  • the neural network in the embodiment of the present disclosure may be a neural network loaded in a many-core system, and at least part of the processing cores of the many-core system corresponds to one or more neurons of the neural network.
  • neurons are the basic units through which the nervous system implements its functions. When certain conditions are met, neurons can output signals. This behavior is called neuron firing.
  • the firing information of the neuron is information used to reflect the firing behavior of the neuron.
  • the neuron firing information may include at least one of the neuron firing times within a preset time period, firing time, firing signal, firing frequency, activity, and other information.
  • the firing information of the neuron may include the recent firing activity of the neuron (that is, the activity program used to reflect the recent firing behavior of the neuron).
  • neuron firing information can be used to dynamically schedule storage resources to allocate storage resources to neurons in a more scientific and reasonable manner, and enable neurons to operate conveniently and efficiently based on the scheduled storage resources. Execute release processing.
  • the firing information of the neuron includes the recent firing activity of the neuron; accordingly, dynamically scheduling storage resources according to the firing information of the neuron includes: determining the state change information of the neuron according to the recent firing activity of the neuron. , and based on the state change information of neurons, dynamically schedule the on-chip storage space of the many-core system and/or the additional storage space outside the many-core system to store the neural network neuron information; where the state of the neuron includes sparse neurons or non- Sparse neurons, the state change information of neurons is used to characterize the changes of neurons between sparse neurons and non-sparse neurons.
  • the neuron information of a neural network at least includes the weight information of the neuron.
  • the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system.
  • the weight information of the non-sparse neurons of the neural network is stored in the many-core system.
  • the on-chip storage space of the many-core system determines the state change information of the neuron based on the recent firing activity of the neuron, and dynamically schedules the on-chip storage space of the many-core system and/or the additional storage space outside the many-core system based on the state change information of the neuron.
  • Store neural network neuron information including: determining whether the neuron is a sparse neuron or a non-sparse neuron at the current moment based on the recent firing activity of the neuron of the neural network; the neuron is a sparse neuron at the current moment, and the neuron is currently When the moment before the moment is a non-sparse neuron, the weight information of the neuron is transferred from the on-chip storage space of the many-core system to an external storage space outside the many-core system; when the neuron is a non-sparse neuron at the current moment, and the neuron When there are sparse neurons at the moment before the current moment, the weight information of the neurons is transferred from the external storage space outside the many-core system to the on-chip storage space of the many-core system.
  • storing the weight information of the neuron in an external storage space outside the many-core system can reduce the weight information's occupation of the on-chip storage space of the many-core system, allowing the on-chip storage space of the many-core system to have larger storage space. More useful information (such as weight information that is used more frequently) will help improve the performance of the neural network.
  • the neuron's firing value is often not 0 during the recent execution of the neural network in the many-core system, or it is firing frequently, and its execution in a period of time will In the process of neural network, there is also a high probability of distribution. Because when the firing value of a neuron is not 0, when calculating the input current value of the subsequent neuron connected to the neuron, the weight information of the neuron needs to be read, so that the weight information of the neuron in the subsequent period can be determined. Many-core system execution nerve During the network process, the weight information of the neuron has a high probability of participating in the calculation, which requires a large reading power consumption and has a large impact on the processing efficiency of the neural network.
  • the on-chip storage space of the many-core system can be scheduled to store the weight information of the neuron, so that the weight information can be easily read when the many-core system executes the neural network, and it can also alleviate the impact on the processing efficiency of the neural network.
  • the impact that the recent firing activity of neurons may have on storage resources may not be considered (for example, the impact of reading data from storage resources may not be considered, and/or The impact when writing data to storage resources), therefore, may lead to longer data read and write times, and read and write operations may have an adverse impact on processing performance.
  • the issuance of neurons is fully considered, and based on this, the characteristics of read and write operations on storage resources under different issuance situations are analyzed, and a more reasonable storage resource scheduling plan is formulated based on the characteristics of read and write operations. In order to meet the storage requirements, it can improve the efficiency of reading and writing as much as possible, and alleviate the adverse impact that reading and writing may have on processing performance.
  • the above-mentioned scheduling process of storage resources is not a one-time process, but can be carried out in a timely manner based on the current release information of neurons according to needs (for example, rescheduling based on time period requirements, or scheduling in response to certain events). Dynamically adjust so that the allocation of storage resources and the distribution of neurons are always relatively consistent, ensuring timely scheduling of storage resources.
  • a neuron when it performs firing processing, it may need to obtain the information required for firing processing from the corresponding storage space, and perform corresponding firing processing based on the information required for firing processing.
  • the information required for the firing process may include at least one of the weight information of the neuron, the target processing core information (for example, the information of the processing core corresponding to the target neuron that receives the firing signal), etc., in this embodiment of the present disclosure No restrictions.
  • storage resources are used to store information required for neuron firing processing.
  • the process of neurons performing firing processing based on scheduled storage resources includes: when the neuron meets firing conditions, determine the neuron's firing conditions.
  • the storage location of the information required for issuance processing is obtained based on the storage location, and the information required for issuance processing is performed based on the information required for issuance processing.
  • the storage location corresponds to the on-chip storage space of the many-core system or outside the many-core system. of additional storage space.
  • the on-chip storage space of the many-core system stores the information required for the neuron's firing processing. If the many-core system If the on-chip storage space of the system does not store the information required for the firing processing of the neuron, the information required for the firing processing of the neuron is read from the external storage space of the many-core system, and the information required for the firing processing is stored in the on-chip storage space.
  • the information required for the firing processing can be obtained conveniently and quickly from the on-chip storage space; conversely, if the on-chip storage space of the many-core system stores the information required for the firing processing of the neuron, then the information required for the firing processing of the neuron can be stored from the on-chip storage space.
  • the space reads the information required for the firing processing of the neuron, and performs firing processing based on the information required for the firing processing of the neuron.
  • the neuron firing process includes: when the neuron meets firing-related conditions, determine whether there is information required for neuron firing processing in the processing core loaded with the neuron; if there is no neuron firing in the processing core When processing the required information, obtain the information required for neuron firing processing from the external storage space outside the many-core system; store the information required for firing processing in the processing core, and perform operations corresponding to the firing-related conditions that the neuron meets. .
  • neuron release information can also be used to dynamically schedule computing resources to make more scientific and reasonable use of computing resources and make neurons more efficient. Computing tasks can be executed efficiently and stably based on scheduled computing resources.
  • At least some of the neurons constitute a computing node; accordingly, dynamically scheduling computing resources according to the firing information of the neurons includes: for at least one of the multiple computing nodes, based on the firing of multiple neurons in the computing node Information, determine the calculation amount of the computing node; when it is determined that there is an imbalance in the calculation amount based on the calculation amount of multiple computing nodes, adjust the computing task of at least one neuron of at least part of the computing nodes.
  • the scheduling process of computing resources may include: determining the computing volume of each computing node among multiple computing nodes within a predetermined time period; and overloading the computing volume when the computing volume among the multiple computing nodes is unbalanced.
  • the computing task of at least one neuron in the node is transferred to the target computing node, where the target computing node is a computing node that meets preset conditions and is not overloaded in computing capacity.
  • computing tasks are assigned to each computing node to achieve scheduling of computing resources. Instead, the correlation between the amount of calculation and the firing of neurons is taken into account, and based on the firing information of neurons, the computing tasks of neurons in the computing nodes with unbalanced calculation amounts are dynamically and evenly adjusted to achieve the goal of solving the problem. More accurate and reasonable scheduling of computing resources keeps the computing workload and computing resources of each computing node in a relatively balanced state.
  • the information processing method of the embodiment of the present disclosure can be applied to at least the following processing processes:
  • the weight information of the neuron is stored in the on-chip storage space or the off-chip storage space, and in the neuron-based Send information to determine the neuron
  • the weight information is transferred accordingly between the on-chip storage space and the off-chip storage space, which essentially implements a neural network neuron information storage method
  • Figure 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the storage of neuron information in neural networks.
  • an embodiment of the present disclosure exemplarily provides a storage process of neural network neuron information, wherein the neural network may be a neural network loaded in a many-core system, and the neural network neuron information may at least include the weight information.
  • the sparsity of the neurons (such as the number of non-zero connection weights with the predecessor neuron or the successor neuron) can be determined. ) Divide neurons into sparse neurons and non-sparse neurons, store the weight information of sparse neurons in an additional storage space outside the many-core system, and store the weight information of non-sparse neurons in the on-chip storage of the many-core system space.
  • the weight information of a neuron may include a value that represents the connection weight between the neuron and its successor neurons, which may be the connection weight value between the neuron and its successor neurons, or may be weight index information and effective weight.
  • the weight index information includes identification information corresponding to the neuron's successor neurons. The identification information is used to indicate whether the connection weight between its corresponding successor neuron and the neuron is zero.
  • the effective weight information can include the effective weight. value, each valid weight value is a non-zero connection weight value between this neuron and a subsequent neuron.
  • the additional storage space outside the many-core system may be other chips, servers, etc. with storage functions in addition to the many-core system, and the embodiments of the present disclosure do not limit this.
  • the neural network neuron information storage process may include:
  • S201 Determine whether the neuron at the current moment is a sparse neuron or a non-sparse neuron based on the recent firing activity of the neuron of the neural network.
  • the processing core corresponding to the neuron of the neural network obtains the recent firing activity of the neuron (that is, the recent firing activity), and determines whether the neuron is a sparse neuron or a non-sparse neuron at the current moment based on the recent firing activity.
  • the neuron is determined to be a sparse neuron at the current moment, it means that the neuron is often silent in the recent process of executing neural networks in many-core systems (that is, the firing value of the neuron is often 0, or infrequently. issued), there is a high probability that it will not be issued during the execution of the neural network for a period of time.
  • the weight information of the neuron is stored in an external storage space outside the many-core system, during the process of the many-core system executing the neural network, since the weight information is read less times, the required reading power consumption is Naturally, it is very small and has little impact on the processing efficiency of the neural network.
  • storing the weight information of the neuron in an external storage space outside the many-core system can reduce the weight information's occupation of the on-chip storage space of the many-core system, allowing the on-chip storage space of the many-core system to have larger storage space. More useful information (such as weight information that is used more frequently) will help improve the performance of the neural network.
  • a neuron is determined to be a non-sparse neuron at the current moment, it means that in the process of executing neural networks in recent many-core systems, the firing value of this neuron is often not 0, or it is often firing. In the process of executing the neural network, there is a high probability that it will be distributed.
  • the weight information of the neuron needs to be read. Therefore, when a neuron is determined to be a non-sparse neuron at the current moment, when the many-core system executes the neural network within a period of time, the weight information of the neuron has a high probability of participating in the calculation and needs to be read. Power consumption is relatively Large, it also has a greater impact on the processing efficiency of the neural network.
  • weight information is stored in the on-chip storage space of the many-core system, it is convenient to read the weight information during the execution of the neural network in the many-core system and avoid affecting the processing efficiency of the neural network.
  • connection weight value of the sparse neuron and the subsequent neuron is stored in an external storage space outside the many-core system, and the connection weight value of the non-sparse neuron is stored In the on-chip storage space of the many-core system, while not affecting the processing efficiency of the neural network, the connection weight value is reduced on the on-chip storage space of the many-core system, so that the on-chip storage space of the many-core system can have a larger storage space. More important information improves the performance of neural networks.
  • the processing core can also process the weight information of the neurons accordingly.
  • the weight information of the neuron can be stored in an additional storage space outside the many-core system to save the on-chip storage space occupied by the weight information of the neuron.
  • the neuron was a non-sparse neuron at the moment before the current moment, that is to say, the weight information of the neuron is stored in the on-chip storage space of the many-core system, so it is necessary to store the weight information of the neuron from the on-chip storage space of the many-core system.
  • the space is transferred to additional storage space outside the many-core system.
  • the transfer of neuron weight information between storage spaces is essentially the scheduling of storage resources.
  • transferring the weight information of neurons from the on-chip storage space of the many-core system to the additional storage space outside the many-core system can be understood as the weight information of the neurons, which is stored in the on-chip processing space of the scheduling many-core system and converted into Schedule additional storage space outside the many-core system for storage.
  • Other situations are similar and will not be described here.
  • the weight information of the neuron can be stored in the on-chip storage space of the many-core system to facilitate the processing core to read the neuron when the neuron fires. Neuron weight information.
  • the neuron was a non-sparse neuron before the current moment, that is to say, the weight information of the neuron is stored in an external storage space outside the many-core system, so the weight information of the neuron needs to be transferred from the many-core system.
  • the additional storage space is transferred to the on-chip storage space of the many-core system (the transfer of weight information is achieved through the scheduling of storage resources).
  • the neuron was a non-sparse neuron before the current moment, and it is still determined to be a non-sparse neuron at the current moment, that is, the sparsity of the neuron has not changed, then the weight information of the neuron does not change. If it needs to be processed, it can continue to be stored in the on-chip storage space of the many-core system.
  • the neuron was a sparse neuron before the current moment, and it is still determined to be a sparse neuron at the current moment, that is, the sparsity of the neuron has not changed, then the weight information of the neuron does not need to be processed processing, it can continue to be stored in the additional storage space outside the many-core system.
  • the input and other information of the neural network changes, the input of at least some neurons of the neural network will also change accordingly, and the firing value of the neuron may naturally change accordingly.
  • the recent firing activity of the neuron will change with the
  • the input information of the neural network changes with the change of the input information of the neural network.
  • the input information of the neural network is a quantity that changes with time, so the recent firing activity of the neuron also changes with time.
  • a neuron Whether a neuron is a sparse neuron or a non-sparse neuron may also change over time and is dynamic.
  • the call to storage resources also changes accordingly, making the scheduling of storage resources a dynamic process.
  • the processing core dynamically determines whether a neuron is a sparse neuron or a non-sparse neuron based on its recent firing activity, which can alleviate the change of sparse neurons into non-sparse neurons over time, but its weight information is still stored in the many-core system. The impact of additional storage space on the processing efficiency of the neural network.
  • the weight information of the neurons when transferring the weight information of neurons from the on-chip storage space of the many-core system to an external storage space outside the many-core system, the weight information of the neurons may be transferred from the on-chip storage space of the many-core system to the many-core system.
  • An external storage space is provided outside the system, and the address information of the neuron's weight information in the external storage space is stored in the on-chip storage space of the many-core system, so that the many-core system can obtain the weight information of the neuron based on the address information.
  • the address information may be the weight information of the neuron plus the starting address of the additional storage space and the length occupied by the weight information.
  • transferring the weight information of the neuron from an external storage space outside the many-core system to the on-chip storage space of the many-core system may be to transfer the weight information of the neuron from an external storage space outside the many-core system to the neural system.
  • the weight information of the neuron when the neuron is a sparse neuron, includes weight index information and effective weight information.
  • the weight index information includes identification information, and there is a relationship between the identification information and the subsequent neurons of the neuron.
  • the correspondence relationship (for example, each identification information can correspond to a successor neuron of a neuron) is used to indicate whether the connection weight value between the successor neuron and the neuron is zero; the effective weight information includes the effective weight value, and each effective weight The value is the non-zero connection weight between the neuron and a subsequent neuron.
  • the weight information of the neuron includes the connection weight value of the neuron and its subsequent neurons.
  • connection weight value By storing the connection weight value between a non-sparse neuron and its successor neuron as index information and effective weight information, there is no need to store the connection weight value with a zero connection weight value.
  • the connection weight value is zero, the storage space occupied by the connection weight value storage can be saved.
  • connection weight value of the sparse neuron and the subsequent neuron is stored in an external storage space outside the many-core system, and the connection weight value of the non-sparse neuron is stored In the on-chip storage space of the many-core system, while not affecting the processing efficiency of the neural network, the connection weight value is reduced on the on-chip storage space of the many-core system, so that the on-chip storage space of the many-core system can have a larger storage space. More important information improves the performance of neural networks.
  • Figure 3 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the storage of neuron information in neural networks.
  • the neural network neuron information storage process includes:
  • S301 Determine whether the neuron is a sparse neuron or a non-sparse neuron according to the recent firing activity of the neuron of the neural network every predetermined time.
  • the processing core obtains the activity of the neuron in the recent transmission (i.e., the activity of the recent transmission) every preset scheduled time, and determines whether the neuron is a sparse neuron or a non-sparse neuron based on the obtained activity of the recent transmission.
  • the recent firing activity of a neuron includes the firing frequency of the neuron in a predetermined time period before the current moment, the change in the firing frequency of the neuron in the predetermined time period before the current moment, and the firing frequency of the neuron in the current moment. At least one of the activity levels.
  • the recent firing activity of a neuron obtained by the processing core can include the activity of the neuron at the current moment, the firing frequency of the neuron in a predetermined time period before the current moment, and the firing frequency of the neuron at the current moment.
  • the length of the predetermined time period and the length of the interval for determining whether the neuron is a sparse neuron or a non-sparse neuron may be the same or different.
  • the processing core last obtained the recent firing of the neuron.
  • the time of activity can be t2 (in this case, the length of the predetermined time period can be the same as the length of the interval for determining whether the neuron is a sparse neuron or a non-sparse neuron), or it can be before or after t2 time (in this case, the length of the predetermined time period may be different from the length of the interval for determining whether the neuron is a sparse neuron or a non-sparse neuron).
  • the firing frequency of a neuron in the predetermined time period before the current moment can be calculated by counting the number of times the neuron's firing value is not 0 (that is, not silent) within the predetermined time period. For example, if the predetermined time period before the current moment is t2 to In the time period of t1, the number of times the neuron's firing value is not 0 in the time period from t2 to t1 can be counted as the firing frequency of the neuron in the predetermined time period before the current time.
  • the change in the firing frequency of the neuron in the predetermined time period before the current time can be calculated by the firing frequency of the neuron in the adjacent predetermined time period. If the predetermined time period before the current time is the time period from t2 to t1, then The difference between the firing frequency of neurons in the time period from t2 to t1 and the firing frequency of neurons in the time period from t3 to t2 (the length of the time period from t3 to t2 is consistent with the length of the time period from t2 to t1) can be expressed as The amount of change in the firing frequency of a neuron during a predetermined period of time before the current moment.
  • the activity of a neuron at the current moment can be determined by the activity of the neuron at the previous moment and the firing value of the neuron at the current moment.
  • the activity of a neuron at time t can be determined by the activity of the neuron at the previous time of time t and the firing value of the neuron at time t.
  • the value of ⁇ is determined by the activity of the neuron at time t.
  • the value of ⁇ determines the degree of influence of the firing value of the neuron at moment t on the activity of the neuron at moment t.
  • ⁇ , ⁇ can all be values less than 1.
  • Figure 4a is a schematic coordinate diagram of the firing value of a neuron changing with time, in which the abscissa t represents the time, and the ordinate represents the firing value (firing) of the neuron.
  • the neuron fired at t4, t5, and t6 (the firing value was 1), and was silent (or the firing value was 0) at other times.
  • Figure 4b is a schematic coordinate diagram showing the change of neuron activity over time, in which the abscissa t represents the time and the ordinate represents the neuron activity (trace).
  • the neuron has been silent before time t4, that is, the activity of the neuron has been 0 before time t4, and the neuron fired at time t4 (for example, the firing value is 1).
  • the activity of the neuron at time t4 can be calculated.
  • the activity of the neuron at time (t4+1) can be calculated, which is less than trace(t4).
  • trace(t4+2) is less than trace(t4+1)
  • ...trace (t5-1) is smaller than trace(t5-2), that is, the activity of neurons is continuously decreasing between time t4 and time t5.
  • the activity of the neuron at time (t5+1) is less than trace(t5).
  • trace(t5+2) must be less than trace(t5+1)
  • ...trace(t6-1) must be less than trace(t6-2), that is, between time t5 and time t6, the activity of neurons also continues to decrease.
  • a neuron is a non-sparse neuron before the current moment, it means that the weight information of the neuron is stored in the on-chip storage space of the many-core system. If the neuron is still determined to be a non-sparse neuron at the current moment, the weight information of the neuron It can still be stored in the on-chip storage space of the many-core system, so there is no need to process the weight information of the neurons. On the contrary, if the neuron is determined to be a sparse neuron at the current moment, the weight information of the neuron can be transferred from the on-chip storage space of the many-core system to an external storage space outside the many-core system.
  • the address information of the weight information of the neuron in the external storage space can also be stored in the on-chip storage space of the many-core system, so that the many-core system can When needed, the weight information of the neuron can be obtained based on the address information.
  • the address information can be the weight information of the neuron plus the starting address of the additional storage space and the length occupied by the weight information. That is to say, the many-core system can read the length occupied by the weight information starting from the starting address. Information obtains weight information.
  • Figure 5 is a schematic diagram of a many-core system loaded with a neural network provided by an embodiment of the present disclosure.
  • the computing unit of the processing core corresponding to the neuron calculates the firing value of the neuron and uses the information stored on its corresponding chip.
  • the address information of the weight information of the storage space can be accessed through the scheduler outside the many-core system to access the additional storage space outside the many-core system, read the weight information corresponding to the neuron, and determine the correspondence of each subsequent neuron from the weight information.
  • the connection weight value, and the corresponding connection weight value and the firing value of the neuron are sent to the corresponding processing core of the subsequent neuron (i.e., the processing core corresponding to the small square in Figure 5).
  • the weight information of the neuron may include weight index information and effective weight information; when the neuron is a non-sparse neuron, the weight information of the neuron Can include the connection weight value of this neuron and its successor neurons.
  • the neuron since the neuron was a non-sparse neuron at the moment before the current moment, its weight information is the connection weight value of the neuron and its successor neurons. Before transferring the weight information to the external storage space outside the many-core system, it can The weight index information and effective weight information of the neuron are obtained according to the connection weight value of the neuron and its subsequent neurons, and then the weight index information and effective weight information of the neuron are stored in an additional storage space outside the many-core system, and the The weight index information of the neuron and the effective weight information plus the address information of the external storage space are stored in the on-chip storage space of the many-core system.
  • a neuron is a sparse neuron before the current moment, it means that the weight information of the neuron is stored in an additional storage space outside the many-core system. If the neuron is still determined to be a sparse neuron at the current moment, the neuron will The weight information of neurons can still be stored in the external storage space outside the many-core system, so there may be no need to process the weight information of neurons. On the contrary, if the neuron is determined to be a non-sparse neuron at the current moment, the neuron's weight information can be transferred from the external storage space outside the many-core system to the on-chip storage space corresponding to the neuron's successor neuron.
  • the connection weight value between the neuron and each subsequent neuron can be stored in the corresponding successor neuron.
  • On-chip storage space so that the computing unit of the processing core corresponding to the neuron can be shown as the dotted line with arrow in Figure 5.
  • the weight value of the connection between the subsequent neuron and the neuron is saved.
  • the computing unit can directly send the firing value of the neuron to the processing core corresponding to the subsequent neuron (i.e., the processing core corresponding to the small square in Figure 5) for the subsequent neuron to use according to the neuron.
  • the weight information of the neuron may include weight index information and effective weight information; when the neuron is a non-sparse neuron, the weight information of the neuron may Includes the connection weight value of this neuron and its successor neurons.
  • the neuron since the neuron was a sparse neuron at the moment before the current moment, its weight information is the weight index information and effective weight information of the neuron. Before transferring the weight information to the on-chip storage space corresponding to the subsequent neuron, it can be based on The weight index information and effective weight information of the neuron obtain the connection weight value of the neuron and its successor neurons, and then store the connection weight value of the neuron and each successor neuron in the on-chip storage corresponding to the corresponding successor neuron. space.
  • Figure 6 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the processing of neuron information in neural networks.
  • an embodiment of the present disclosure exemplarily provides a processing process of neural network neuron information.
  • the neural network in the embodiment of the present disclosure may be a neural network loaded on a many-core system, such as a spiking neural network, an artificial neural network, or other neural networks composed of multiple neurons, and the embodiment of the present disclosure is not limited to this.
  • a many-core system loaded with a neural network may include multiple processing cores. At least some of the processing cores are loaded with neurons of the neural network, and are responsible for storing information of the neurons loaded in the processing cores and participating in These neuron-related calculations (such as calculating the input current value, output, etc. of each neuron).
  • the processing core will load the information of the processing core corresponding to the successor neuron of the neuron on it (such as the identification of these processing cores, etc.), and the connection weight value of each neuron and its predecessor neuron and store it in Additional storage space outside of many-core systems.
  • the information processing method of the embodiment of the present disclosure can be executed by the processing core of the many-core system.
  • the neural network neuron information processing process of the embodiment of the present disclosure mainly includes:
  • S603. Store the information required for firing processing in the processing core, and perform operations corresponding to the firing-related conditions satisfied by the first neuron.
  • the information required for neurons and firing processing is stored in an additional storage space outside the many-core system, which reduces the storage cost of the many-core system; at the same time, when the neurons meet firing-related conditions, Read the information required for neuron firing processing from the external storage space, and store the obtained information required for firing processing in the processing core corresponding to the neuron.
  • the neuron If the relevant conditions for firing are met again, the information required for neuron firing processing can be obtained directly from the processing core, avoiding the need for the information required for neuron firing processing to be stored in the external storage space of the many-core system, resulting in the need for many-core processing every time.
  • the system runs the neural network, it needs to obtain the information required for neuron firing and processing from the external storage space of the many-core system, which affects the operation of the neural network.
  • the first neuron is any one of the neurons loaded in the processing core.
  • the first neuron can be any neuron loaded in any processing core in the many-core system.
  • the "first neuron” here " is only used for convenience of description and is not used to limit neurons.
  • a neural network such as a spiking neural network
  • the first neuron meets the conditions related to firing (if the neural network is a spiking neural network, the firing is pulse firing) (for example, the first neuron wants to transmit to its subsequent neuron issuance)
  • the first god The processing core corresponding to the neuron determines its corresponding storage space, for example, whether there is information required for the firing processing of the first neuron in the Cache (cache memory) of the processing core corresponding to the first neuron.
  • the information required for the firing processing of the first neuron exists in the processing core, the information required for the firing processing is obtained from the processing core, and operations corresponding to the firing-related conditions satisfied by the first neuron are performed.
  • the information required for the firing processing of the first neuron does not exist in the processing core, the information required for the firing processing of the first neuron is obtained from the external storage space outside the many-core system, and the obtained information required for firing processing is stored in the corresponding processing core. storage space, and at the same time perform operations corresponding to the information required for firing processing that the first neuron satisfies.
  • the firing-related condition may be that the first neuron is the source neuron to be fired; the information required for the firing processing of the first neuron may be the processing core information corresponding to the target neuron.
  • the target neuron is a neuron that receives the firing information of the first neuron; the operation corresponding to the firing-related conditions met by the first neuron may be to transmit the firing information of the neuron to the processing core corresponding to the target neuron.
  • the firing information of the first neuron may include the number, time beat, firing value, etc. of the first neuron, which is not limited in the embodiments of the present disclosure.
  • the processing core can confirm whether the storage space corresponding to the many-core system stores the information related to the firing.
  • the processing core information (such as the identification, address and other information of the processing core) corresponding to the subsequent neuron connected by the neuron (that is, the target neuron that receives the information issued by the neuron).
  • the processing core When the processing core stores the processing core information corresponding to the target neuron in the storage space corresponding to the many-core system, the processing core can transmit the firing information of the neuron to the processing core corresponding to the target neuron.
  • the processing core can obtain the processing core information corresponding to the target neuron from the external storage space outside the many-core system, and store the processing core information of the target neuron.
  • the corresponding processing core information is stored in the storage space corresponding to the processing core in the many-core system.
  • the firing information of the neuron can also be transmitted to the processing core corresponding to the target neuron.
  • the firing-related condition may be that the first neuron is a target neuron that receives firing information
  • the information required for firing processing of the first neuron may be that the first neuron is the source neuron corresponding to the firing information.
  • weight information may include connection weight values, and may also include weight index information and effective weight information. The embodiment of the disclosure does not limit the content and storage method of the weight information.
  • the firing-related condition may be that the first neuron is a target neuron that receives firing information
  • the information required for firing processing of the first neuron may be that the first neuron is a source neuron corresponding to the firing information ( That is, the connection weight value of the neuron that emits information); the operation corresponding to the emission-related conditions met by the first neuron may be to calculate the input current value of the first neuron based on the connection weight value.
  • a neuron on the processing core receives the firing information of its predecessor neuron, the neuron meets the firing-related conditions, and the processing core can confirm whether the storage space corresponding to the many-core system stores the neuron.
  • the connection weight value of the source neuron corresponding to the firing information is to say, when a neuron on the processing core receives the firing information of its predecessor neuron, the neuron meets the firing-related conditions, and the processing core can confirm whether the storage space corresponding to the many-core system stores the neuron.
  • the connection weight value of the source neuron corresponding to the firing information is to say, when a neuron on the processing core receives the firing information of its predecessor neuron, the neuron meets the firing-related conditions, and the processing core can confirm whether the storage space corresponding to the many-core system stores the neuron.
  • the connection weight value of the source neuron corresponding to the firing information is to say, when a neuron on the processing core receives the firing information of its predecessor neuron, the neuron meets the firing-related conditions, and the processing
  • the processing core When the processing core stores the connection weight value between the neuron and the source neuron in the storage space corresponding to the many-core system, the processing core can perform a synaptic integration operation based on the connection weight to calculate its input current value.
  • the processing core can obtain the connection weight value between the neuron and the source neuron from the external storage space outside the many-core system. , and store the connection weight value between the neuron and the source neuron in the storage space corresponding to the processing core in the many-core system.
  • synaptic integral operation can also be performed based on the connection weight to calculate its input current value.
  • the neuron firing is performed based on the information required for firing processing obtained from storage resources, ensuring smooth signal transmission between neurons; on the other hand,
  • the scheduling processing of storage resources for the information required for issuance processing is performed, that is, for the neurons that execute the issuance, the on-chip storage space of the many-core system is scheduled to store the information required for its issuance processing (mainly including two situations: the first situation , if the information required for neuron firing processing is itself stored in the processing core, it can be read directly; in the second case, if the information required for neuron firing processing is stored in an external storage space, the storage of the scheduling processing core The resource stores the information required for the firing processing of the neuron and releases the corresponding storage resources in the additional storage space).
  • the information required for neuron firing processing is stored in an external storage space outside the many-core system, which reduces the storage cost of the many-core system.
  • the neuron meets the conditions related to firing, that is, when the information required for the firing processing of the neuron is needed
  • the information required for the firing processing of the neuron is read from the external storage space. And store the acquired information required for firing processing in the processing core corresponding to the neuron.
  • the neuron meets the conditions related to firing again during the subsequent operation of the neural network, that is, the information required for firing processing of the neuron is again needed.
  • the information required for neuron firing processing can be obtained directly from the processing core.
  • the information required for neuron firing processing is always stored in the external storage space of the many-core system.
  • the neuron firing processing information needs to be obtained from the external storage space of the many-core system every time.
  • the above problems can be solved through embodiments of the present disclosure.
  • inactive neurons that is, neurons that do not frequently send or receive information
  • active neurons that is, neurons that often send or receive information
  • they send or receive information during multiple runs of the neural network These neurons meet the conditions related to release, and the release processing of these neurons is
  • the required information only needs to be obtained from the external storage space outside the many-core system when it is used for the first time.
  • the information required for the firing and processing of these neurons is stored the last time it is used.
  • the information required for the firing and processing of these neurons can be obtained directly from the processing core corresponding to the neuron, avoiding the need for the information required for the firing and processing of neurons to be stored in the external storage space of the many-core system.
  • it is necessary to obtain the information required for neuron issuance processing from the external storage space of the many-core system causing the reading power consumption of the many-core system to be excessive and affecting the operation process of the neural network.
  • FIG. 7 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which is used to describe some steps in the process of processing neural network neuron information.
  • the step of storing the information required for issuance processing in the processing core may include:
  • the processing core can obtain the third neuron from an external storage space outside the many-core system.
  • the firing of a neuron processes the information required.
  • the information required for the firing processing of the first neuron can be directly stored in the free storage space of the processing core. storage.
  • the stored information that has been stored in the processing core can first be deleted until the free storage space of the processing core is reached.
  • the size is larger than the storage space required to store the information required for issuance processing, and then the information required for issuance processing is stored in the free storage space of the processing core.
  • the neural network is a spiking neural network, and there are pulses firing between neurons, and the source processing core corresponding to the source neuron that sends the pulse does not have information about the destination processing core corresponding to the destination neuron that receives the pulse, then the source processing core Obtain the information of the destination processing core corresponding to the destination neuron that receives the impulse from the external storage space.
  • the information of the destination processing core can be directly stored in the free storage space of the source processing core.
  • the stored information that has been stored in the source processing core can first be deleted until the source processing core is free.
  • the size of the storage space is larger than the size of the storage space required to store the information of the destination processing core, and then the information of the destination processing core is stored in the free storage space after the source processing core is deleted.
  • the destination processing core can obtain the connection weight value between the source neuron and the destination neuron from the external storage space.
  • connection weight value between the source neuron and the destination neuron can be stored in the destination processing core. in the core's free storage space.
  • the stored information that has been stored in the destination processing core can first be deleted. Until the size of the free storage space of the destination processing core is greater than the size of the storage space required for the connection weight value of the source neuron and the destination neuron, the source neuron is The connection weight value between the neuron and the destination neuron is stored in the free storage space after deletion of the destination processing core.
  • Figure 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
  • the stored information that has occupied the storage space of the processing core is deleted until the free storage space is larger than the information required for storage and issuance processing.
  • Space occupied steps can include:
  • the processing core corresponding to the first neuron does not contain the information required for the firing processing of the first neuron, the processing core can be obtained from an external storage space outside the many-core system. The firing of the first neuron processes the required information.
  • the stored information that has been stored in the processing core can be stored in the processing core from the earliest time. In the order of the latest, the stored information is deleted until the size of the free storage space of the processing core is greater than the size of the storage space required to store the information required for issuance processing, and then the information required for issuance processing is stored in the free storage of the processing core. space.
  • the neural network is a spiking neural network, and there are pulses firing between neurons, and the source processing core corresponding to the source neuron that sends the pulse does not have information about the destination processing core corresponding to the destination neuron that receives the pulse, then the source processing core Information about the destination processing core can be obtained from external storage space.
  • the stored information that has been stored in the source processing core can be stored in the source processing core from the earliest time. Deletions are performed in order of the latest until the size of the free storage space of the source processing core is larger than the size of the storage space required for the information of the destination processing core, then the information of the destination processing core is stored in the free storage space of the source processing core.
  • the destination processing core can obtain the connection weight value between the source neuron and the destination neuron from the external storage space.
  • the stored information that has been stored in the destination processing core can be stored in the destination.
  • the processing cores are deleted in order from early to late until the size of the free storage space of the destination processing core is greater than the size of the storage space required for the connection weight value of the source neuron and the destination neuron, and then the source neuron and the destination neuron are The connection weight value of the neuron is stored in the free storage space of the destination processing core.
  • Figure 9 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
  • the stored information that has occupied the storage space of the processing core is deleted until the free storage space is larger than the information required for storage and issuance processing.
  • Space occupied steps can also include:
  • the first neuron meets the conditions related to firing, if the information required for the firing processing of the first neuron does not exist in the processing core corresponding to the first neuron, the first neuron is obtained from the external storage space outside the many-core system. Information required for meta-distribution processing.
  • the information that has been stored in the processing core corresponding to the issuance-related neuron can be processed by the core according to the latest
  • the stored information is deleted in order of reading time from early to late until the size of the free storage space of the processing core is greater than the size of the storage space required to store the information required for issuance processing, and then the information required for issuance processing is Stored in the free storage space of the processing core.
  • the time when the stored information was last read may refer to the time closest to the current time among the times when the stored information was read by the processing core.
  • the time difference between the last time the stored information was read and the current time can indicate the time the stored information has not been used.
  • the higher the frequency of use of the information the longer the time it has not been used. short, so the time that the stored information has not been used can be used as a reference for the frequency of use of the stored information.
  • the longer the time that the stored information has not been used the lower the frequency of use. It will be used in subsequent neural network operations. In the process, the probability of being used is lower, so deleting it will have less impact on the operation of the neural network.
  • the neural network is a spiking neural network, and there are pulses firing between neurons, and the source processing core corresponding to the source neuron that sends the pulse does not have information about the destination processing core corresponding to the destination neuron that receives the pulse, then the source processing core Storage space can be added from outside Obtain the information of the destination processing core.
  • the stored information that has been stored in the source processing core can be calculated based on the time when the stored information was last read in the source processing core. Deletions are performed in order of the latest until the size of the free storage space of the source processing core is larger than the size of the storage space required to store the information of the destination processing core, and then the information of the destination processing core is stored in the free storage space of the source processing core.
  • the destination processing core can obtain the connection weight value between the source neuron and the destination neuron from the external storage space.
  • the stored information that has been stored in the destination processing core can be processed according to the last time it was stored.
  • the reading time is deleted in order from early to late until the size of the free storage space of the destination processing core is greater than the size of the storage space required for the connection weight value of the source neuron and the destination neuron, and then the source neuron and the destination neuron are The connection weight value of the destination neuron is stored in the free storage space of the destination processing core.
  • Figure 10 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
  • the stored information that has occupied the storage space of the issuance processing core is deleted until the free storage space is larger than the information required for storing the issuance processing.
  • the space required and the steps to store the information required for issuance processing in free storage space may include:
  • the first neuron When the first neuron meets the conditions related to firing, if the information required for the firing processing of the first neuron does not exist in the processing core corresponding to the first neuron, the first neuron can be obtained from an external storage space outside the many-core system. Neurons fire to process the information needed.
  • the data corresponding to the firing-related neuron that has been stored can be deleted. Process the stored data in the occupied storage space of the core and obtain new free storage space until the sum of the new free storage space and the original free storage space is greater than or equal to the space required to store the information required for the first neuron's release processing.
  • the stored information that has been stored in the processing core corresponding to the firing-related neuron can be deleted in the order of the time when the stored information is stored in the processing core from early to late, and new free storage space can be obtained.
  • the stored information that has been stored in the processing core can also be deleted in order from early to late when it was last read by the processing core corresponding to the relevant neuron, and new free storage space can be obtained.
  • the information required for issuance processing can be directly stored in the contiguous space composed of the new free storage space and the original free storage space.
  • the information required for issuance processing can be first stored in the original free storage space in order. After the original free storage space is occupied, the remaining information required for issuance processing can be stored in the new free storage space. Free storage space.
  • the remaining information required for issuance processing can also store the starting address of the new free storage space in the original free storage space. After reading the information required for issuance processing of the original free storage space, the processing core can obtain the new free storage space. According to the starting address of the new free storage space, read the remaining information required for issuance processing from the new free storage space.
  • Figure 11 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
  • the information processing method may also include:
  • the index information of the information required for the release processing includes the identification of the first neuron (such as the ID of the neuron related to the release) and the address information of the storage location of the information required for the release processing of the first neuron in the processing core.
  • the processing core stores the information required for the issuance processing, it can also store the index information of the information required for the issuance processing in the processing core.
  • the processing core when the processing core wants to obtain the information required for the firing processing of the first neuron again, it can first obtain the information required for the firing processing of the first neuron based on the identity of the first neuron.
  • the address information of the storage location of the processing core is read, and the information required for the firing processing of the first neuron is read at the corresponding location of the processing core based on the address information.
  • issuing the index information of the information required for processing also includes the time when the information required for issuing processing is stored in the processing core.
  • the processing core stores the time when the information required for issuance processing is stored in the processing core.
  • it needs to be stored in the processing core and the size of the storage space required to store the information required for issuance processing is larger than that of the processing core.
  • the index information of the information required for issuance processing may also include the time when the information required for issuance processing was last read. Each time the information required for issuance processing is read, the latest read time in the index information can be updated accordingly.
  • the information required for issuance processing can be based on the last time it was read. Time, in order from early to late, delete the stored information until the size of the free storage space of the processing core is greater than or equal to the size of the storage space required to store the information required for issuance processing, and then delete the information required for issuance processing.
  • the information is stored in the free memory space of the processing core.
  • Figure 12 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the scheduling process of computing resources.
  • the computing resource scheduling process provided by the embodiment of the present disclosure mainly includes:
  • step S1210 determine the computing amount of each computing node among the plurality of computing nodes within a predetermined time period
  • step S1220 when the calculation amount among the various calculation nodes is unbalanced, the calculation task of at least one neuron in the calculation node with overloaded calculation amount is transferred to the target calculation node.
  • a computing system including multiple computing nodes when used to perform neural network operations, statistics are made on the computing volume of the computing nodes within a predetermined time period.
  • the computing volume among different computing nodes is unbalanced ( That is, if there is a large difference in the amount of calculations between different computing nodes), some of the computing tasks in the computing nodes that are overloaded will be transferred to other computing nodes that are not overloaded, so that load balancing between different computing nodes can be achieved. , and to improve the overall computing efficiency of the neural network.
  • the computing tasks responsible for each computing node may no longer correspond to the neurons in the same layer.
  • the computing tasks of neurons with larger firing rates are distributed among multiple different computing nodes, so that the loads of different computing nodes are more balanced.
  • the target computing nodes include computing nodes that meet preset conditions and are not overloaded in computing workload.
  • transferring part of the computing tasks of a certain computing node to other computing nodes essentially belongs to the scheduling of computing resources, that is, the computing resources are reallocated according to the release information of neurons, thereby improving the balance of computing tasks and computing resources. .
  • the computing tasks responsible for each computing node may no longer correspond to the neurons in the same layer.
  • the computing tasks of neurons with larger firing rates are dispersed among multiple different computing nodes, so that the loads of different computing nodes are balanced. .
  • the predetermined condition is not particularly limited.
  • the predetermined condition may be that the calculation amount is lower than a certain calculation amount.
  • the predetermined condition may be: the distance from the computing node with an overloaded computing load does not exceed a predetermined number of computing nodes. That is to say, the target computing node should be a computing node that is close to the computing node with overloaded calculations (for example, the distance between the target computing node and the computing node with overloaded calculations is no more than two computing nodes).
  • the above scheduling process can be performed periodically, and the predetermined time periods in different cycles are time periods within respective cycles.
  • the calculation amount statistics of the computing nodes are performed every once in a while.
  • the computing nodes with overloaded computing amount are processed.
  • the computing tasks are transferred out and load balancing is achieved again. That is to say, through the scheduling method provided by the embodiments of the present disclosure, computing resources can be reallocated in a timely manner when load imbalance occurs, and approximate load balancing can be achieved throughout the computing process, ultimately improving the computing efficiency of the neural network.
  • FIG. 13 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the scheduling process of computing resources.
  • step S1210 determines the computing amount of each computing node among multiple computing nodes within a predetermined time period, which may include:
  • step S1210a count the number of pulses issued by each computing node in the plurality of computing nodes within the predetermined time period
  • multiple computing nodes are numbered in sequence, and i is the number of the computing node;
  • Pi is the calculation amount of the i-th computing node within a predetermined time period
  • R i is the number of pulses issued by the i-th computing node within a predetermined time period
  • C i is the number of synaptic connections of the i-th computing node within a predetermined time period.
  • the scheduling method may be executed using an electronic device independent of the computing node, or one of multiple computing nodes may be used to execute the scheduling method.
  • the electronic device may send a pulse number acquisition request to each computing node to obtain the number of pulses issued by each computing node within a predetermined time period.
  • the computing node executing the scheduling method may send a pulse number acquisition request to other computing nodes to obtain the number of pulses issued by each other computing node within a predetermined time period.
  • the embodiments of the present disclosure are not limited to this.
  • each computing node may periodically send the number of pulses it issues within a predetermined time period to other computing nodes.
  • the information processing method further includes: determining the average computing amount of the multiple computing nodes within the predetermined time period; determining each computing node The absolute value of the difference between the calculation amount and the average calculation amount within the preset time period, and the balance coefficient of each calculation node is determined based on the ratio of the absolute value of the difference to the average calculation amount; when there is the balance coefficient of at least one calculation node If it is greater than the preset threshold, it is determined that the calculation amount among multiple computing nodes is unbalanced.
  • FIG. 14 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the scheduling process of computing resources.
  • the information processing method may also include the following steps:
  • step S1212 determine the average calculation amount of multiple computing nodes within a predetermined time period
  • step S1214 the equilibrium coefficient of each computing node is calculated according to the calculation amount of each computing node within a predetermined time period and the average calculation amount according to formula (1);
  • step S1216 when there is a computing node with a balance coefficient greater than a preset threshold, it is determined that the calculation amount among each computing node is unbalanced.
  • i is the number of the computing node
  • Pi is the calculation amount of the i-th computing node within a predetermined time period
  • ⁇ i is the equilibrium coefficient of the i-th calculation node.
  • ⁇ i the greater the difference between the calculation amount of the i-th computing node and the average calculation amount of multiple computing nodes.
  • the preset threshold can be determined according to the operation speed requirements of the neural network. The faster the calculation speed of the neural network is required, the smaller the value of the preset threshold is.
  • the preset threshold can be between 5 and 10. That is to say, when there are computing nodes whose computing power differs from the average computing power by 5 to 10 times, it is considered that there is a load imbalance.
  • a computing node whose computing volume exceeds a predetermined amount may be determined as a computing node whose computing volume is overloaded.
  • a computing node whose computing amount exceeds the average computing amount may also be determined as a computing node with an overloaded computing amount (for example, a computing node whose computing amount exceeds 5-10 times the average computing amount may be determined as a computing node with an overloaded computing amount).
  • computing nodes whose computing volume does not reach the average computing volume of all computing nodes within a predetermined time period may be determined as computing nodes whose computing volume is not overloaded.
  • neurons can be randomly selected from computing nodes with overloaded calculations, and the computing tasks of the selected neurons can be transferred to the target computing node.
  • neurons are usually grouped. For example, neurons with identical biological properties can be grouped into the same group.
  • the computing tasks executed in the computing nodes are also grouped. In order to improve the efficiency of task transfer, as an optional implementation manner of the embodiment of the present disclosure, a whole set of computing tasks can be transferred. That is to say, in step S1220, at least one of the computing nodes with an overloaded calculation amount can be transferred.
  • the task group moves to the target computing node, where the task group includes computing tasks corresponding to multiple neurons.
  • the information processing method may also include:
  • step S1230 a task transfer notification is sent to the computing node associated with the neuron of the target computing node to which the computing task is transferred.
  • the task transfer notification carries the address information of the target computing node.
  • the so-called "computing node associated with the neuron in which the computing task is transferred to the target computing node” refers to the computing node where the predecessor synapse of "the neuron in which the computing task is transferred to the target computing node" is located, and/or the computing node where the successor synapse is located "where the computing task is transferred to the neuron of the target computing node”.
  • the information processing method may also include:
  • step S1240 the cell body processing information of the neuron corresponding to the computing task transferred to the target computing node and the subsequent synapse information are sent to the target node.
  • the information processing method of the embodiment of the present disclosure can also be used to perform corresponding data processing; for example, it can be applied to synaptic integral calculation for neurons.
  • Figure 15 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the data processing process of neurons. As shown in Figure 15, the data processing process includes:
  • step S1510 determine the synaptic information connected to the current computing node.
  • the synaptic information includes the position information of the successor neuron of the neuron corresponding to the current computing node and the synaptic weight of the neuron corresponding to the current computing node;
  • step S1520 the synaptic weight of the neuron corresponding to the current calculation node is sent to the calculation node corresponding to the subsequent neuron for the calculation node to perform synaptic integral calculation.
  • the location information of the subsequent neuron is carried by the task transfer notification, and the task transfer notification includes a task transfer notification generated by executing any one of the information processing methods in the embodiments of the present disclosure.
  • the position information of the successor neuron is the initially set position information of the successor neuron.
  • Figure 16 is a schematic diagram of a neural network provided by an embodiment of the present disclosure.
  • Figure 16 shows two predecessor neurons (respectively, successor neuron A1 and successor neuron A2), and four successor neurons (respectively, successor neuron B, successor neuron C, successor neuron D. Successor neuron E).
  • the data processing method performed is as follows:
  • the synapse information includes the address information (for example, number) of the successor neuron, and the synaptic weights w1 and w2 of the predecessor neuron to each successor neuron respectively. , w3, w4;
  • embodiments of the present disclosure provide an information processing unit.
  • FIG 17 is a block diagram of an information processing unit provided by an embodiment of the present disclosure.
  • the information processing unit of the embodiment of the present disclosure can be applied to a many-core system. At least some of the processing cores of the many-core system are loaded with neurons of the neural network.
  • the information processing unit 1700 includes:
  • the dynamic scheduling subunit 1701 is configured to dynamically schedule storage resources according to the issuance information of neurons, so that neurons can perform issuance processing based on the scheduled storage resources, and/or dynamically schedule computing resources according to the issuance information of neurons. , for neurons to perform computing tasks based on scheduled computing resources;
  • the storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
  • the issuance of neurons is fully considered, and based on this, the characteristics of read and write operations on storage resources under different issuance situations are analyzed, and a more reasonable storage resource scheduling plan is formulated based on the characteristics of read and write operations.
  • a more reasonable storage resource scheduling plan is formulated based on the characteristics of read and write operations.
  • it can improve the efficiency of reading and writing as much as possible, and alleviate the adverse impact that reading and writing may have on processing performance.
  • the above-mentioned scheduling process of storage resources is not a one-time process, but can be performed in a timely manner based on the current release information of neurons according to needs (for example, rescheduling based on time period requirements, or scheduling in response to certain events).
  • Dynamically adjust the distribution of storage resources The distribution of neurons is always relatively consistent, ensuring timely scheduling of storage resources.
  • scheduling computing resources unlike related technologies that rely on the static topological connection characteristics of each neuron in the neural network to allocate computing tasks to each computing node to achieve computing resource scheduling, the amount of calculation and the distribution of neurons are taken into consideration.
  • the computing tasks of neurons in computing nodes with unbalanced computing amounts are dynamically and evenly adjusted to achieve more accurate and reasonable scheduling of computing resources, so that each The computing workload and computing resources of computing nodes are in a relatively balanced state.
  • the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system, and the weight information of the non-sparse neurons of the neural network is stored in the on-chip storage space of the many-core system, dynamically
  • the scheduling subunit includes: a neural network neuron information storage device;
  • the neural network neuron information storage device includes:
  • a judgment module configured to determine whether the neuron at the current moment is a sparse neuron or a non-sparse neuron based on the recent firing activity of the neuron of the neural network;
  • the first execution module is configured to transfer the weight information of the neuron from the on-chip storage space of the many-core system to Additional storage space outside of many-core systems;
  • the second execution module is configured to transfer the weight information of the neuron from the external storage space outside the many-core system when the neuron is a non-sparse neuron at the current time and the neuron was a sparse neuron at the time before the current time. to the on-chip storage space of many-core systems.
  • Figure 18 is a block diagram of a neural network neuron information storage device provided by an embodiment of the present disclosure, which can be applied to the storage of neural network neuron information.
  • an embodiment of the present disclosure provides a neural network neuron information storage device 1800, wherein the neural network is a neural network loaded in a many-core system, and the weight information of the sparse neurons of the neural network is stored in the many-core system.
  • the weight information of the non-sparse neurons of the neural network is stored in the on-chip storage space of the many-core system, then the neural network neuron information storage device 1800 includes:
  • the judgment module 1801 is used to determine whether the neuron at the current moment is a sparse neuron or a non-sparse neuron based on the recent firing activity of the neuron of the neural network;
  • the first execution module 1802 is used to transfer the weight information of the neuron from the on-chip storage space of the many-core system to Additional storage space outside of many-core systems;
  • the second execution module 1803 is used to transfer the weight information of the neuron from the external storage space outside the many-core system when the neuron is a non-sparse neuron at the current time and the neuron was a sparse neuron at the time before the current time. to the on-chip storage space of many-core systems.
  • the dynamic scheduling subunit includes: a neural network neuron information processing device;
  • the neural network neuron information processing device includes:
  • the judgment module is configured to determine whether there is information required for neuron firing processing in the processing core when the neuron meets firing-related conditions, and the neuron is any one of the neurons loaded in the processing core;
  • the acquisition module is configured to obtain the information required for the neuron firing processing from an external storage space outside the many-core system when the information required for the neuron firing processing does not exist in the processing core;
  • the execution module is configured to store information required for firing processing in the processing core, and perform operations corresponding to firing-related conditions satisfied by the neuron.
  • Figure 19 is a block diagram of a neural network neuron information processing device provided by an embodiment of the present disclosure, which can be applied to the processing of neural network neuron information.
  • an embodiment of the present disclosure provides a neural network neuron information processing device 1900.
  • the neural network neuron information processing device 1900 is applied to the processing core of a many-core system, and the processing core is loaded with neurons of the neural network.
  • the neural network neuron information processing device 1900 includes:
  • the judgment module 1901 is used to determine whether there is information required for the firing processing of the first neuron in the processing core when the first neuron meets the conditions related to firing.
  • the first neuron is a neuron loaded in the processing core. any one;
  • the acquisition module 1902 is used to obtain the information required for the firing processing of the first neuron from an external storage space outside the many-core system when the information required for the firing processing of the first neuron does not exist in the processing core;
  • the execution module 1903 is used to store information required for firing processing in the processing core, and perform operations corresponding to firing-related conditions satisfied by the first neuron.
  • the dynamic scheduling subunit includes: a computing resource scheduling device
  • the computing resource scheduling device includes:
  • a calculation amount determination module configured to determine the calculation amount of each of the plurality of computing nodes within a predetermined time period
  • the task transfer module is configured to transfer the computing task of at least one neuron in the computing node with overloaded computing volume to the target computing node when the computing volume among the multiple computing nodes is unbalanced, where the target computing node is Computing nodes that meet preset conditions and are overloaded with calculations.
  • Figure 20 is a block diagram of a computing resource scheduling device provided by an embodiment of the present disclosure, which can be applied to computing resource scheduling.
  • the computing resource scheduling device 2000 may include:
  • the calculation amount determination module 2010 is configured to determine the calculation amount of each of the plurality of computing nodes within a predetermined time period
  • the task transfer module 2020 is configured to transfer the computing task of at least one neuron in the computing node with an overloaded computing workload to a target computing node when the computing volume among the computing nodes is unbalanced, where the target computing node satisfies the predetermined requirements. Compute nodes that are conditional and overloaded with calculations.
  • the type of computing tasks is not particularly limited.
  • the computing task may be one or more of image processing tasks, speech processing tasks, text processing tasks, etc.
  • the computing task may also include collecting the weight, delay, and number information of the succeeding synapses connected to the neuron corresponding to the current computing node, and the numbering information of the succeeding neurons. That is, the current computing node can obtain the above information based on the neuron number.
  • This part of the computational task is the main computational load of the presynaptic neuron.
  • the above collection process may be a reading and sorting process from memory (on-chip or off-chip).
  • the computing resource scheduling device 2000 may also include an average calculation amount determination module 2030, an equalization coefficient calculation module 2040, and a judgment module 2050.
  • the average calculation amount determination module 2030 is configured to determine the average calculation amount of multiple computing nodes within a predetermined time period.
  • the balance coefficient calculation module 2040 is configured to calculate the balance coefficient of each computing node according to the calculation amount of each computing node in a predetermined time period and the average calculation amount according to formula (1).
  • the determination module 2050 is configured to determine that the amount of computation between each computing node is unbalanced when there is a computing node with a balance coefficient greater than a preset threshold.
  • the judgment module 2050 may also be configured to: determine a computing node whose computing volume exceeds a predetermined multiple of the average computing volume of all computing nodes within a predetermined time period as a computing node whose computing volume is overloaded; The computing node based on the average computing volume of all computing nodes within a predetermined time period is determined as the computing node whose computing volume is not overloaded.
  • the task transfer module 2020 is configured to randomly select neurons from computing nodes with overloaded calculations, and transfer the computing tasks of the selected neurons to the target computing nodes.
  • the task transfer module 2020 is configured to move at least one task group in the computing node with overloaded calculations to the target computing node, where the task group includes computing tasks corresponding to multiple neurons.
  • the scheduling device also includes a task transfer notification generation module 2060, configured to: generate a task transfer notification, which carries the address information of the target computing node; and associate the computing task with the neuron of the target computing node.
  • the computing node sends a task transfer notification.
  • the scheduling device may also include a forwarding module 2070 configured to send the cell body processing information of the neuron corresponding to the computing task transferred to the target computing node and the subsequent synapse information to the target node.
  • a forwarding module 2070 configured to send the cell body processing information of the neuron corresponding to the computing task transferred to the target computing node and the subsequent synapse information to the target node.
  • the dynamic scheduling subunit includes: a data processing device
  • the data processing device includes:
  • the associated synapse information determination module is configured to determine the synapse information of the synapse connected to the current data processing device.
  • the synapse information includes the position information of the successor neuron of the neuron corresponding to the current data processing device, and the current data processing device.
  • the sending module is configured to send the synaptic weight of the neuron corresponding to the current data processing device to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation, wherein, when there is task transfer In the case of notification, at least part of the position information of the subsequent neurons is carried by the task transfer notification.
  • Figure 21 is a block diagram of a data processing device provided by an embodiment of the present disclosure, which can be applied to neuron data processing.
  • the data processing device 2100 may include:
  • the associated synapse information determination module 2110 is configured to determine the synapse information of the synapse connected to the current data processing device.
  • the synapse information includes the position information of the successor neuron of the neuron corresponding to the current data processing device, and the current data processing The synaptic weight of the neuron corresponding to the device.
  • the sending module 2120 is configured to send the synaptic weight of the neuron corresponding to the current data processing device to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation, wherein, when there is a task When transferring notification, The position information of the subsequent neuron is carried by the task transfer notification, and the task transfer notification is a task transfer notification generated after executing the scheduling method provided by the first aspect of the present disclosure.
  • embodiments of the present disclosure provide a processing core, which includes a neural network neuron information storage device, a neural network neuron information processing device, a computing resource scheduling device, and a neural network neuron information storage device according to any one of the embodiments of the present disclosure. Any one or more types of data processing devices.
  • embodiments of the present disclosure provide an electronic device.
  • Figure 22 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides an electronic device.
  • the electronic device includes multiple processing cores 2201 and an on-chip network 2202.
  • the multiple processing cores 2201 are connected to the on-chip network 2202, and the on-chip network 2202 is configured to interact with each other. Data between multiple processing cores and external data.
  • One or more instructions are stored in one or more processing cores 2201, and the one or more instructions are executed by one or more processing cores 2201, so that the one or more processing cores 2201 can execute the above information processing method.
  • the electronic device may be a brain-like chip, because the brain-like chip can adopt a vectorized calculation method and needs to be loaded into the neural network through an external memory such as a double data rate (Double Data Rate, DDR) synchronous dynamic random access memory. Model weight information and other parameters. Therefore, the operation efficiency of batch processing in the embodiments of the present disclosure is relatively high.
  • DDR Double Data Rate
  • Embodiments of the present disclosure also provide a computer-readable storage medium with a computer program stored thereon.
  • Figure 23 is a block diagram of a computer-readable medium provided by an embodiment of the present disclosure. Wherein, the computer program implements the above data processing method when executed by the processor/processing core.
  • Computer-readable storage media may be volatile or non-volatile computer-readable storage media.
  • Embodiments of the present disclosure also provide a computer program product, including a computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, when the computer readable code is stored in a processor of an electronic device When running, the processor in the electronic device executes the above information processing method.
  • computer storage media includes volatile and non-volatile media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. lossless, removable and non-removable media.
  • Computer storage media include, but are not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or that can be used to store the desired information and can be accessed by a computer any other media.
  • communication media typically embodies computer readable program 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 medium.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
  • Computer program instructions for performing operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • the computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through the Internet). connect).
  • electronic circuits are customized by utilizing state information of computer readable program instructions, such as programmable logic circuits, field programmable gate arrays (FPGA) or programmable logic array (PLA), electronic circuits that can execute computer-readable program instructions to implement various aspects of the present disclosure.
  • the computer program products described herein may be implemented in hardware, software, or a combination thereof.
  • the computer program product can be embodied as a computer storage medium.
  • the computer program product can be embodied as a software product, such as a Software Development Kit (SDK), etc. wait.
  • SDK Software Development Kit
  • These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine that, when executed by the processor of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executed on a computer, other programmable data processing apparatus, or other equipment to implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that embody one or more elements for implementing the specified logical function(s).
  • Executable instructions may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or acts. , or can be implemented using a combination of specialized hardware and computer instructions.
  • Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a general illustrative sense only and not for purpose of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone, or may be used in conjunction with other embodiments, unless expressly stated otherwise. Features and/or components used in combination. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Neurology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure relates to an information processing method and apparatus, and a device, a medium and a product. The information processing method can be applied to a many-core system, wherein at least some of the processing cores of the many-core system are loaded with neurons of a neural network. The information processing method comprises: dynamically scheduling a storage resource according to issuance information of a neuron, such that the neuron executes issuance processing on the basis of the scheduled storage resource, and/or, dynamically scheduling a computing resource according to issuance information of a neuron, such that the neuron executes a computing task on the basis of the scheduled computing resource, wherein the storage resource comprises an on-chip storage space of the many-core system and/or an extra storage space outside the many-core system.

Description

信息处理方法及处理单元、设备、介质、产品Information processing methods and processing units, equipment, media, and products 技术领域Technical field
本公开实施例涉及计算机技术领域,尤其涉及一种信息处理方法及处理单元、电子设备、计算机可读存储介质、计算机程序产品。Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an information processing method and processing unit, electronic equipment, computer-readable storage media, and computer program products.
背景技术Background technique
人工智能是研究使计算机来模拟人的某些思维过程和智能行为(例如,学习、推理、思考或规划等)的学科,主要包括计算机实现智能的原理、制造类似于人脑智能的计算机,使计算机能实现更高层次的应用。随着人工智能技术的不断发展,神经网络的应用也越来越广泛,且人工智能技术中的神经网络可以由大量神经元构建而成。Artificial intelligence is the study of using computers to simulate certain human thinking processes and intelligent behaviors (such as learning, reasoning, thinking or planning, etc.). It mainly includes the principles of computer realization of intelligence, the manufacture of computers similar to human brain intelligence, and the use of Computers can achieve higher-level applications. With the continuous development of artificial intelligence technology, the application of neural networks is becoming more and more widespread, and neural networks in artificial intelligence technology can be constructed from a large number of neurons.
发明内容Contents of the invention
本公开实施例提供一种信息处理方法及处理单元、电子设备、计算机可读存储介质、计算机程序产品。Embodiments of the present disclosure provide an information processing method and processing unit, electronic equipment, computer-readable storage media, and computer program products.
第一方面,本公开实施例提供一种信息处理方法,所述信息处理方法应用于众核系统,所述众核系统的至少部分处理核中加载有神经网络的神经元,所述信息处理方法包括:根据所述神经元的发放信息,动态调度存储资源,以供所述神经元基于调度后的存储资源执行发放处理,和/或,根据所述神经元的发放信息,动态调度计算资源,以供所述神经元基于调度后的计算资源执行计算任务;;其中,所述存储资源包括所述众核系统的片上存储空间和/或所述众核系统外的外加存储空间。In a first aspect, embodiments of the present disclosure provide an information processing method, which is applied to a many-core system. At least part of the processing cores of the many-core system are loaded with neurons of a neural network. The information processing method including: dynamically scheduling storage resources according to the issuance information of the neuron, so that the neuron performs issuance processing based on the scheduled storage resources, and/or dynamically scheduling computing resources according to the issuance information of the neuron, For the neurons to perform computing tasks based on the scheduled computing resources; wherein the storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
在一些实施例中,所述神经网络的稀疏神经元的权重信息存储在所述众核系统外的外加存储空间,所述神经网络的非稀疏神经元的权重信息存储在所述众核系统的片上存储空间,所述神经网络神经元信息存储方法包括:根据所述神经网络的神经元的近期发放活跃度确定所述神经元当前时刻为稀疏神经元或非稀疏神经元;在所述神经元当前时刻为稀疏神经元,且所述神经元在当前时刻之前时刻为非稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统的片上存储空间转移至所述众核系统外的外加存储空间;在所述神经元当前时刻为非稀疏神经元,且所述神经元在当前时刻之前时刻为稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统外的外加存储空间转移至所述众核系统的片上存储空间。In some embodiments, the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system, and the weight information of the non-sparse neurons of the neural network is stored in the many-core system. On-chip storage space, the neural network neuron information storage method includes: determining whether the neuron is a sparse neuron or a non-sparse neuron at the current moment according to the recent firing activity of the neuron of the neural network; If the current moment is a sparse neuron, and the neuron was a non-sparse neuron at the moment before the current moment, the weight information of the neuron is transferred from the on-chip storage space of the many-core system to the many-core system. Additional storage space outside the system; when the neuron is a non-sparse neuron at the current time, and the neuron was a sparse neuron at the time before the current time, the weight information of the neuron is obtained from the public The additional storage space outside the core system is transferred to the on-chip storage space of the many-core system.
在一些实施例中,在第一神经元满足发放相关条件的情况下,确定所述处理核中是否存在所述第一神经元的发放处理所需信息,所述第一神经元为加载于所述处理核的神经元中的任一个;在所述处理核中不存在所述第一神经元的发放处理所需信息的情况下,从所述众核系统外的外加存储空间获取所述第一神经元的发放处理所需信息;将所述发放处理所需信息存储在所述处理核,并执行与所述第一神经元满足的发放相关条件对应的操作。In some embodiments, when the first neuron satisfies the conditions related to firing, it is determined whether there is information required for firing processing of the first neuron in the processing core, and the first neuron is loaded in the firing core. Any one of the neurons of the processing core; when there is no information required for the firing processing of the first neuron in the processing core, obtain the third from an external storage space outside the many-core system. Information required for firing processing of a neuron; storing the information required for firing processing in the processing core, and performing operations corresponding to firing-related conditions satisfied by the first neuron.
在一些实施例中,确定多个计算节点中各个所述计算节点在预定时间段内的计算量;当各个计算节点之间的计算量不均衡时,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,其中,所述目标计算节点为满足预设条件、且计算量未过载的计算节点。In some embodiments, the calculation amount of each of the multiple calculation nodes within a predetermined time period is determined; when the calculation amount among the various calculation nodes is unbalanced, at least one nerve in the calculation node that is overloaded with the calculation amount is The computing task of the element is transferred to the target computing node, where the target computing node is a computing node that satisfies preset conditions and is not overloaded in computing capacity.
在一些实施例中,确定与当前计算节点连接的突触的突触信息,所述突触信息包括当前计算节点对应的神经元的后继神经元的位置信息、以及当前计算节点对应的神经元的突触权重;将当前计算节点对应的神经元的突触权重发送至后继神经元对应的计算节点,以供所述后继神经元对应的计算节点进行突触积分计算,其中,当存在任务转移通知时,至少部分所述后继神经元的位置信息由所述任务转移通知所携带,且所述任务转移通知为执行本公开实施例任意一项所述的信息处理方法生成的任务转移通知。In some embodiments, the synaptic information of the synapse connected to the current computing node is determined. The synaptic information includes the position information of the successor neuron of the neuron corresponding to the current computing node, and the position information of the neuron corresponding to the current computing node. Synaptic weight; send the synaptic weight of the neuron corresponding to the current computing node to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation, wherein, when there is a task transfer notification When at least part of the position information of the subsequent neurons is carried by the task transfer notification, and the task transfer notification is a task transfer notification generated by executing any one of the information processing methods described in the embodiments of the present disclosure.
第二方面,本公开实施例提供一种信息处理单元,所述信息处理单元应用于众核系统,所述众核系统的至少部分处理核中加载有神经网络的神经元,所述信息处理单元包括:动态调度子单元,被配置为根据所述神经元的发放信息,动态调度存储资源,以供所述神经元基于调度后的存储资源执行发放处理,和/或,根据所述神经元的发放信息,动态调度计算资源,以供所述神经元基于调度后的计算资源执行计算任务;;其中,所述存储资源包括所述众核系统的片上存储空间和/或所述众核系统外的外加存储空间。In a second aspect, embodiments of the present disclosure provide an information processing unit, which is applied to a many-core system. At least part of the processing cores of the many-core system are loaded with neurons of a neural network. The information processing unit It includes: a dynamic scheduling subunit configured to dynamically schedule storage resources according to the issuance information of the neuron, so that the neuron can perform issuance processing based on the scheduled storage resources, and/or, according to the neuron's issuance information. Release information and dynamically schedule computing resources for the neurons to perform computing tasks based on the scheduled computing resources; wherein the storage resources include on-chip storage space of the many-core system and/or external storage space of the many-core system of additional storage space.
在一些实施例中,所述神经网络的稀疏神经元的权重信息存储在所述众核系统外的外加存储空间,所述神经网络的非稀疏神经元的权重信息存储在所述众核系统的片上存储空间,所述动态调度子单元包括:神经网络神经元信息存储装置;所述神经网络神经元信息存储装置,包括:判断模块,被配置为根据所述神经网络的神经元的近期发放活跃度确定所述神经元当前时刻为稀疏神经元或非 稀疏神经元;第一执行模块,被配置为在所述神经元当前时刻为稀疏神经元,且所述神经元在当前时刻之前时刻为非稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统的片上存储空间转移至所述众核系统外的外加存储空间;第二执行模块,被配置为在所述神经元当前时刻为非稀疏神经元,且所述神经元在当前时刻之前时刻为稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统外的外加存储空间转移至所述众核系统的片上存储空间。In some embodiments, the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system, and the weight information of the non-sparse neurons of the neural network is stored in the many-core system. On-chip storage space, the dynamic scheduling subunit includes: a neural network neuron information storage device; the neural network neuron information storage device includes: a judgment module configured to be active according to the recent release of neurons of the neural network Determine whether the neuron at the current moment is a sparse neuron or a non- Sparse neuron; the first execution module is configured to change the weight of the neuron when the neuron is a sparse neuron at the current moment and the neuron is a non-sparse neuron at the moment before the current moment. Information is transferred from the on-chip storage space of the many-core system to an additional storage space outside the many-core system; the second execution module is configured to be a non-sparse neuron at the current moment of the neuron, and the neuron When there are sparse neurons at the time before the current time, the weight information of the neurons is transferred from the external storage space outside the many-core system to the on-chip storage space of the many-core system.
在一些实施例中,所述动态调度子单元包括:神经网络神经元信息处理装置;所述神经网络神经元信息处理装置,包括:判断模块,被配置为在神经元满足发放相关条件的情况下,确定所述处理核中是否存在所述神经元的发放处理所需信息,所述神经元为加载于所述处理核的神经元中的任一个;获取模块,被配置为在所述处理核中不存在所述神经元的发放处理所需信息的情况下,从所述众核系统外的外加存储空间获取所述神经元的发放处理所需信息;执行模块,被配置为将所述发放处理所需信息存储在所述处理核,并执行与所述神经元满足的发放相关条件对应的操作。In some embodiments, the dynamic scheduling subunit includes: a neural network neuron information processing device; the neural network neuron information processing device includes: a judgment module configured to: , determine whether there is information required for the firing processing of the neuron in the processing core, and the neuron is any one of the neurons loaded in the processing core; the acquisition module is configured to When the information required for the firing processing of the neuron does not exist in the system, the information required for the firing processing of the neuron is obtained from an external storage space outside the many-core system; the execution module is configured to transfer the firing Information required for processing is stored in the processing core, and operations corresponding to firing-related conditions satisfied by the neuron are performed.
在一些实施例中,所述动态调度子单元包括:计算资源的调度装置;所述计算资源的调度装置,包括:计算量确定模块,被配置为确定多个计算节点中各个所述计算节点在预定时间段内的计算量;任务转移模块,被配置为在多个所述计算节点之间的计算量不均衡的情况下,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,其中,所述目标计算节点为满足预设条件、且计算量过载的计算节点。In some embodiments, the dynamic scheduling subunit includes: a scheduling device for computing resources; the scheduling device for computing resources includes: a computing amount determination module configured to determine the time of each computing node among multiple computing nodes. The amount of calculation within a predetermined time period; the task transfer module is configured to transfer the calculation task of at least one neuron in the calculation node with overloaded calculation amount to Target computing node, wherein the target computing node is a computing node that meets preset conditions and is overloaded with calculations.
在一些实施例中,所述动态调度子单元包括:数据处理装置;所述数据处理装置,包括:关联突触信息确定模块,被配置为确定与当前数据处理装置连接的突触的突触信息,所述突触信息包括当前数据处理装置对应的神经元的后继神经元的位置信息、以及当前数据处理装置对应的神经元的突触权重;发送模块,被配置为将当前数据处理装置对应的神经元的突触权重发送至后继神经元对应的计算节点,以供所述后继神经元对应的计算节点进行突触积分计算,其中,在存在任务转移通知的情况下,至少部分所述后继神经元的位置信息由所述任务转移通知所携带。In some embodiments, the dynamic scheduling subunit includes: a data processing device; the data processing device includes: an associated synapse information determination module configured to determine synapse information of a synapse connected to the current data processing device , the synaptic information includes the position information of the successor neuron of the neuron corresponding to the current data processing device and the synaptic weight of the neuron corresponding to the current data processing device; the sending module is configured to send the neuron corresponding to the current data processing device. The synaptic weight of the neuron is sent to the computing node corresponding to the succeeding neuron, so that the computing node corresponding to the succeeding neuron performs synaptic integral calculation, wherein, in the case of a task transfer notification, at least some of the succeeding neurons The location information of the element is carried by the task transfer notification.
第三方面,本公开实施例提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本公开实施例任意一种信息处理方法。In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the embodiment of the present disclosure is implemented. Any information processing method.
第四方面,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现本公开实施例任意一种信息处理方法。In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any information processing method of the embodiments of the disclosure is implemented.
第六方面,本公开实施例提供一种计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,其中,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现本公开实施例任一项所述的信息处理方法。In a sixth aspect, embodiments of the present disclosure provide a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is in a processor of an electronic device When running, the processor in the electronic device executes the information processing method described in any one of the embodiments of the present disclosure.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
图1为本公开实施例提供的一种信息处理方法的流程图。Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
图2为本公开实施例提供的一种信息处理方法的流程示意图。FIG. 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图3为本公开实施例提供的一种信息处理方法的流程示意图。FIG. 3 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图4a为神经元的发放值随时间变化的坐标示意图。Figure 4a is a schematic coordinate diagram of the firing value of a neuron changing with time.
图4b为神经元的活跃度随时间变化的坐标示意图。Figure 4b is a schematic coordinate diagram of neuron activity changing with time.
图5为本公开实施例提供的一种加载神经网络的众核系统的示意图。FIG. 5 is a schematic diagram of a many-core system loaded with neural networks provided by an embodiment of the present disclosure.
图6为本公开实施例提供的一种信息处理方法的流程示意图。FIG. 6 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图7为本公开实施例提供的一种信息处理方法的流程示意图。Figure 7 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图8为本公开实施例提供的一种信息处理方法的流程示意图。FIG. 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图9为本公开实施例提供的一种信息处理方法的流程示意图。Figure 9 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图10为本公开实施例提供的一种信息处理方法的流程示意图。Figure 10 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图11为本公开实施例提供的信息处理方法的流程示意图。Figure 11 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图12为本公开实施例提供的一种信息处理方法的流程示意图。Figure 12 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图13为本公开实施例提供的一种信息处理方法的流程示意图。Figure 13 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图14为本公开实施例提供的一种信息处理方法的流程示意图。Figure 14 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图15为本公开实施例提供的一种信息处理方法的流程示意图。Figure 15 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图16为本公开实施例提供的一种神经网络的示意图。 Figure 16 is a schematic diagram of a neural network provided by an embodiment of the present disclosure.
图17为本公开实施例提供的一种信息处理单元的组成框图。Figure 17 is a block diagram of an information processing unit provided by an embodiment of the present disclosure.
图18为本公开实施例提供的一种神经网络神经元信息存储装置的组成框图。Figure 18 is a block diagram of a neural network neuron information storage device provided by an embodiment of the present disclosure.
图19为本公开实施例提供的一种神经网络神经元信息处理装置的组成框图。Figure 19 is a block diagram of a neural network neuron information processing device provided by an embodiment of the present disclosure.
图20为本公开实施例提供的一种计算资源的调度装置的组成框图。Figure 20 is a block diagram of a computing resource scheduling device provided by an embodiment of the present disclosure.
图21为本公开实施例提供的一种数据处理装置的组成框图。Figure 21 is a block diagram of a data processing device provided by an embodiment of the present disclosure.
图22为本公开实施例提供的一种电子设备的框图。Figure 22 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
图23为本公开实施例提供的一种计算机可读存储介质的框图。Figure 23 is a block diagram of a computer-readable storage medium provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本公开,而非对本公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。The present disclosure will be further described in detail below in conjunction with the accompanying drawings and examples. It can be understood that the specific embodiments described here are only used to explain the present disclosure, but not to limit the present disclosure. It should also be noted that, for convenience of description, only some but not all structures related to the present disclosure are shown in the drawings.
人工智能技术中的神经网络由大量神经元构成,每个神经元可以连接其他神经元,神经元之间的连接强度由连接权重表示,且任一神经元可以目标神经元发放相应的信号,使得目标神经元在接收到发放的信号后,基于连接权重和发放信号执行相应处理。连接权重以及目标神经元等相关信息(例如,神经元的后继神经元对应的处理核信息以及神经元与其前继神经元的连接权重值)的存储需要占用大量存储空间,如何优化上述信息的存储成为面临的实际问题之一。The neural network in artificial intelligence technology is composed of a large number of neurons. Each neuron can connect to other neurons. The connection strength between neurons is represented by the connection weight, and any neuron can send corresponding signals to the target neuron, so that After receiving the emitted signal, the target neuron performs corresponding processing based on the connection weight and the emitted signal. The storage of connection weights and target neurons and other related information (for example, the processing core information corresponding to the neuron's successor neuron and the connection weight value of the neuron and its predecessor neuron) requires a large amount of storage space. How to optimize the storage of the above information? Become one of the practical problems faced.
在一些相关技术中,可以通过处理芯片执行神经网络,例如,可以将神经网络加载在众核系统,由于神经网络的连接权重需要占用存储空间,因此,在神经网络加载在众核系统的情况下,连接权重可以存储在众核系统的片上存储空间,也可以存储在众核系统外的外加存储空间。与之类似的,目标神经元的相关信息可以存储在众核系统的片上存储空间,也可以存储在众核系统外的外加存储空间。In some related technologies, neural networks can be executed through processing chips. For example, the neural network can be loaded on a many-core system. Since the connection weights of the neural network need to occupy storage space, when the neural network is loaded on a many-core system ,The connection weight can be stored in the on-chip ,storage space of the many-core system or in the additional ,storage space outside the many-core system. Similarly, the relevant information of the target neuron can be stored in the on-chip storage space of the many-core system, or in an external storage space outside the many-core system.
若上述相关信息(例如,连接权重)存储在众核系统的片上存储空间,由于众核系统的片上存储空间的容量有限,为了保证所有的相关信息都可以存储,可能需要牺牲一些信息(例如,降低连接权重的精度),从而可能对神经网络的性能造成影响。并且,在神经网络的运行过程中,当神经元满足发放相关条件,需要神经元的发放处理所需信息的情况下,由于神经元的发放处理所需信息都存储在片上存储空间(例如,处理核内)中,可能会造成众核系统的存储代价过大,从而可能影响处理核的功耗,同时由于片上存储空间有限,若神经元的发放处理所需信息都存储在片上存储空间中,则处理核需要更大的存储空间,其大小(即面积)也必然会受到影响。If the above related information (for example, connection weights) is stored in the on-chip storage space of the many-core system, due to the limited capacity of the on-chip storage space of the many-core system, in order to ensure that all relevant information can be stored, some information may need to be sacrificed (for example, Reduce the accuracy of connection weights), which may affect the performance of the neural network. Moreover, during the operation of the neural network, when the neurons meet the conditions related to firing and the information required for neuron firing processing is required, the information required for neuron firing processing is stored in the on-chip storage space (for example, processing (inside the core) may cause the storage cost of the many-core system to be too high, which may affect the power consumption of the processing core. At the same time, due to the limited on-chip storage space, if all the information required for neuron firing processing is stored in the on-chip storage space, Then the processing core requires larger storage space, and its size (i.e. area) will inevitably be affected.
若上述相关信息(例如,连接权重)存储在存储空间更大的众核系统外的外加存储空间,虽然可以释放众核系统的部分片上存储空间,但每次使用相关信息时(例如,神经元在执行发放处理时),众核系统都需要从外加存储空间读取相关信息,从外加存储空间读取相关信息的功耗代价较大,且会占用较大的带宽,不仅增加了信息读取功耗代价,还会影响神经网络的处理速度和处理效率。If the above-mentioned relevant information (for example, connection weights) is stored in an additional storage space outside the many-core system with larger storage space, although part of the on-chip storage space of the many-core system can be released, every time the relevant information is used (for example, neurons When executing issuance processing), many-core systems need to read relevant information from the external storage space. Reading relevant information from the external storage space is expensive in terms of power consumption and takes up a large amount of bandwidth, which not only increases the time required to read information The cost of power consumption will also affect the processing speed and efficiency of the neural network.
另外,在一些相关技术中,通常只根据神经元的静态连接特性进行计算资源的分配,可能会造成计算压力负载不均衡,从而降低总体计算效率。In addition, in some related technologies, computing resources are usually allocated only based on the static connection characteristics of neurons, which may cause uneven computing pressure and load, thereby reducing the overall computing efficiency.
综上可知,相关技术无法科学、均衡地为神经网络的神经元调度存储资源和计算资源,由于存储资源的调度不合理,可能导致权重、目标神经元等相关信息的获取代价较大或者影响神经网络的处理速度和处理效率,由于计算资源的调度不合理,可能导致计算压力不均衡,同样不利于提高神经网络的处理速度和处理效率。In summary, it can be seen that the relevant technology cannot scientifically and balancedly schedule storage resources and computing resources for the neurons of the neural network. Due to unreasonable scheduling of storage resources, it may cause the acquisition cost of relevant information such as weights and target neurons to be high or affect the neural network. Due to unreasonable scheduling of computing resources, the processing speed and efficiency of the network may lead to uneven computing pressure, which is also not conducive to improving the processing speed and efficiency of the neural network.
有鉴于此,本公开实施例提供一种信息处理方法及处理单元、电子设备、计算机可读存储介质、计算机程序产品。In view of this, embodiments of the present disclosure provide an information processing method and processing unit, electronic equipment, computer-readable storage media, and computer program products.
本公开实施例的信息处理方法,根据神经元的发放信息,动态调度存储资源,以供神经元基于调度后的存储资源执行发放处理,和/或,根据神经元的发放信息,动态调度计算资源,以供神经元基于调度后的计算资源执行计算任务。一方面,由于对存储资源和计算资源的调度是基于神经元的发放信息确定的,在此过程中充分考虑了神经元是否活跃对存储资源和计算资源的影响,因此,资源的调度更加合理,调度后的资源能够更加贴合的满足神经元的当前需求;另一方面,对存储资源和计算资源的调度并非一次性的,而是一个动态的调度过程,即可以根据神经元的活跃性变化情况进行及时地适应性调整,使得存储资源和计算资源与神经元的当前需求始终是较为匹配的,在满足神经元需求的同时,达到对存储资源和计算资源的充分利用。The information processing method of the embodiment of the present disclosure dynamically schedules storage resources according to the release information of neurons, so that the neurons perform release processing based on the scheduled storage resources, and/or dynamically schedules computing resources according to the release information of neurons. , for neurons to perform computing tasks based on scheduled computing resources. On the one hand, since the scheduling of storage resources and computing resources is determined based on the release information of neurons, the impact of whether neurons are active on storage resources and computing resources is fully considered in this process. Therefore, the scheduling of resources is more reasonable. The scheduled resources can more closely meet the current needs of neurons; on the other hand, the scheduling of storage resources and computing resources is not a one-time event, but a dynamic scheduling process, that is, it can be based on changes in the activity of neurons. The situation is adjusted in a timely manner so that the storage resources and computing resources are always relatively consistent with the current needs of the neurons. While meeting the needs of the neurons, the storage resources and computing resources are fully utilized.
本公开实施例的信息处理方法可以由终端设备或服务器等电子设备执行,终端设备可以为车载设备、用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个 人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、可穿戴设备等,信息处理方法可以通过处理器调用存储器中存储的计算机可读程序指令的方式来实现。或者,可通过服务器执行本公开实施例的信息处理方法,其中,服务器可以是独立的物理服务器、由多个服务器组成的服务器集群或者能够进行云计算的云服务器。The information processing method in the embodiment of the present disclosure can be executed by electronic equipment such as a terminal device or a server. The terminal device can be a vehicle-mounted device, user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal phone, etc. Personal Digital Assistant (PDA), handheld devices, computing devices, wearable devices, etc., the information processing method can be implemented by the processor calling computer-readable program instructions stored in the memory. Alternatively, the information processing method of the embodiment of the present disclosure may be executed through a server, where the server may be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
第一方面,本公开实施例提供一种信息处理方法。In a first aspect, embodiments of the present disclosure provide an information processing method.
图1为本公开实施例提供的一种信息处理方法的流程图。参照图1,本公开实施例的信息处理方法可以应用于众核系统,众核系统的至少部分处理核中加载有神经网络的神经元,该信息处理方法包括:Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure. Referring to Figure 1 , the information processing method of the embodiment of the present disclosure can be applied to a many-core system. At least some of the processing cores of the many-core system are loaded with neurons of a neural network. The information processing method includes:
在步骤S1中,根据神经元的发放信息,动态调度存储资源,以供神经元基于调度后的存储资源执行发放处理,和/或,根据神经元的发放信息,动态调度计算资源,以供神经元基于调度后的计算资源执行计算任务;In step S1, dynamically schedule storage resources according to the neuron's firing information, so that the neuron can perform firing processing based on the scheduled storage resources, and/or dynamically schedule computing resources according to the neuron's firing information, so that the neuron can perform firing processing based on the scheduled storage resources. The element executes computing tasks based on scheduled computing resources;
其中,存储资源包括众核系统的片上存储空间和/或众核系统外的外加存储空间。The storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
本公开实施例的神经网络可以是脉冲神经网络(Spiking Neural Network,SNN),也可以是人工神经网络(Artificial Neural Network,ANN),也可以是其他由多个神经元组成的神经网络。The neural network in the embodiment of the present disclosure may be a spiking neural network (SNN), an artificial neural network (Artificial Neural Network, ANN), or other neural networks composed of multiple neurons.
本公开实施例的神经网络可以是加载在众核系统的神经网络,众核系统的至少部分处理核对应神经网络的一个或多个神经元。The neural network in the embodiment of the present disclosure may be a neural network loaded in a many-core system, and at least part of the processing cores of the many-core system corresponds to one or more neurons of the neural network.
在一些可选的实现方式中,神经元是神经系统实现其功能的基本单元。在满足一些条件的情况下,神经元可以向外输出信号,这种行为称之为神经元的发放。In some alternative implementations, neurons are the basic units through which the nervous system implements its functions. When certain conditions are met, neurons can output signals. This behavior is called neuron firing.
在一些可选的实现方式中,神经元的发放信息是用于反映神经元的发放行为的信息。In some optional implementations, the firing information of the neuron is information used to reflect the firing behavior of the neuron.
示例性地,神经元的发放信息可以包括神经元在预设时间段内的发放次数、发放时刻、发放信号、发放频率、活跃度等信息中的至少一种。For example, the neuron firing information may include at least one of the neuron firing times within a preset time period, firing time, firing signal, firing frequency, activity, and other information.
示例性地,神经元的发放信息可以包括神经元的近期发放活跃度(即用于反映神经元近期执行发放行为的活跃程序)。For example, the firing information of the neuron may include the recent firing activity of the neuron (that is, the activity program used to reflect the recent firing behavior of the neuron).
在一些可选的实现方式中,神经元的发放信息可以用于进行存储资源的动态调度,以更加科学合理的为神经元分配存储资源,并使神经元可以基于调度后的存储资源便捷高效地执行发放处理。In some optional implementations, neuron firing information can be used to dynamically schedule storage resources to allocate storage resources to neurons in a more scientific and reasonable manner, and enable neurons to operate conveniently and efficiently based on the scheduled storage resources. Execute release processing.
示例性地,神经元的发放信息包括神经元的近期发放活跃度;相应的,根据神经元的发放信息,动态调度存储资源,包括:根据神经元的近期发放活跃度确定神经元的状态变化信息,并基于神经元的状态变化信息,动态调度众核系统的片上存储空间和/或众核系统外的外加存储空间存储神经网络神经元信息;其中,神经元所处状态包括稀疏神经元或非稀疏神经元,神经元的状态变化信息用于表征神经元在稀疏神经元和非稀疏神经元之间的变化。For example, the firing information of the neuron includes the recent firing activity of the neuron; accordingly, dynamically scheduling storage resources according to the firing information of the neuron includes: determining the state change information of the neuron according to the recent firing activity of the neuron. , and based on the state change information of neurons, dynamically schedule the on-chip storage space of the many-core system and/or the additional storage space outside the many-core system to store the neural network neuron information; where the state of the neuron includes sparse neurons or non- Sparse neurons, the state change information of neurons is used to characterize the changes of neurons between sparse neurons and non-sparse neurons.
例如,神经网络神经元信息至少包括神经元的权重信息,神经网络的稀疏神经元的权重信息存储在众核系统外的外加存储空间,神经网络的非稀疏神经元的权重信息存储在众核系统的片上存储空间,根据神经元的近期发放活跃度确定神经元的状态变化信息,并基于神经元的状态变化信息,动态调度众核系统的片上存储空间和/或众核系统外的外加存储空间存储神经网络神经元信息,包括:根据神经网络的神经元的近期发放活跃度确定神经元当前时刻为稀疏神经元或非稀疏神经元;在神经元当前时刻为稀疏神经元,且神经元在当前时刻之前时刻为非稀疏神经元的情况下,将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间;在神经元当前时刻为非稀疏神经元,且神经元在当前时刻之前时刻为稀疏神经元的情况下,将神经元的权重信息从众核系统外的外加存储空间转移至众核系统的片上存储空间。For example, the neuron information of a neural network at least includes the weight information of the neuron. The weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system. The weight information of the non-sparse neurons of the neural network is stored in the many-core system. The on-chip storage space of the many-core system determines the state change information of the neuron based on the recent firing activity of the neuron, and dynamically schedules the on-chip storage space of the many-core system and/or the additional storage space outside the many-core system based on the state change information of the neuron. Store neural network neuron information, including: determining whether the neuron is a sparse neuron or a non-sparse neuron at the current moment based on the recent firing activity of the neuron of the neural network; the neuron is a sparse neuron at the current moment, and the neuron is currently When the moment before the moment is a non-sparse neuron, the weight information of the neuron is transferred from the on-chip storage space of the many-core system to an external storage space outside the many-core system; when the neuron is a non-sparse neuron at the current moment, and the neuron When there are sparse neurons at the moment before the current moment, the weight information of the neurons is transferred from the external storage space outside the many-core system to the on-chip storage space of the many-core system.
神经元执行发放通常需要获取神经元的权重信息,当神经元的近期发放活跃度不高时,说明在之后一段时间内的众核系统执行神经网络的过程中,该神经元的权重信息有很大的概率并不参与计算,被读取次数可能较少。基于此,进一步考虑到若将该神经元的权重信息存储在众核系统外的外部存储空间时,在众核系统执行神经网络的过程中,由于该权重信息被读取的次数较少,所需要的读取的功耗自然也很小,对神经网络的处理效率的影响也很小,因此,可以调度外加存储空间存储该神经元的权重信息。而且,将该神经元的权重信息存储在众核系统外的外部存储空间,可以减少权重信息对众核系统的片上存储空间的占用,使得众核系统的片上存储空间可以有更大的空间存储更加有用的信息(如使用频率更高的权重信息),有利于提升神经网络的性能。When a neuron executes firing, it is usually necessary to obtain the weight information of the neuron. When the recent firing activity of a neuron is not high, it means that the weight information of the neuron will have a lot of influence when the many-core system executes the neural network in the next period of time. The high probability is not involved in the calculation and may be read less often. Based on this, it is further considered that if the weight information of the neuron is stored in an external storage space outside the many-core system, during the process of the many-core system executing the neural network, since the weight information is read less times, The power consumption required for reading is naturally very small, and the impact on the processing efficiency of the neural network is also very small. Therefore, additional storage space can be scheduled to store the weight information of the neuron. Moreover, storing the weight information of the neuron in an external storage space outside the many-core system can reduce the weight information's occupation of the on-chip storage space of the many-core system, allowing the on-chip storage space of the many-core system to have larger storage space. More useful information (such as weight information that is used more frequently) will help improve the performance of the neural network.
当神经元的近期发放活跃度较高时,则说明该神经元在近期的众核系统执行神经网络的过程中,发放值经常不为0,或者说经常进行发放,其在之后一段时间的执行神经网络的过程中,也有较大概率要进行发放。由于在神经元的发放值不为0的情况下,计算与该神经元连接的后继神经元的输入电流值时,需要读取该神经元的权重信息,由此可以确定在之后一段时间内的众核系统执行神经 网络的过程中,该神经元的权重信息有很大的概率参与计算,需要的读取功耗较大,对神经网络的处理效率的影响也较大。基于此,可以调度众核系统的片上存储空间存储该神经元的权重信息,从而在众核系统执行神经网络的过程中便于读取该权重信息,同时还能缓解对神经网络的处理效率的影响。When the recent firing activity of a neuron is high, it means that the neuron's firing value is often not 0 during the recent execution of the neural network in the many-core system, or it is firing frequently, and its execution in a period of time will In the process of neural network, there is also a high probability of distribution. Because when the firing value of a neuron is not 0, when calculating the input current value of the subsequent neuron connected to the neuron, the weight information of the neuron needs to be read, so that the weight information of the neuron in the subsequent period can be determined. Many-core system execution nerve During the network process, the weight information of the neuron has a high probability of participating in the calculation, which requires a large reading power consumption and has a large impact on the processing efficiency of the neural network. Based on this, the on-chip storage space of the many-core system can be scheduled to store the weight information of the neuron, so that the weight information can be easily read when the many-core system executes the neural network, and it can also alleviate the impact on the processing efficiency of the neural network. .
换言之,相关技术中在进行存储资源调度时,可能并未考虑神经元的近期发放活跃度可能对存储资源的影响(例如,未考虑读取存储资源的数据时的影响,和/或,未考虑向存储资源写入数据时的影响),因此,可能导致数据读写时长较长,以及读写操作可能对处理性能造成的不利影响。在本公开实施例中,充分考虑了神经元的发放情况,并基于此分析了不同发放情况下对存储资源进行读写操作的特征,并基于读写操作特征制定更加合理的存储资源调度方案,以在满足存储需求的同时,尽量提高读写效率,且缓解读写可能对处理性能带来的不利影响。并且,上述对存储资源的调度过程并非一次性的,而是可以根据需求(例如,基于时间周期的要求重新调度,或者响应于某些事件进行调度),及时地基于神经元当前的发放信息进行动态性地调整,以使存储资源的分配与神经元的发放情况始终是较为匹配的,确保对存储资源进行及时调度。In other words, when scheduling storage resources in related technologies, the impact that the recent firing activity of neurons may have on storage resources may not be considered (for example, the impact of reading data from storage resources may not be considered, and/or The impact when writing data to storage resources), therefore, may lead to longer data read and write times, and read and write operations may have an adverse impact on processing performance. In the embodiment of the present disclosure, the issuance of neurons is fully considered, and based on this, the characteristics of read and write operations on storage resources under different issuance situations are analyzed, and a more reasonable storage resource scheduling plan is formulated based on the characteristics of read and write operations. In order to meet the storage requirements, it can improve the efficiency of reading and writing as much as possible, and alleviate the adverse impact that reading and writing may have on processing performance. Moreover, the above-mentioned scheduling process of storage resources is not a one-time process, but can be carried out in a timely manner based on the current release information of neurons according to needs (for example, rescheduling based on time period requirements, or scheduling in response to certain events). Dynamically adjust so that the allocation of storage resources and the distribution of neurons are always relatively consistent, ensuring timely scheduling of storage resources.
在一些可选的实现方式中,神经元在执行发放处理时,可能需要从相应的存储空间获取发放处理所需信息,并基于发放处理所需信息执行相应的发放处理。其中,发放处理所需信息可以包括神经元的权重信息、目标处理核信息(例如,接收发放信号的目标神经元所对应的处理核的信息)等中的至少一种,本公开实施例对此不作限制。In some optional implementations, when a neuron performs firing processing, it may need to obtain the information required for firing processing from the corresponding storage space, and perform corresponding firing processing based on the information required for firing processing. The information required for the firing process may include at least one of the weight information of the neuron, the target processing core information (for example, the information of the processing core corresponding to the target neuron that receives the firing signal), etc., in this embodiment of the present disclosure No restrictions.
示例性地,存储资源用于存储神经元的发放处理所需信息,相应的,神经元基于调度后的存储资源执行发放处理的过程包括:在神经元满足发放条件的情况下,确定神经元的发放处理所需信息的存储位置,基于存储位置获取发放处理所需信息,并基于发放处理所需信息执行神经元的发放处理;其中,存储位置对应众核系统的片上存储空间或者众核系统外的外加存储空间。For example, storage resources are used to store information required for neuron firing processing. Correspondingly, the process of neurons performing firing processing based on scheduled storage resources includes: when the neuron meets firing conditions, determine the neuron's firing conditions. The storage location of the information required for issuance processing is obtained based on the storage location, and the information required for issuance processing is performed based on the information required for issuance processing. The storage location corresponds to the on-chip storage space of the many-core system or outside the many-core system. of additional storage space.
在一些可选的实现方式中,在确定神经元的发放处理所需信息的存储位置时,可以先判断众核系统的片上存储空间是否存储有该神经元的发放处理所需信息,如果众核系统的片上存储空间未存储该神经元的发放处理所需信息,则从众核系统的外加存储空间读取该神经元的发放处理所需信息,并将该发放处理所需信息存储到片上存储空间,以备后续需要时,可以便捷快速地从片上存储空间获取该发放处理所需信息;反之,如果众核系统的片上存储空间存储有该神经元的发放处理所需信息,则从该片上存储空间读取该神经元的发放处理所需信息,并基于该神经元的发放处理所需信息执行发放处理。In some optional implementations, when determining the storage location of the information required for the neuron's firing processing, you can first determine whether the on-chip storage space of the many-core system stores the information required for the neuron's firing processing. If the many-core system If the on-chip storage space of the system does not store the information required for the firing processing of the neuron, the information required for the firing processing of the neuron is read from the external storage space of the many-core system, and the information required for the firing processing is stored in the on-chip storage space. , in case of subsequent need, the information required for the firing processing can be obtained conveniently and quickly from the on-chip storage space; conversely, if the on-chip storage space of the many-core system stores the information required for the firing processing of the neuron, then the information required for the firing processing of the neuron can be stored from the on-chip storage space. The space reads the information required for the firing processing of the neuron, and performs firing processing based on the information required for the firing processing of the neuron.
例如,神经元的发放处理过程包括:在神经元满足发放相关条件的情况下,确定加载神经元的处理核中是否存在神经元的发放处理所需信息;在处理核中不存在神经元的发放处理所需信息的情况下,从众核系统外的外加存储空间获取神经元的发放处理所需信息;将发放处理所需信息存储在处理核,并执行与神经元满足的发放相关条件对应的操作。For example, the neuron firing process includes: when the neuron meets firing-related conditions, determine whether there is information required for neuron firing processing in the processing core loaded with the neuron; if there is no neuron firing in the processing core When processing the required information, obtain the information required for neuron firing processing from the external storage space outside the many-core system; store the information required for firing processing in the processing core, and perform operations corresponding to the firing-related conditions that the neuron meets. .
除了可用于进行存储资源的动态调度之外,在一些可选的实现方式中,神经元的发放信息也可以用于进行计算资源的动态调度,以更加科学合理的利用计算资源,并使神经元可以基于调度后的计算资源高效稳定地执行计算任务。In addition to dynamic scheduling of storage resources, in some optional implementations, neuron release information can also be used to dynamically schedule computing resources to make more scientific and reasonable use of computing resources and make neurons more efficient. Computing tasks can be executed efficiently and stably based on scheduled computing resources.
示例性地,至少部分神经元构成一个计算节点;相应的,根据神经元的发放信息,动态调度计算资源,包括:针对多个计算节点中的至少一个,根据计算节点中多个神经元的发放信息,确定计算节点的计算量;在根据多个计算节点的计算量确定存在计算量不均衡的情况下,调整至少部分计算节点的至少一个神经元的计算任务。Exemplarily, at least some of the neurons constitute a computing node; accordingly, dynamically scheduling computing resources according to the firing information of the neurons includes: for at least one of the multiple computing nodes, based on the firing of multiple neurons in the computing node Information, determine the calculation amount of the computing node; when it is determined that there is an imbalance in the calculation amount based on the calculation amount of multiple computing nodes, adjust the computing task of at least one neuron of at least part of the computing nodes.
例如,计算资源的调度过程可以包括:确定多个计算节点中各个计算节点在预定时间段内的计算量;在多个计算节点之间的计算量不均衡的情况下,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,其中,目标计算节点为满足预设条件、且计算量未过载的计算节点。For example, the scheduling process of computing resources may include: determining the computing volume of each computing node among multiple computing nodes within a predetermined time period; and overloading the computing volume when the computing volume among the multiple computing nodes is unbalanced. The computing task of at least one neuron in the node is transferred to the target computing node, where the target computing node is a computing node that meets preset conditions and is not overloaded in computing capacity.
由此可知,在本公开实施例中,在调度计算资源时,不同于相关技术中依赖于神经网络中各个神经元的静态拓扑连接特性,为各个计算节点分配计算任务以实现计算资源的调度,而是考虑到计算量与神经元的发放情况之间的相关性,基于神经元的发放信息,动态地、均衡地调整计算量不均衡的计算节点中的神经元的计算任务,以此实现对计算资源的更加准确合理的调度,使得各个计算节点的计算量和计算资源均处于相对均衡的状态。It can be seen from this that in the embodiments of the present disclosure, when scheduling computing resources, unlike related technologies that rely on the static topological connection characteristics of each neuron in the neural network, computing tasks are assigned to each computing node to achieve scheduling of computing resources. Instead, the correlation between the amount of calculation and the firing of neurons is taken into account, and based on the firing information of neurons, the computing tasks of neurons in the computing nodes with unbalanced calculation amounts are dynamically and evenly adjusted to achieve the goal of solving the problem. More accurate and reasonable scheduling of computing resources keeps the computing workload and computing resources of each computing node in a relatively balanced state.
综上所述,本公开实施例的信息处理方法至少可以应用于以下处理过程:To sum up, the information processing method of the embodiment of the present disclosure can be applied to at least the following processing processes:
第一,可以应用于对神经网络神经元信息的存储过程,即基于神经元的发放信息将神经元的权重信息等存储到片内存储空间或者片外存储空间的存储,以及在基于神经元的发放信息确定神经元 的活跃性发生变更时,将权重信息等在片内存储空间和片外存储空间之间进行相应转移,其本质上实现了一种神经网络神经元信息存储方法;First, it can be applied to the storage process of neural network neuron information, that is, based on the neuron firing information, the weight information of the neuron is stored in the on-chip storage space or the off-chip storage space, and in the neuron-based Send information to determine the neuron When the activity of the chip changes, the weight information is transferred accordingly between the on-chip storage space and the off-chip storage space, which essentially implements a neural network neuron information storage method;
第二,可以应用于对神经网络神经元信息的处理过程,即在神经元进行发放需要获取发放处理所需信息时,先判断片上存储空间是否存储有发放处理所需信息,若没有,则从外加存储空间获取发放处理所需信息,并将其存储到片上存储空间,从而在后续需要用到该发放处理所需信息时,直接从片上存储空间便捷地获取即可,其本质上实现了一种神经网络神经元信息处理方法;Second, it can be applied to the processing of neural network neuron information. That is, when a neuron fires and needs to obtain the information required for firing processing, it is first determined whether the on-chip storage space stores the information required for firing processing. If not, then The additional storage space obtains the information required for issuance processing and stores it in the on-chip storage space, so that when the information required for issuance processing is needed later, it can be obtained directly and conveniently from the on-chip storage space. This essentially achieves a A neural network neuron information processing method;
第三,可以应用于对计算资源的调度,即在基于若干神经元构建的计算节点执行计算处理时,针对多个计算节点,根据该计算节点内多个神经元的发放率确定该计算节点的计算量,基于此确定多个计算节点的计算量是否均衡,并在计算量不均衡的情况下,通过将计算量过载的计算节点的至少部分神经元的计算任务转移到其他计算节点,完成对计算资源的调度,其本质上实现了一种计算资源的调度方法。Third, it can be applied to the scheduling of computing resources, that is, when a computing node constructed based on several neurons performs computing processing, for multiple computing nodes, the computing node is determined based on the firing rate of multiple neurons in the computing node. Calculation amount, based on this, determine whether the calculation amount of multiple computing nodes is balanced, and if the calculation amount is unbalanced, complete the calculation by transferring the computing tasks of at least some neurons of the computing node with overloaded computing amount to other computing nodes. Scheduling of computing resources essentially implements a scheduling method of computing resources.
下面结合图2至图16对本公开实施例的信息处理方法进行展开说明。The information processing method according to the embodiment of the present disclosure will be described below with reference to FIGS. 2 to 16 .
图2为本公开实施例提供的一种信息处理方法的流程示意图,可应用于神经网络神经元信息的存储。Figure 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the storage of neuron information in neural networks.
参照图2,本公开实施例示例性地提供了一种神经网络神经元信息的存储过程,其中,神经网络可以是加载在众核系统的神经网络,神经网络神经元信息至少可以包括神经元的权重信息。Referring to Figure 2, an embodiment of the present disclosure exemplarily provides a storage process of neural network neuron information, wherein the neural network may be a neural network loaded in a many-core system, and the neural network neuron information may at least include the weight information.
在一些可选的实现方式中,在将神经网络加载到众核系统的过程中,可以根据神经元的稀疏性(如与前继神经元或后继神经元的不为零的连接权重的个数)将神经元分为稀疏神经元和非稀疏神经元,并将稀疏神经元的权重信息存储在众核系统外的外加存储空间,将非稀疏神经元的权重信息存储在众核系统的片上存储空间。In some optional implementations, during the process of loading the neural network into the many-core system, the sparsity of the neurons (such as the number of non-zero connection weights with the predecessor neuron or the successor neuron) can be determined. ) Divide neurons into sparse neurons and non-sparse neurons, store the weight information of sparse neurons in an additional storage space outside the many-core system, and store the weight information of non-sparse neurons in the on-chip storage of the many-core system space.
其中,神经元的权重信息可以包括可以表示该神经元与其后继神经元间的连接权重的值,其可以是该神经元与其后继神经元间的连接权重值,也可以是权重索引信息以及有效权重信息,权重索引信息包括与神经元的后继神经元一一对应的标识信息,标识信息用于表示其对应的后继神经元与该神经元的连接权重是否为零,有效权重信息则可以包括有效权重值,每个有效权重值为该神经元与一个后继神经元不为零的连接权重值。The weight information of a neuron may include a value that represents the connection weight between the neuron and its successor neurons, which may be the connection weight value between the neuron and its successor neurons, or may be weight index information and effective weight. Information, the weight index information includes identification information corresponding to the neuron's successor neurons. The identification information is used to indicate whether the connection weight between its corresponding successor neuron and the neuron is zero. The effective weight information can include the effective weight. value, each valid weight value is a non-zero connection weight value between this neuron and a subsequent neuron.
众核系统外的外加存储空间可以是除众核系统外其他具有存储功能的芯片、服务器等,本公开实施例对此不作限制。The additional storage space outside the many-core system may be other chips, servers, etc. with storage functions in addition to the many-core system, and the embodiments of the present disclosure do not limit this.
参照图2,本公开实施例提供的神经网络神经元信息存储过程可以包括:Referring to Figure 2, the neural network neuron information storage process provided by embodiments of the present disclosure may include:
S201、根据神经网络的神经元的近期发放活跃度确定神经元当前时刻为稀疏神经元或非稀疏神经元。S201. Determine whether the neuron at the current moment is a sparse neuron or a non-sparse neuron based on the recent firing activity of the neuron of the neural network.
神经网络的神经元对应的处理核获取该神经元在近期发放活跃程度(即近期发放活跃度),根据近期发放活跃度确定该神经元在当前时刻为稀疏神经元,或非稀疏神经元。The processing core corresponding to the neuron of the neural network obtains the recent firing activity of the neuron (that is, the recent firing activity), and determines whether the neuron is a sparse neuron or a non-sparse neuron at the current moment based on the recent firing activity.
其中,若神经元被确定在当前时刻为稀疏神经元,则说明该神经元在近期的众核系统执行神经网络的过程中,经常沉默(即神经元的发放值经常为0,或者说不经常进行发放),其在之后一段时间内的执行神经网络的过程中,也有大概率不进行发放。Among them, if the neuron is determined to be a sparse neuron at the current moment, it means that the neuron is often silent in the recent process of executing neural networks in many-core systems (that is, the firing value of the neuron is often 0, or infrequently. issued), there is a high probability that it will not be issued during the execution of the neural network for a period of time.
在神经元的发放值为0的情况下,计算与神经元连接的后继神经元的输入电流值时,可以不读取该神经元的权重信息,直接判定该神经元对后继神经元的输入电流值的贡献为0。When the firing value of a neuron is 0, when calculating the input current value of the subsequent neuron connected to the neuron, you can directly determine the input current of the neuron to the subsequent neuron without reading the weight information of the neuron. The value contribution is 0.
因此,当神经元被确定在当前时刻稀疏神经元,在之后一段时间内的众核系统执行神经网络的过程中,该神经元的权重信息也有很大的概率并不参与计算,不会被读取。Therefore, when a neuron is determined to be a sparse neuron at the current moment, when the many-core system executes the neural network within a period of time, there is a high probability that the weight information of the neuron will not participate in the calculation and will not be read. Pick.
若将该神经元的权重信息存储在众核系统外的外部存储空间,在众核系统执行神经网络的过程中,由于该权重信息被读取的次数较少,所需要的读取的功耗自然也很小,对神经网络的处理效率的影响也很小。If the weight information of the neuron is stored in an external storage space outside the many-core system, during the process of the many-core system executing the neural network, since the weight information is read less times, the required reading power consumption is Naturally, it is very small and has little impact on the processing efficiency of the neural network.
同时,将该神经元的权重信息存储在众核系统外的外部存储空间,可以减少权重信息对众核系统的片上存储空间的占用,使得众核系统的片上存储空间可以有更大的空间存储更加有用的信息(如使用频率更高的权重信息),有利于提升神经网络的性能。At the same time, storing the weight information of the neuron in an external storage space outside the many-core system can reduce the weight information's occupation of the on-chip storage space of the many-core system, allowing the on-chip storage space of the many-core system to have larger storage space. More useful information (such as weight information that is used more frequently) will help improve the performance of the neural network.
若神经元被确定在当前时刻为非稀疏神经元,则说明该神经元在近期的众核系统执行神经网络的过程中,发放值经常不为0,或者说经常进行发放,其在之后一段时间的执行神经网络的过程中,也有大概率要进行发放。If a neuron is determined to be a non-sparse neuron at the current moment, it means that in the process of executing neural networks in recent many-core systems, the firing value of this neuron is often not 0, or it is often firing. In the process of executing the neural network, there is a high probability that it will be distributed.
在神经元的发放值不为0的情况下,计算与神经元连接的后继神经元的输入电流值时,需要读取该神经元的权重信息。因此,当神经元被确定在当前时刻为非稀疏神经元,在之后一段时间内的众核系统执行神经网络的过程中,该神经元的权重信息有很大的概率参与计算,需要的读取功耗较 大,对神经网络的处理效率的影响也较大。When the firing value of a neuron is not 0, when calculating the input current value of a subsequent neuron connected to the neuron, the weight information of the neuron needs to be read. Therefore, when a neuron is determined to be a non-sparse neuron at the current moment, when the many-core system executes the neural network within a period of time, the weight information of the neuron has a high probability of participating in the calculation and needs to be read. Power consumption is relatively Large, it also has a greater impact on the processing efficiency of the neural network.
若将其权重信息存储在众核系统的片上存储空间,方便在众核系统执行神经网络的过程中读取权重信息,避免对神经网络的处理效率的影响。If the weight information is stored in the on-chip storage space of the many-core system, it is convenient to read the weight information during the execution of the neural network in the many-core system and avoid affecting the processing efficiency of the neural network.
S202、在神经元当前时刻为稀疏神经元,且神经元在当前时刻之前时刻为非稀疏神经元的情况下,将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间。S202. When the neuron is a sparse neuron at the current moment and the neuron was a non-sparse neuron at the moment before the current moment, transfer the weight information of the neuron from the on-chip storage space of the many-core system to an external device outside the many-core system. storage.
S203、在神经元当前时刻为非稀疏神经元,且神经元在当前时刻之前时刻为稀疏神经元的情况下,将神经元的权重信息从众核系统外的外加存储空间转移至众核系统的片上存储空间。S203. When the neuron is a non-sparse neuron at the current moment, and the neuron was a sparse neuron at the moment before the current moment, transfer the weight information of the neuron from the external storage space outside the many-core system to the on-chip of the many-core system. storage.
在本公开实施例中,根据神经元的稀疏性的动态变化,将稀疏神经元与后继神经元的连接权重值存储在众核系统外的外部存储空间,将非稀疏神经元的连接权重值存储在众核系统的片上存储空间,在不影响神经网络的处理效率的同时,减少连接权重值对众核系统的片上存储空间的占用,使得众核系统的片上存储空间可以有更大的空间存储更加重要的信息,提升神经网络的性能。In the embodiment of the present disclosure, according to the dynamic change of the sparsity of neurons, the connection weight value of the sparse neuron and the subsequent neuron is stored in an external storage space outside the many-core system, and the connection weight value of the non-sparse neuron is stored In the on-chip storage space of the many-core system, while not affecting the processing efficiency of the neural network, the connection weight value is reduced on the on-chip storage space of the many-core system, so that the on-chip storage space of the many-core system can have a larger storage space. More important information improves the performance of neural networks.
在确定神经元的稀疏性发生变化的情况下(即神经元的状态变化信息表征神经元由稀疏神经元转变为非稀疏神经元,或者由非稀疏神经元转变为稀疏神经元),为了降低对神经网络的处理效率造成的影响,处理核可以对神经元的权重信息也进行对应的处理。When it is determined that the sparsity of neurons changes (that is, the state change information of neurons represents the transformation of neurons from sparse neurons to non-sparse neurons, or from non-sparse neurons to sparse neurons), in order to reduce the impact on Due to the impact of the processing efficiency of the neural network, the processing core can also process the weight information of the neurons accordingly.
例如,在神经元在当前时刻被确定为稀疏神经元的情况下,可以将神经元的权重信息存储在众核系统外的外加存储空间,以节省神经元的权重信息所占用的片上存储空间。For example, when a neuron is determined to be a sparse neuron at the current moment, the weight information of the neuron can be stored in an additional storage space outside the many-core system to save the on-chip storage space occupied by the weight information of the neuron.
但由于神经元在当前时刻之前时刻为非稀疏神经元,也就是说,该神经元的权重信息被存储在众核系统的片上存储空间,因此需要将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间。其中,神经元的权重信息在存储空间之间的转移,本质上就是对存储资源的调度。例如,将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间,可以理解为针对神经元的权重信息,由调度众核系统的片上处理空间进行存储,转换为调度众核系统外的外加存储空间进行存储。其他情况类似,在此不再展开描述。However, since the neuron was a non-sparse neuron at the moment before the current moment, that is to say, the weight information of the neuron is stored in the on-chip storage space of the many-core system, so it is necessary to store the weight information of the neuron from the on-chip storage space of the many-core system. The space is transferred to additional storage space outside the many-core system. Among them, the transfer of neuron weight information between storage spaces is essentially the scheduling of storage resources. For example, transferring the weight information of neurons from the on-chip storage space of the many-core system to the additional storage space outside the many-core system can be understood as the weight information of the neurons, which is stored in the on-chip processing space of the scheduling many-core system and converted into Schedule additional storage space outside the many-core system for storage. Other situations are similar and will not be described here.
例如,在神经元在当前时刻被确定为非稀疏神经元的情况下,可以将神经元的权重信息存储在众核系统的片上存储空间,以方便处理核在神经元进行发放时,读取该神经元的权重信息。For example, when a neuron is determined to be a non-sparse neuron at the current moment, the weight information of the neuron can be stored in the on-chip storage space of the many-core system to facilitate the processing core to read the neuron when the neuron fires. Neuron weight information.
但由于该神经元在当前时刻之前时刻为非稀疏神经元,也就是说,该神经元的权重信息被存储在众核系统外的外加存储空间,因此需要将该神经元的权重信息从众核系统外的外加存储空间转移至众核系统的片上存储空间(权重信息的转移通过对存储资源的调度实现)。However, since the neuron was a non-sparse neuron before the current moment, that is to say, the weight information of the neuron is stored in an external storage space outside the many-core system, so the weight information of the neuron needs to be transferred from the many-core system. The additional storage space is transferred to the on-chip storage space of the many-core system (the transfer of weight information is achieved through the scheduling of storage resources).
若神经元在当前时刻之前时刻为非稀疏神经元,且其在当前时刻依然被确定为非稀疏神经元,也就是说,神经元的稀疏性并没有发生变化,那么,神经元的权重信息不需要进行处理,其继续存储在众核系统的片上存储空间即可。If the neuron was a non-sparse neuron before the current moment, and it is still determined to be a non-sparse neuron at the current moment, that is, the sparsity of the neuron has not changed, then the weight information of the neuron does not change. If it needs to be processed, it can continue to be stored in the on-chip storage space of the many-core system.
若神经元在当前时刻之前时刻为稀疏神经元,且其在当前时刻依然被确定为稀疏神经元,也就是说,神经元的稀疏性并没有发生变化,那么,神经元的权重信息不需要进行处理,其继续存储在众核系统外的外加存储空间即可。If the neuron was a sparse neuron before the current moment, and it is still determined to be a sparse neuron at the current moment, that is, the sparsity of the neuron has not changed, then the weight information of the neuron does not need to be processed processing, it can continue to be stored in the additional storage space outside the many-core system.
神经网络的输入等信息发生变化时,神经网络至少部分神经元的输入也会随之变化,神经元的发放值自然也可能随之变化,也就是说,神经元的近期发放活跃度是随着神经网络的输入等信息的变化而发生变化的,神经网络的输入等信息是一个随着时间变化的量,因此神经元的近期发放活跃度也是随着时间发生变化的,也就是说,一个神经元是稀疏神经元还是非稀疏神经元也可能是随着时间发生变化的,是动态的。与之相应的,基于神经元在稀疏神经元与非稀疏神经元的切换,则对存储资源的调用也是相应变化的,从而使得存储资源的调度成为一个动态的过程。When the input and other information of the neural network changes, the input of at least some neurons of the neural network will also change accordingly, and the firing value of the neuron may naturally change accordingly. In other words, the recent firing activity of the neuron will change with the The input information of the neural network changes with the change of the input information of the neural network. The input information of the neural network is a quantity that changes with time, so the recent firing activity of the neuron also changes with time. In other words, a neuron Whether a neuron is a sparse neuron or a non-sparse neuron may also change over time and is dynamic. Correspondingly, based on the switching of neurons between sparse neurons and non-sparse neurons, the call to storage resources also changes accordingly, making the scheduling of storage resources a dynamic process.
处理核根据神经元的近期发放活跃度,动态确定神经元为稀疏神经元或非稀疏神经元,可以缓解稀疏神经元随着时间变化为非稀疏神经元,但其权重信息仍存储在众核系统外的外加存储空间的情况,对神经网络的处理效率的影响。The processing core dynamically determines whether a neuron is a sparse neuron or a non-sparse neuron based on its recent firing activity, which can alleviate the change of sparse neurons into non-sparse neurons over time, but its weight information is still stored in the many-core system. The impact of additional storage space on the processing efficiency of the neural network.
在一些实施例中,在将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间,可以是将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间,并将该神经元的权重信息在外加存储空间的地址信息存储在众核系统的片上存储空间,以使众核系统基于地址信息获取神经元的权重信息。In some embodiments, when transferring the weight information of neurons from the on-chip storage space of the many-core system to an external storage space outside the many-core system, the weight information of the neurons may be transferred from the on-chip storage space of the many-core system to the many-core system. An external storage space is provided outside the system, and the address information of the neuron's weight information in the external storage space is stored in the on-chip storage space of the many-core system, so that the many-core system can obtain the weight information of the neuron based on the address information.
其中,地址信息可以是该神经元的权重信息在外加存储空间的起始地址以及权重信息所占的长度。The address information may be the weight information of the neuron plus the starting address of the additional storage space and the length occupied by the weight information.
在一些实施例中,将神经元的权重信息从众核系统外的外加存储空间转移至众核系统的片上存储空间,可以是将该神经元的权重信息从众核系统外的外加存储空间转移至神经元的后继神经元对应的片上存储空间,以使后继神经元基于神经元的权重信息进行相应处理,如计算后继神经元的输 入电流值。In some embodiments, transferring the weight information of the neuron from an external storage space outside the many-core system to the on-chip storage space of the many-core system may be to transfer the weight information of the neuron from an external storage space outside the many-core system to the neural system. The on-chip storage space corresponding to the successor neuron of the neuron, so that the subsequent neuron can perform corresponding processing based on the weight information of the neuron, such as calculating the output of the subsequent neuron. input current value.
在一些实施例中,在神经元为稀疏神经元的情况下,神经元的权重信息包括权重索引信息以及有效权重信息,权重索引信息包括标识信息,标识信息与神经元的后继神经元之间存在对应关系(例如,每个标识信息可以对应神经元的一个后继神经元),用于表示该后继神经元与神经元的连接权重值是否为零;有效权重信息包括有效权重值,每个有效权重值为神经元与一个后继神经元不为零的连接权重值。In some embodiments, when the neuron is a sparse neuron, the weight information of the neuron includes weight index information and effective weight information. The weight index information includes identification information, and there is a relationship between the identification information and the subsequent neurons of the neuron. The correspondence relationship (for example, each identification information can correspond to a successor neuron of a neuron) is used to indicate whether the connection weight value between the successor neuron and the neuron is zero; the effective weight information includes the effective weight value, and each effective weight The value is the non-zero connection weight between the neuron and a subsequent neuron.
在一些实施例中,在神经元为非稀疏神经元的情况下,神经元的权重信息包括该神经元与其后继神经元的连接权重值。In some embodiments, when the neuron is a non-sparse neuron, the weight information of the neuron includes the connection weight value of the neuron and its subsequent neurons.
将非稀疏神经元与后继神经元的连接权重值存储为索引信息和有效权重信息,就不需要对连接权重值为零的连接权重值进行存储,在神经元与一个或多个后继神经元的连接权重值为零的情况下,可以节省连接权重值存储所占用的存储空间。By storing the connection weight value between a non-sparse neuron and its successor neuron as index information and effective weight information, there is no need to store the connection weight value with a zero connection weight value. When the connection weight value is zero, the storage space occupied by the connection weight value storage can be saved.
在本公开实施例中,根据神经元的稀疏性的动态变化,将稀疏神经元与后继神经元的连接权重值存储在众核系统外的外部存储空间,将非稀疏神经元的连接权重值存储在众核系统的片上存储空间,在不影响神经网络的处理效率的同时,减少连接权重值对众核系统的片上存储空间的占用,使得众核系统的片上存储空间可以有更大的空间存储更加重要的信息,提升了神经网络的性能。In the embodiment of the present disclosure, according to the dynamic change of the sparsity of neurons, the connection weight value of the sparse neuron and the subsequent neuron is stored in an external storage space outside the many-core system, and the connection weight value of the non-sparse neuron is stored In the on-chip storage space of the many-core system, while not affecting the processing efficiency of the neural network, the connection weight value is reduced on the on-chip storage space of the many-core system, so that the on-chip storage space of the many-core system can have a larger storage space. More important information improves the performance of neural networks.
图3为本公开实施例提供的一种信息处理方法的流程示意图,可应用于神经网络神经元信息的存储。Figure 3 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the storage of neuron information in neural networks.
参照图3,本公开实施例提供的神经网络神经元信息存储过程包括:Referring to Figure 3, the neural network neuron information storage process provided by the embodiment of the present disclosure includes:
S301、每隔预定时间根据神经网络的神经元的近期发放活跃度确定神经元为稀疏神经元或非稀疏神经元。S301. Determine whether the neuron is a sparse neuron or a non-sparse neuron according to the recent firing activity of the neuron of the neural network every predetermined time.
处理核每隔预先设置的预定时间获取该神经元在近期发送的活跃程度(即近期发放活跃度),根据获取的近期发放活跃度确定该神经元为稀疏神经元,或非稀疏神经元。The processing core obtains the activity of the neuron in the recent transmission (i.e., the activity of the recent transmission) every preset scheduled time, and determines whether the neuron is a sparse neuron or a non-sparse neuron based on the obtained activity of the recent transmission.
在一些实施例中,神经元的近期发放活跃度包括神经元在当前时刻之前的预定时间段的发放频率、神经元在当前时刻之前的预定时间段的发放频率的变化量以及神经元在当前时刻的活跃度中至少一者。In some embodiments, the recent firing activity of a neuron includes the firing frequency of the neuron in a predetermined time period before the current moment, the change in the firing frequency of the neuron in the predetermined time period before the current moment, and the firing frequency of the neuron in the current moment. At least one of the activity levels.
也就是说,处理核获取的神经元的近期发放活跃度可以包括神经元在当前时刻的活跃度,也可以包括神经元在当前时刻之前的预定时间段内发放频率,还可以包括神经元在当前时刻之前的预定时间段内发放频率的变化量。That is to say, the recent firing activity of a neuron obtained by the processing core can include the activity of the neuron at the current moment, the firing frequency of the neuron in a predetermined time period before the current moment, and the firing frequency of the neuron at the current moment. The change in the issuance frequency during the predetermined time period before the moment.
其中,预定时间段的长度与确定神经元为稀疏神经元或非稀疏神经元的间隔时间的长度可以是相同的,也可以是不同的。The length of the predetermined time period and the length of the interval for determining whether the neuron is a sparse neuron or a non-sparse neuron may be the same or different.
即若处理核该次获取神经元的近期发放活跃度的时间为t1(即当前时刻),当前时刻之前的预定时间段为t2到t1的时间段,处理核上一次获取该神经元的近期发放活跃度的时间可以为t2(这种情况下,预定时间段的长度与确定神经元为稀疏神经元或非稀疏神经元的间隔时间的长度可以是相同的),也可以为t2之前或之后的时间(这种情况下,预定时间段的长度与确定神经元为稀疏神经元或非稀疏神经元的间隔时间的长度可以是不相同的)。That is, if the time when the processing core obtains the recent firing activity of the neuron is t1 (i.e., the current time), and the predetermined time period before the current time is the time period from t2 to t1, the processing core last obtained the recent firing of the neuron. The time of activity can be t2 (in this case, the length of the predetermined time period can be the same as the length of the interval for determining whether the neuron is a sparse neuron or a non-sparse neuron), or it can be before or after t2 time (in this case, the length of the predetermined time period may be different from the length of the interval for determining whether the neuron is a sparse neuron or a non-sparse neuron).
神经元在当前时刻之前的预定时间段内的发放频率可以通过统计该神经元在预定时间段内发放值不为0(即不沉默)的次数计算,如若当前时刻之前的预定时间段为t2到t1的时间段,则可统计该神经元在t2到t1的时间段内发放值不为0的次数作为神经元在当前时刻之前的预定时间段内发放频率。The firing frequency of a neuron in the predetermined time period before the current moment can be calculated by counting the number of times the neuron's firing value is not 0 (that is, not silent) within the predetermined time period. For example, if the predetermined time period before the current moment is t2 to In the time period of t1, the number of times the neuron's firing value is not 0 in the time period from t2 to t1 can be counted as the firing frequency of the neuron in the predetermined time period before the current time.
神经元在当前时刻之前的预定时间段内的发放频率的变化量可以通过神经元在相邻预定时间段内的发放频率计算,如若当前时刻之前的预定时间段为t2到t1的时间段,则可将t2到t1的时间段内神经元的发放频率与t3到t2的时间段(t3到t2的时间段的长度与t2到t1的时间段的长度一致)内神经元发放频率的差值作为神经元在当前时刻之前的预定时间段内发放频率的变化量。The change in the firing frequency of the neuron in the predetermined time period before the current time can be calculated by the firing frequency of the neuron in the adjacent predetermined time period. If the predetermined time period before the current time is the time period from t2 to t1, then The difference between the firing frequency of neurons in the time period from t2 to t1 and the firing frequency of neurons in the time period from t3 to t2 (the length of the time period from t3 to t2 is consistent with the length of the time period from t2 to t1) can be expressed as The amount of change in the firing frequency of a neuron during a predetermined period of time before the current moment.
在一些实施例中,神经元在当前时刻的活跃度可以通过神经元在前一时刻的活跃度和神经元在当前时刻的发放值确定。In some embodiments, the activity of a neuron at the current moment can be determined by the activity of the neuron at the previous moment and the firing value of the neuron at the current moment.
举例来说,可以通过公式trace(t)=αtrace(t-1)+βs(t)计算神经元在当前时刻的活跃度;其中,α、β为权重系数;s(t)为t时刻神经元的发放值;trace(t)为神经元在t时刻的活跃度,trace(t-1)为神经元在t时刻的前一时刻的活跃度。For example, the activity of a neuron at the current moment can be calculated through the formula trace(t)=αtrace(t-1)+βs(t); where α and β are weight coefficients; s(t) is the neuron at time t The firing value of the neuron; trace(t) is the activity of the neuron at time t, and trace(t-1) is the activity of the neuron at the previous moment of time t.
也就是说,神经元在t时刻的活跃度可以由神经元在t时刻的前一时刻的活跃度和神经元在t时刻的发放值共同确定,α的取值决定在神经元在t时刻的前一时刻的活跃度对神经元在t时刻的活跃度的影响程度,β的取值决定了神经元在t时刻的发放值对神经元在t时刻的活跃度的影响程度,α、 β可以都是小于1的值。That is to say, the activity of a neuron at time t can be determined by the activity of the neuron at the previous time of time t and the firing value of the neuron at time t. The value of α is determined by the activity of the neuron at time t. The degree of influence of the activity of the previous moment on the activity of the neuron at moment t. The value of β determines the degree of influence of the firing value of the neuron at moment t on the activity of the neuron at moment t. α, β can all be values less than 1.
图4a为神经元的发放值随时间变化的坐标示意图,其中,横坐标t表示时刻,纵坐标表示神经元的发放值(firing)。Figure 4a is a schematic coordinate diagram of the firing value of a neuron changing with time, in which the abscissa t represents the time, and the ordinate represents the firing value (firing) of the neuron.
参照图4a,神经元分别在t4时刻、t5时刻、t6时刻进行了发放(发放值为1),其余时刻沉默(或者说发放值为0)。Referring to Figure 4a, the neuron fired at t4, t5, and t6 (the firing value was 1), and was silent (or the firing value was 0) at other times.
图4b为神经元的活跃度随时间变化的坐标示意图,其中,横坐标t表示时刻,纵坐标表示神经元的活跃度(trace)。Figure 4b is a schematic coordinate diagram showing the change of neuron activity over time, in which the abscissa t represents the time and the ordinate represents the neuron activity (trace).
参照图4b,在t4时刻之前的时刻神经元一直沉默,即神经元在t4时刻之前的活跃度一直为0,t4时刻神经元进行了发放(如发放值为1),根据公式trace(t4)=αtrace(t4-1)+βs(t4)=0+β=β,可以计算出神经元在t4时刻的活跃度。Referring to Figure 4b, the neuron has been silent before time t4, that is, the activity of the neuron has been 0 before time t4, and the neuron fired at time t4 (for example, the firing value is 1). According to the formula trace(t4) =αtrace(t4-1)+βs(t4)=0+β=β, the activity of the neuron at time t4 can be calculated.
在t4时刻到t5时刻之间,神经元一直沉默(即发放值为0),根据公式trace(t4+1)=αtrace(t4)+βs(t4+1)=αtrace(t4)+0=αtrace(t4),可以计算出神经元在(t4+1)时刻的活跃度,其小于trace(t4),同理可得,trace(t4+2)要小于trace(t4+1),……trace(t5-1)要小于trace(t5-2),即在t4时刻到t5时刻之间,神经元的活跃度是不断减少的。From time t4 to time t5, the neuron has been silent (that is, the firing value is 0). According to the formula trace(t4+1)=αtrace(t4)+βs(t4+1)=αtrace(t4)+0=αtrace (t4), the activity of the neuron at time (t4+1) can be calculated, which is less than trace(t4). In the same way, trace(t4+2) is less than trace(t4+1),...trace (t5-1) is smaller than trace(t5-2), that is, the activity of neurons is continuously decreasing between time t4 and time t5.
在t5时刻,神经元进行了发放,根据公式trace(t5)=αtrace(t5-1)+βs(t5)=αtrace(t5-1)+β可知,神经元的活跃度在t5时刻得到提升。At time t5, the neuron fires. According to the formula trace(t5)=αtrace(t5-1)+βs(t5)=αtrace(t5-1)+β, it can be seen that the activity of the neuron is increased at time t5.
在t5时刻到t6时刻之间,神经元一直沉默,根据公式trace(t5+1)=αtrace(t5)+βs(t5+1)=αtrace(t5)+0=αtrace(t5),可以计算出神经元在(t5+1)时刻的活跃度,其小于trace(t5),同理可得,trace(t5+2)要小于trace(t5+1),……trace(t6-1)要小于trace(t6-2),即在t5时刻到t6时刻之间,神经元的活跃度也是不断减少的。From time t5 to time t6, the neuron has been silent. According to the formula trace(t5+1)=αtrace(t5)+βs(t5+1)=αtrace(t5)+0=αtrace(t5), it can be calculated The activity of the neuron at time (t5+1) is less than trace(t5). Similarly, trace(t5+2) must be less than trace(t5+1),...trace(t6-1) must be less than trace(t6-2), that is, between time t5 and time t6, the activity of neurons also continues to decrease.
在t6时刻神经元进行了发放,神经元的活跃度相比于(t6-1)时刻得到了提升。At time t6, the neurons fired, and the activity of the neurons was improved compared to time (t6-1).
S302、在神经元当前时刻为稀疏神经元,且神经元在当前时刻之前时刻为非稀疏神经元的情况下,将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间,并将神经元的权重信息在外加存储空间的地址信息存储在众核系统的片上存储空间,以使众核系统基于地址信息获取神经元的权重信息。S302. When the neuron is a sparse neuron at the current moment and the neuron was a non-sparse neuron at the moment before the current moment, transfer the weight information of the neuron from the on-chip storage space of the many-core system to an external device outside the many-core system. storage space, and store the weight information of the neuron plus the address information of the additional storage space in the on-chip storage space of the many-core system, so that the many-core system can obtain the weight information of the neuron based on the address information.
神经元在当前时刻之前时刻为非稀疏神经元,则说明神经元的权重信息存储在众核系统的片上存储空间,若神经元在当前时刻依然被确定为非稀疏神经元,神经元的权重信息依然可以存储在众核系统的片上存储空间,因此并不需要对神经元的权重信息进行处理。反之,若神经元在当前时刻被确定为稀疏神经元,则可以将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间。If a neuron is a non-sparse neuron before the current moment, it means that the weight information of the neuron is stored in the on-chip storage space of the many-core system. If the neuron is still determined to be a non-sparse neuron at the current moment, the weight information of the neuron It can still be stored in the on-chip storage space of the many-core system, so there is no need to process the weight information of the neurons. On the contrary, if the neuron is determined to be a sparse neuron at the current moment, the weight information of the neuron can be transferred from the on-chip storage space of the many-core system to an external storage space outside the many-core system.
在将神经元的权重信息存储至众核系统外的外加存储空间后,还可以将该神经元的权重信息在外加存储空间的地址信息存储在众核系统的片上存储空间,以便众核系统在需要的时候能够基于地址信息获取神经元的权重信息。After storing the weight information of the neuron in the external storage space outside the many-core system, the address information of the weight information of the neuron in the external storage space can also be stored in the on-chip storage space of the many-core system, so that the many-core system can When needed, the weight information of the neuron can be obtained based on the address information.
其中,地址信息可以是该神经元的权重信息在外加存储空间的起始地址以及权重信息所占的长度,也就是说,众核系统可以从起始地址开始读取权重信息所占的长度的信息获取权重信息。Among them, the address information can be the weight information of the neuron plus the starting address of the additional storage space and the length occupied by the weight information. That is to say, the many-core system can read the length occupied by the weight information starting from the starting address. Information obtains weight information.
众核系统基于地址信息获取神经元的权重信息的过程可以参照图5,图5为本公开实施例提供的一种加载神经网络的众核系统的示意图。The process of the many-core system obtaining the weight information of neurons based on the address information can be referred to Figure 5. Figure 5 is a schematic diagram of a many-core system loaded with a neural network provided by an embodiment of the present disclosure.
参照图5,当神经元为稀疏神经元,如图5中带箭头的实线所示,神经元对应的处理核的计算单元在计算出神经元的发放值之后,使用存储在其对应的片上存储空间的权重信息的地址信息,可以通过众核系统外的调度器,访问众核系统外的外加存储空间,读取该神经元对应的权重信息,从权重信息中确定每个后继神经元对应的连接权重值,并将对应的连接权重值以及该神经元的发放值发送给后继神经元对应的处理核(即图,5中小正方形对应的处理核)。Referring to Figure 5, when the neuron is a sparse neuron, as shown by the solid line with an arrow in Figure 5, the computing unit of the processing core corresponding to the neuron calculates the firing value of the neuron and uses the information stored on its corresponding chip. The address information of the weight information of the storage space can be accessed through the scheduler outside the many-core system to access the additional storage space outside the many-core system, read the weight information corresponding to the neuron, and determine the correspondence of each subsequent neuron from the weight information. The connection weight value, and the corresponding connection weight value and the firing value of the neuron are sent to the corresponding processing core of the subsequent neuron (i.e., the processing core corresponding to the small square in Figure 5).
在一些实施例中,由于在神经元为稀疏神经元的情况下,神经元的权重信息可以包括权重索引信息以及有效权重信息;在神经元为非稀疏神经元的情况下,神经元的权重信息可以包括该神经元与其后继神经元的连接权重值。In some embodiments, when the neuron is a sparse neuron, the weight information of the neuron may include weight index information and effective weight information; when the neuron is a non-sparse neuron, the weight information of the neuron Can include the connection weight value of this neuron and its successor neurons.
因此,由于该神经元在当前时刻之前时刻为非稀疏神经元,其权重信息为该神经元与其后继神经元的连接权重值,在将权重信息转移至众核系统外的外加存储空间之前,可以根据神经元与其后继神经元的连接权重值获取该神经元的权重索引信息以及有效权重信息,然后将该神经元的权重索引信息以及有效权重信息存储在众核系统外的外加存储空间,将该神经元的权重索引信息以及有效权重信息在外加存储空间的地址信息存储在众核系统的片上存储空间。 Therefore, since the neuron was a non-sparse neuron at the moment before the current moment, its weight information is the connection weight value of the neuron and its successor neurons. Before transferring the weight information to the external storage space outside the many-core system, it can The weight index information and effective weight information of the neuron are obtained according to the connection weight value of the neuron and its subsequent neurons, and then the weight index information and effective weight information of the neuron are stored in an additional storage space outside the many-core system, and the The weight index information of the neuron and the effective weight information plus the address information of the external storage space are stored in the on-chip storage space of the many-core system.
S303、在神经元当前时刻为非稀疏神经元,且神经元在当前时刻之前时刻为非稀疏神经元的情况下,将神经元的权重信息从众核系统外的外加存储空间转移至神经元的后继神经元对应的片上存储空间,以使后继神经元基于神经元的权重信息进行相应处理。S303. When the neuron is a non-sparse neuron at the current moment, and the neuron was a non-sparse neuron at the moment before the current moment, transfer the weight information of the neuron from the external storage space outside the many-core system to the successor of the neuron. The on-chip storage space corresponding to the neuron allows subsequent neurons to perform corresponding processing based on the weight information of the neuron.
同理可得,神经元在当前时刻之前时刻为稀疏神经元,则说明神经元的权重信息存储在众核系统外的外加存储空间,若神经元在当前时刻依然被确定为稀疏神经元,神经元的权重信息依然可以存储在众核系统外的外加存储空间,因此可能并不需要对神经元的权重信息进行处理。反之,若神经元在当前时刻被确定为非稀疏神经元,则可以将神经元的权重信息从众核系统外的外加存储空间转移至该神经元的后继神经元对应的片上存储空间。In the same way, if a neuron is a sparse neuron before the current moment, it means that the weight information of the neuron is stored in an additional storage space outside the many-core system. If the neuron is still determined to be a sparse neuron at the current moment, the neuron will The weight information of neurons can still be stored in the external storage space outside the many-core system, so there may be no need to process the weight information of neurons. On the contrary, if the neuron is determined to be a non-sparse neuron at the current moment, the neuron's weight information can be transferred from the external storage space outside the many-core system to the on-chip storage space corresponding to the neuron's successor neuron.
如在该神经元的权重信息为该神经元与每个后继神经元的连接权重值的情况下,可以将该神经元与每个后继神经元的连接权重值存储在对应的后继神经元对应的片上存储空间,这样神经元对应的处理核的计算单元就可以如图5中带箭头的虚线所示,在计算出神经元的发放值之后,由于后继神经元与该神经元的连接权重值保存在后继神经元对应的片上存储空间,因此计算单元可以直接将该神经元的发放值发送给后继神经元对应的处理核(即图5中小正方形对应的处理核),供后继神经元根据该神经元的发放值以及连接权重值来计算自己的输入电流值。For example, when the weight information of the neuron is the connection weight value between the neuron and each subsequent neuron, the connection weight value between the neuron and each subsequent neuron can be stored in the corresponding successor neuron. On-chip storage space, so that the computing unit of the processing core corresponding to the neuron can be shown as the dotted line with arrow in Figure 5. After calculating the firing value of the neuron, the weight value of the connection between the subsequent neuron and the neuron is saved. There is an on-chip storage space corresponding to the subsequent neuron, so the computing unit can directly send the firing value of the neuron to the processing core corresponding to the subsequent neuron (i.e., the processing core corresponding to the small square in Figure 5) for the subsequent neuron to use according to the neuron. Use the issuance value of the element and the connection weight value to calculate your own input current value.
在一些实施例中,在神经元为稀疏神经元的情况下,神经元的权重信息可以包括权重索引信息以及有效权重信息;在神经元为非稀疏神经元的情况下,神经元的权重信息可以包括该神经元与其后继神经元的连接权重值。In some embodiments, when the neuron is a sparse neuron, the weight information of the neuron may include weight index information and effective weight information; when the neuron is a non-sparse neuron, the weight information of the neuron may Includes the connection weight value of this neuron and its successor neurons.
因此,由于该神经元在当前时刻之前时刻为稀疏神经元,其权重信息为该神经元的权重索引信息以及有效权重信息,在将权重信息转移至后继神经元对应的片上存储空间之前,可以根据该神经元的权重索引信息以及有效权重信息获取该神经元与其后继神经元的连接权重值,然后将该神经元与每个后继神经元的连接权重值存储在对应的后继神经元对应的片上存储空间。Therefore, since the neuron was a sparse neuron at the moment before the current moment, its weight information is the weight index information and effective weight information of the neuron. Before transferring the weight information to the on-chip storage space corresponding to the subsequent neuron, it can be based on The weight index information and effective weight information of the neuron obtain the connection weight value of the neuron and its successor neurons, and then store the connection weight value of the neuron and each successor neuron in the on-chip storage corresponding to the corresponding successor neuron. space.
图6为本公开实施例提供的一种信息处理方法的流程示意图,可应用于神经网络神经元信息的处理。Figure 6 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the processing of neuron information in neural networks.
参照图6,本公开实施例示例性地提供了一种神经网络神经元信息的处理过程。Referring to FIG. 6 , an embodiment of the present disclosure exemplarily provides a processing process of neural network neuron information.
本公开实施例的神经网络可以为加载在众核系统的神经网络,如脉冲神经网络、人工神经网络、或其他由多个神经元组成的神经网络等,本公开实施例对此不作限制。The neural network in the embodiment of the present disclosure may be a neural network loaded on a many-core system, such as a spiking neural network, an artificial neural network, or other neural networks composed of multiple neurons, and the embodiment of the present disclosure is not limited to this.
在一些可选的实现方式中,加载神经网络的众核系统可以包括多个处理核,至少部分处理核加载有神经网络的神经元,并负责存储加载在该处理核的神经元的信息,参与这些神经元相关的计算(如计算每个神经元的输入电流值、输出等)。In some optional implementations, a many-core system loaded with a neural network may include multiple processing cores. At least some of the processing cores are loaded with neurons of the neural network, and are responsible for storing information of the neurons loaded in the processing cores and participating in These neuron-related calculations (such as calculating the input current value, output, etc. of each neuron).
示例性地,处理核将加载在其上的神经元的后继神经元对应的处理核的信息(如这些处理核的标识等),以及每个神经元与其前继神经元的连接权重值存储在众核系统外的外加存储空间。For example, the processing core will load the information of the processing core corresponding to the successor neuron of the neuron on it (such as the identification of these processing cores, etc.), and the connection weight value of each neuron and its predecessor neuron and store it in Additional storage space outside of many-core systems.
本公开实施例的信息处理方法可以由该众核系统的处理核执行,本公开实施例的神经网络神经元信息处理过程主要包括:The information processing method of the embodiment of the present disclosure can be executed by the processing core of the many-core system. The neural network neuron information processing process of the embodiment of the present disclosure mainly includes:
S601、在第一神经元满足发放相关条件的情况下,确定处理核中是否存在第一神经元的发放处理所需信息。S601. When the first neuron meets the conditions related to firing, determine whether there is information required for firing processing of the first neuron in the processing core.
S602、在处理核中不存在第一神经元的发放处理所需信息的情况下,从众核系统外的外加存储空间获取第一神经元的发放处理所需信息。S602. If the information required for the firing processing of the first neuron does not exist in the processing core, obtain the information required for the firing processing of the first neuron from an external storage space outside the many-core system.
S603、将发放处理所需信息存储在处理核,并执行与第一神经元满足的发放相关条件对应的操作。S603. Store the information required for firing processing in the processing core, and perform operations corresponding to the firing-related conditions satisfied by the first neuron.
在本公开实施例中,将神经元与发放处理所需的信息存储在众核系统外的外加存储空间,减少了众核系统的存储代价;同时,在神经元满足发放相关条件的情况下,从外加存储空间读取神经元的发放处理所需信息,并将获取的发放处理所需信息存储在神经元对应的处理核中,当在之后的众核系统运行神经网络的过程中,神经元再次满足发放相关条件,则可直接从处理核中获取神经元的发放处理所需信息,避免了神经元的发放处理所需信息一直存储在众核系统的外加存储空间,造成在每次众核系统运行神经网络的过程中都需要从众核系统的外加存储空间获取神经元的发放处理所需信息,对神经网络的运行造成影响。In the embodiment of the present disclosure, the information required for neurons and firing processing is stored in an additional storage space outside the many-core system, which reduces the storage cost of the many-core system; at the same time, when the neurons meet firing-related conditions, Read the information required for neuron firing processing from the external storage space, and store the obtained information required for firing processing in the processing core corresponding to the neuron. When the subsequent many-core system runs the neural network, the neuron If the relevant conditions for firing are met again, the information required for neuron firing processing can be obtained directly from the processing core, avoiding the need for the information required for neuron firing processing to be stored in the external storage space of the many-core system, resulting in the need for many-core processing every time. When the system runs the neural network, it needs to obtain the information required for neuron firing and processing from the external storage space of the many-core system, which affects the operation of the neural network.
其中,第一神经元为加载于处理核的神经元中的任一个,换言之,该第一神经元可以是众核系统中任意一个处理核中加载的任意一个神经元,此处的“第一”仅用于描述方便,并不用于限定神经元。Among them, the first neuron is any one of the neurons loaded in the processing core. In other words, the first neuron can be any neuron loaded in any processing core in the many-core system. The "first neuron" here " is only used for convenience of description and is not used to limit neurons.
在神经网络(如脉冲神经网络)的运行过程中,在第一神经元满足发放(若神经网络为脉冲神经网络,发放即为脉冲发放)相关条件(如第一神经元要向其后续神经元发放)的情况下,第一神 经元对应的处理核确定其对应的存储空间,如第一神经元对应的处理核的Cache(高速缓冲存储器)中是否存在第一神经元的发放处理所需信息。During the operation of a neural network (such as a spiking neural network), when the first neuron meets the conditions related to firing (if the neural network is a spiking neural network, the firing is pulse firing) (for example, the first neuron wants to transmit to its subsequent neuron issuance), the first god The processing core corresponding to the neuron determines its corresponding storage space, for example, whether there is information required for the firing processing of the first neuron in the Cache (cache memory) of the processing core corresponding to the first neuron.
若处理核中存在第一神经元的发放处理所需信息,则从处理核中获取发放处理所需信息,并执行与第一神经元满足的发放相关条件对应的操作。If the information required for the firing processing of the first neuron exists in the processing core, the information required for the firing processing is obtained from the processing core, and operations corresponding to the firing-related conditions satisfied by the first neuron are performed.
若处理核中不存在第一神经元发放处理所需信息,则从众核系统外的外加存储空间获取第一神经元发放处理所需信息,并将获取的发放处理所需信息存储在处理核对应的存储空间,同时执行与第一神经元满足的发放处理所需信息对应的操作。If the information required for the firing processing of the first neuron does not exist in the processing core, the information required for the firing processing of the first neuron is obtained from the external storage space outside the many-core system, and the obtained information required for firing processing is stored in the corresponding processing core. storage space, and at the same time perform operations corresponding to the information required for firing processing that the first neuron satisfies.
其中,在一些实施例中,发放相关条件可以是第一神经元为待发放的源神经元;第一神经元的发放处理所需信息可以是目标神经元所对应的处理核信息。其中,目标神经元为接收第一神经元的发放信息的神经元;与第一神经元满足的发放相关条件对应的操作可以是将该神经元的发放信息传输至目标神经元对应的处理核。In some embodiments, the firing-related condition may be that the first neuron is the source neuron to be fired; the information required for the firing processing of the first neuron may be the processing core information corresponding to the target neuron. The target neuron is a neuron that receives the firing information of the first neuron; the operation corresponding to the firing-related conditions met by the first neuron may be to transmit the firing information of the neuron to the processing core corresponding to the target neuron.
其中,第一神经元的发放信息可以包括第一神经元的编号、时间拍、发放值等,本公开实施例对此不作限制。The firing information of the first neuron may include the number, time beat, firing value, etc. of the first neuron, which is not limited in the embodiments of the present disclosure.
也就是说,当处理核上的某神经元的发放信息需要传输至与其连接的后继神经元时,该神经元满足发放相关条件,处理核可以确认在众核系统对应的存储空间是否存储与该神经元连接的后继神经元(即接收该神经元发放信息的目标神经元)所对应的处理核信息(如处理核的标识、地址等信息)。That is to say, when the firing information of a neuron on the processing core needs to be transmitted to the subsequent neuron connected to it, the neuron meets the firing-related conditions, and the processing core can confirm whether the storage space corresponding to the many-core system stores the information related to the firing. The processing core information (such as the identification, address and other information of the processing core) corresponding to the subsequent neuron connected by the neuron (that is, the target neuron that receives the information issued by the neuron).
当处理核在众核系统对应的存储空间存储有目标神经元对应的处理核信息,则该处理核可以将该神经元的发放信息传输至目标神经元对应的处理核。When the processing core stores the processing core information corresponding to the target neuron in the storage space corresponding to the many-core system, the processing core can transmit the firing information of the neuron to the processing core corresponding to the target neuron.
当处理核在众核系统对应的存储空间没有存储目标神经元对应的处理核信息,则该处理核可以从众核系统外的外加存储空间获取目标神经元对应的处理核信息,并将该神经元对应的处理核信息存储在该处理核在众核系统对应的存储空间。When the processing core does not store the processing core information corresponding to the target neuron in the storage space corresponding to the many-core system, the processing core can obtain the processing core information corresponding to the target neuron from the external storage space outside the many-core system, and store the processing core information of the target neuron. The corresponding processing core information is stored in the storage space corresponding to the processing core in the many-core system.
同时,根据获取的目标神经元对应的处理核信息,还可以将该神经元的发放信息传输至目标神经元对应的处理核。At the same time, according to the obtained processing core information corresponding to the target neuron, the firing information of the neuron can also be transmitted to the processing core corresponding to the target neuron.
在一些实施例中,发放相关条件可以是第一神经元为接收到发放信息的目标神经元,第一神经元的发放处理所需信息可以是第一神经元与发放信息对应的源神经元的权重信息。其中,权重信息可以包括连接权重值,也可以包括权重索引信息以及有效权重信息,本公开实施例对权重信息的内容和存储方式不作限制。In some embodiments, the firing-related condition may be that the first neuron is a target neuron that receives firing information, and the information required for firing processing of the first neuron may be that the first neuron is the source neuron corresponding to the firing information. weight information. The weight information may include connection weight values, and may also include weight index information and effective weight information. The embodiment of the disclosure does not limit the content and storage method of the weight information.
在一些实施例中,发放相关条件可以是第一神经元为接收到发放信息的目标神经元,第一神经元的发放处理所需信息可以是第一神经元与发放信息对应的源神经元(即发放发放信息的神经元)的连接权重值;与第一神经元满足的发放相关条件对应的操作可以是根据连接权重值计算第一神经元的输入电流值。In some embodiments, the firing-related condition may be that the first neuron is a target neuron that receives firing information, and the information required for firing processing of the first neuron may be that the first neuron is a source neuron corresponding to the firing information ( That is, the connection weight value of the neuron that emits information); the operation corresponding to the emission-related conditions met by the first neuron may be to calculate the input current value of the first neuron based on the connection weight value.
也就是说,当处理核上的某神经元接收到其前继神经元的发放信息时,该神经元满足发放相关条件,处理核可以确认在众核系统对应的存储空间是否存储与该神经元与发放信息对应的源神经元的连接权重值。That is to say, when a neuron on the processing core receives the firing information of its predecessor neuron, the neuron meets the firing-related conditions, and the processing core can confirm whether the storage space corresponding to the many-core system stores the neuron. The connection weight value of the source neuron corresponding to the firing information.
当处理核在众核系统对应的存储空间存储有该神经元与源神经元的连接权重值,则该处理核可以根据连接权重进行突触积分运算计算其输入电流值。When the processing core stores the connection weight value between the neuron and the source neuron in the storage space corresponding to the many-core system, the processing core can perform a synaptic integration operation based on the connection weight to calculate its input current value.
当处理核在众核系统对应的存储空间没有存储该神经元与源神经元的连接权重值,则该处理核可以从众核系统外的外加存储空间获取该神经元与源神经元的连接权重值,并将该神经元与源神经元的连接权重值存储在该处理核在众核系统对应的存储空间。When the processing core does not store the connection weight value between the neuron and the source neuron in the storage space corresponding to the many-core system, the processing core can obtain the connection weight value between the neuron and the source neuron from the external storage space outside the many-core system. , and store the connection weight value between the neuron and the source neuron in the storage space corresponding to the processing core in the many-core system.
另外,还可以根据连接权重进行突触积分运算计算其输入电流值。In addition, synaptic integral operation can also be performed based on the connection weight to calculate its input current value.
综上可知,在神经网络神经元信息的处理过程中,一方面基于从存储资源中获取的发放处理所需信息执行了神经元的发放处理,保障了神经元之间顺畅的信号传输,另一方面执行了关于发放处理所需信息对存储资源的调度处理,即针对执行发放的神经元,调度众核系统的片上存储空间存储其发放处理所需信息(主要包括两种情况:第一种情况,如果神经元的发放处理所需信息本身存储在处理核内,则直接读取即可;第二种情况,如果神经元的发放处理所需信息存储在外加存储空间,则调度处理核的存储资源存储该神经元的发放处理所需信息,并释放外加存储空间中的相应存储资源)。In summary, it can be seen that during the processing of neural network neuron information, on the one hand, the neuron firing is performed based on the information required for firing processing obtained from storage resources, ensuring smooth signal transmission between neurons; on the other hand, On the one hand, the scheduling processing of storage resources for the information required for issuance processing is performed, that is, for the neurons that execute the issuance, the on-chip storage space of the many-core system is scheduled to store the information required for its issuance processing (mainly including two situations: the first situation , if the information required for neuron firing processing is itself stored in the processing core, it can be read directly; in the second case, if the information required for neuron firing processing is stored in an external storage space, the storage of the scheduling processing core The resource stores the information required for the firing processing of the neuron and releases the corresponding storage resources in the additional storage space).
本公开实施例的神经网络神经元信息处理过程中,将神经元发放处理所需的信息存储在众核系统外的外加存储空间,减少了众核系统的存储代价。同时,在神经元满足发放相关条件的情况下,即需要神经元的发放处理所需信息的情况下,再从外加存储空间读取神经元的发放处理所需信息, 并将获取的发放处理所需信息存储在神经元对应的处理核中,当在之后的神经网络的运行过程中,神经元再次满足发放相关条件,即再次需要神经元的发放处理所需信息的情况下,则可直接从处理核中获取神经元的发放处理所需信息。针对神经元的发放处理所需信息一直存储在众核系统的外加存储空间,导致在众核系统运行神经网络的过程中,每次都需从众核系统的外加存储空间获取神经元的发放处理所需信息,从而可能对神经网络的运行造成影响的情况,通过本公开的实施例可以解决上述问题。During the neural network neuron information processing process of the embodiment of the present disclosure, the information required for neuron firing processing is stored in an external storage space outside the many-core system, which reduces the storage cost of the many-core system. At the same time, when the neuron meets the conditions related to firing, that is, when the information required for the firing processing of the neuron is needed, the information required for the firing processing of the neuron is read from the external storage space. And store the acquired information required for firing processing in the processing core corresponding to the neuron. When the neuron meets the conditions related to firing again during the subsequent operation of the neural network, that is, the information required for firing processing of the neuron is again needed. In this case, the information required for neuron firing processing can be obtained directly from the processing core. The information required for neuron firing processing is always stored in the external storage space of the many-core system. As a result, when the many-core system runs the neural network, the neuron firing processing information needs to be obtained from the external storage space of the many-core system every time. In situations where information is required, which may affect the operation of the neural network, the above problems can be solved through embodiments of the present disclosure.
对于一些不活跃的神经元(即不经常发放或接收发放信息的神经元),可能其在多次神经网络的运行过程中都不发放或接收发放信息,也就是说,这些神经元并不能满足发放相关条件,因此,神经元的发放处理所需信息会一直存储在众核系统外的外加存储空间,既减少了众核系统的存储代价,也并不会对神经网络的运行过程造成影响。For some inactive neurons (that is, neurons that do not frequently send or receive information), they may not send or receive information during multiple runs of the neural network. In other words, these neurons cannot meet the requirements. Therefore, the information required for neuron firing processing will always be stored in the external storage space outside the many-core system, which not only reduces the storage cost of the many-core system, but also does not affect the operation process of the neural network.
而对于活跃的神经元(即经常发放或接收发放信息的神经元),其在多次神经网络的运行过程中都发放或接收发放信息,这些神经元满足发放相关条件,这些神经元的发放处理所需信息仅仅在第一次被使用时需要从众核系统外的外加存储空间获取,在之后的神经网络的运行过程中,由于这些神经元的发放处理所需信息在前一次被使用时就存储在神经元对应的处理核,因此这些神经元的发放处理所需信息可以直接从神经元对应的处理核中获取,避免了神经元的发放处理所需信息一直存储在众核系统的外加存储空间,在每次神经网络的运行过程中都需要从众核系统的外加存储空间获取神经元的发放处理所需信息,造成众核系统的读取功耗过大,对神经网络的运行过程造成影响。For active neurons (that is, neurons that often send or receive information), they send or receive information during multiple runs of the neural network. These neurons meet the conditions related to release, and the release processing of these neurons is The required information only needs to be obtained from the external storage space outside the many-core system when it is used for the first time. During the subsequent operation of the neural network, the information required for the firing and processing of these neurons is stored the last time it is used. In the processing core corresponding to the neuron, the information required for the firing and processing of these neurons can be obtained directly from the processing core corresponding to the neuron, avoiding the need for the information required for the firing and processing of neurons to be stored in the external storage space of the many-core system. , during each operation of the neural network, it is necessary to obtain the information required for neuron issuance processing from the external storage space of the many-core system, causing the reading power consumption of the many-core system to be excessive and affecting the operation process of the neural network.
图7为本公开实施例提供的一种信息处理方法的流程示意图,其用于描述神经网络神经元信息处理过程中的部分步骤。FIG. 7 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which is used to describe some steps in the process of processing neural network neuron information.
在一些实施例中,参照图7,本公开实施例的神经网络神经元信息处理过程中,将发放处理所需信息存储在处理核的步骤,可以包括:In some embodiments, referring to FIG. 7 , during the neural network neuron information processing process of the embodiment of the present disclosure, the step of storing the information required for issuance processing in the processing core may include:
S701、在存储发放处理所需信息所需占用的空间不大于处理核的空闲存储空间的情况下,将发放处理所需信息存储在空闲存储空间。S701. When the space required to store the information required for issuance processing is not larger than the free storage space of the processing core, store the information required for issuance processing in the free storage space.
S702、在存储发放处理所需信息所需占用的空间大于处理核的空闲存储空间的情况下,删除处理核的已占用存储空间的已存入信息直至空闲存储空间大于存储发放处理所需信息所需占用的空间,将发放处理所需信息存储在空闲存储空间。S702. When the space required for storing the information required for issuance processing is greater than the free storage space of the processing core, delete the stored information in the occupied storage space of the processing core until the free storage space is larger than the space required for storing the information required for issuance processing. The required space is used to store the information required for issuance processing in the free storage space.
在第一神经元满足发放相关条件的情况下,若第一神经元对应的处理核中不存在第一神经元的发放处理所需信息,则处理核可以从众核系统外的外加存储空间获取第一神经元的发放处理所需信息。When the first neuron meets the conditions related to firing, if the information required for the firing processing of the first neuron does not exist in the processing core corresponding to the first neuron, the processing core can obtain the third neuron from an external storage space outside the many-core system. The firing of a neuron processes the information required.
在存储第一神经元的发放处理所需信息所需要的存储空间的大小不大于处理核的空闲存储空间的情况下,将可以直接将第一神经元的发放处理所需信息存储在处理核空闲存储空间。When the size of the storage space required to store the information required for the firing processing of the first neuron is not larger than the free storage space of the processing core, the information required for the firing processing of the first neuron can be directly stored in the free storage space of the processing core. storage.
在存储发放处理所需信息所需要的存储空间的大小大于处理核的空闲存储空间的情况下,则首先可以将已经存入处理核的已存入信息进行删除,直至处理核的空闲存储空间的大小大于存储发放处理所需信息所需要的存储空间的大小,然后再将发放处理所需信息存储在处理核空闲存储空间。When the size of the storage space required to store the information required for issuance processing is greater than the free storage space of the processing core, the stored information that has been stored in the processing core can first be deleted until the free storage space of the processing core is reached. The size is larger than the storage space required to store the information required for issuance processing, and then the information required for issuance processing is stored in the free storage space of the processing core.
如若神经网络为脉冲神经网络,神经元之间存在脉冲发放,发放该脉冲的源神经元对应的源处理核中不存在接收该脉冲的目的神经元对应的目的处理核的信息,则源处理核从外加存储空间中获取接收该脉冲的目的神经元对应的目的处理核的信息。If the neural network is a spiking neural network, and there are pulses firing between neurons, and the source processing core corresponding to the source neuron that sends the pulse does not have information about the destination processing core corresponding to the destination neuron that receives the pulse, then the source processing core Obtain the information of the destination processing core corresponding to the destination neuron that receives the impulse from the external storage space.
在存储目的处理核的信息所需要的存储空间的大小不大于源处理核的空闲存储空间的情况下,可以直接将目的处理核的信息存储在源处理核的空闲存储空间中。When the size of the storage space required to store the information of the destination processing core is not larger than the free storage space of the source processing core, the information of the destination processing core can be directly stored in the free storage space of the source processing core.
在存储目的处理核的信息所需要的存储空间的大小大于源处理核的空闲存储空间的情况下,则首先可以将已经存入源处理核的已存入信息进行删除,直至源处理核的空闲存储空间的大小大于存储目的处理核的信息所需要的存储空间的大小,再将目的处理核的信息存储在源处理核删除后的空闲存储空间。When the size of the storage space required to store the information of the destination processing core is greater than the free storage space of the source processing core, the stored information that has been stored in the source processing core can first be deleted until the source processing core is free. The size of the storage space is larger than the size of the storage space required to store the information of the destination processing core, and then the information of the destination processing core is stored in the free storage space after the source processing core is deleted.
若目的处理核中不存在源神经元与目的神经元的连接权重值,则目的处理核可以从外加存储空间中获取源神经元与目的神经元的连接权重值。If the connection weight value between the source neuron and the destination neuron does not exist in the destination processing core, the destination processing core can obtain the connection weight value between the source neuron and the destination neuron from the external storage space.
在存储源神经元与目的神经元的连接权重值所需要的存储空间的大小不大于目的处理核的空闲存储空间的情况下,可以将源神经元与目的神经元的连接权重值存储在目的处理核的空闲存储空间中。When the size of the storage space required to store the connection weight value between the source neuron and the destination neuron is not larger than the free storage space of the destination processing core, the connection weight value between the source neuron and the destination neuron can be stored in the destination processing core. in the core's free storage space.
在存储源神经元与目的神经元的连接权重值所需要的存储空间的大小大于目的处理核的空闲存储空间的情况下,则首先可以将已经存入目的处理核的已存入信息进行删除,直至目的处理核的空闲存储空间的大小大于源神经元与目的神经元的连接权重值所需要的存储空间的大小,再将源神经 元与目的神经元的连接权重值存储在目的处理核的删除后的空闲存储空间。When the size of the storage space required to store the connection weight value between the source neuron and the destination neuron is greater than the free storage space of the destination processing core, the stored information that has been stored in the destination processing core can first be deleted. Until the size of the free storage space of the destination processing core is greater than the size of the storage space required for the connection weight value of the source neuron and the destination neuron, the source neuron is The connection weight value between the neuron and the destination neuron is stored in the free storage space after deletion of the destination processing core.
图8为本公开实施例提供的一种信息处理方法的流程示意图,可用于描述神经网络神经元信息处理过程中的部分步骤。Figure 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
在一些实施例中,参照图8,本公开实施例的神经网络神经元信息处理过程中,删除处理核的已占用存储空间的已存入信息直至空闲存储空间大于存储发放处理所需信息所需占用的空间的步骤,可以包括:In some embodiments, referring to Figure 8, during the neural network neuron information processing process of the embodiment of the present disclosure, the stored information that has occupied the storage space of the processing core is deleted until the free storage space is larger than the information required for storage and issuance processing. Space occupied steps can include:
S801、按照已存入信息存入已占用存储空间的时间从早到晚的顺序,依次删除已存入信息直至空闲存储空间大于存储发放处理所需信息所需占用的空间。S801. Delete the stored information in order from early to late when the stored information is stored in the occupied storage space until the free storage space is larger than the space required to store the information required for issuance processing.
在第一神经元满足发放相关条件的情况下,若第一神经元所对应的处理核中不存在第一神经元的发放处理所需信息,则处理核可以从众核系统外的外加存储空间获取第一神经元的发放处理所需信息。When the first neuron meets the conditions related to firing, if the processing core corresponding to the first neuron does not contain the information required for the firing processing of the first neuron, the processing core can be obtained from an external storage space outside the many-core system. The firing of the first neuron processes the required information.
在存储第一神经元的发放处理所需信息所需要的存储空间的大小大于处理核的空闲存储空间的情况下,可以按照已经存入处理核的已存入信息存入处理核的时间从早到晚的顺序,对已存入信息进行删除,直至处理核的空闲存储空间的大小大于存储发放处理所需信息所需要的存储空间的大小,再将发放处理所需信息存储在处理核空闲存储空间。When the size of the storage space required to store the information required for the firing process of the first neuron is greater than the free storage space of the processing core, the stored information that has been stored in the processing core can be stored in the processing core from the earliest time. In the order of the latest, the stored information is deleted until the size of the free storage space of the processing core is greater than the size of the storage space required to store the information required for issuance processing, and then the information required for issuance processing is stored in the free storage of the processing core. space.
如若神经网络为脉冲神经网络,神经元之间存在脉冲发放,发放该脉冲的源神经元对应的源处理核中不存在接收该脉冲的目的神经元对应的目的处理核的信息,则源处理核可以从外加存储空间中获取目的处理核的信息。If the neural network is a spiking neural network, and there are pulses firing between neurons, and the source processing core corresponding to the source neuron that sends the pulse does not have information about the destination processing core corresponding to the destination neuron that receives the pulse, then the source processing core Information about the destination processing core can be obtained from external storage space.
在存储目的处理核的信息所需要的存储空间的大小大于源处理核的空闲存储空间的情况下,则首先可以按照已经存入源处理核的已存入信息存入源处理核的时间从早到晚的顺序,进行删除,直至源处理核的空闲存储空间的大小大于目的处理核的信息所需要的存储空间的大小,则将目的处理核的信息存储在源处理核的空闲存储空间。When the size of the storage space required to store the information of the destination processing core is larger than the free storage space of the source processing core, first, the stored information that has been stored in the source processing core can be stored in the source processing core from the earliest time. Deletions are performed in order of the latest until the size of the free storage space of the source processing core is larger than the size of the storage space required for the information of the destination processing core, then the information of the destination processing core is stored in the free storage space of the source processing core.
若目的处理核中不存在源神经元与目的神经元的连接权重值,则目的处理核可以从外加存储空间中获取源神经元与目的神经元的连接权重值。If the connection weight value between the source neuron and the destination neuron does not exist in the destination processing core, the destination processing core can obtain the connection weight value between the source neuron and the destination neuron from the external storage space.
在存储源神经元与目的神经元的连接权重值所需要的存储空间的大小大于目的处理核的空闲存储空间的情况下,则首先可以按照已经存入目的处理核的已存入信息存入目的处理核的时间从早到晚的顺序进行删除,直至目的处理核的空闲存储空间的大小大于源神经元与目的神经元的连接权重值所需要的存储空间的大小,再将源神经元与目的神经元的连接权重值存储在目的处理核的空闲存储空间。When the size of the storage space required to store the connection weight value between the source neuron and the destination neuron is greater than the free storage space of the destination processing core, first, the stored information that has been stored in the destination processing core can be stored in the destination. The processing cores are deleted in order from early to late until the size of the free storage space of the destination processing core is greater than the size of the storage space required for the connection weight value of the source neuron and the destination neuron, and then the source neuron and the destination neuron are The connection weight value of the neuron is stored in the free storage space of the destination processing core.
图9为本公开实施例提供的一种信息处理方法的流程示意图,可用于描述神经网络神经元信息处理过程中的部分步骤。Figure 9 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
在一些实施例中,参照图9,本公开实施例的神经网络神经元信息处理过程中,删除处理核的已占用存储空间的已存入信息直至空闲存储空间大于存储发放处理所需信息所需占用的空间的步骤,还可以包括:In some embodiments, referring to Figure 9, during the neural network neuron information processing process of the embodiment of the present disclosure, the stored information that has occupied the storage space of the processing core is deleted until the free storage space is larger than the information required for storage and issuance processing. Space occupied steps can also include:
S901、按照已存入信息最近一次被读取的时间从早到晚的顺序,依次删除已存入信息,直至空闲存储空间大于存储发放处理所需信息所需占用的空间。S901. Delete the stored information in order from early to late when the stored information was last read until the free storage space is greater than the space required to store the information required for issuance processing.
在第一神经元满足发放相关条件的情况下,若第一神经元所对应的处理核中不存在第一神经元的发放处理所需信息,则从众核系统外的外加存储空间获取第一神经元发放处理所需信息。When the first neuron meets the conditions related to firing, if the information required for the firing processing of the first neuron does not exist in the processing core corresponding to the first neuron, the first neuron is obtained from the external storage space outside the many-core system. Information required for meta-distribution processing.
在存储发放处理所需信息所需要的存储空间的大小大于处理核的空闲存储空间的情况下,则可以按照已经存入发放相关神经元所对应的处理核的已存入信息最近一次被处理核读取的时间从早到晚的顺序,对已存入信息进行删除,直至处理核的空闲存储空间的大小大于存储发放处理所需信息所需要的存储空间的大小,再将发放处理所需信息存储在处理核空闲存储空间。When the size of the storage space required to store the information required for issuance processing is greater than the free storage space of the processing core, the information that has been stored in the processing core corresponding to the issuance-related neuron can be processed by the core according to the latest The stored information is deleted in order of reading time from early to late until the size of the free storage space of the processing core is greater than the size of the storage space required to store the information required for issuance processing, and then the information required for issuance processing is Stored in the free storage space of the processing core.
其中,已存入信息最近一次被读取的时间可以是指已存入信息被处理核读取的时间中距离当前时刻最近的一个时间。The time when the stored information was last read may refer to the time closest to the current time among the times when the stored information was read by the processing core.
已存入信息最近一次被读取的时间与当前时刻的时间差可以表示已存入信息未被使用的时间,通常情况下,若信息被使用的频率越高,其未被时间的时间也就越短,因此已存入信息未被使用的时间可以作为已存入信息被使用频率的参考,未被使用的时间越长,即认为其被使用的频率就越低,其在之后的神经网络运行过程中,被使用的概率也就越低,因此,将其进行删除对神经网络的运行的影响也就越小。The time difference between the last time the stored information was read and the current time can indicate the time the stored information has not been used. Generally, the higher the frequency of use of the information, the longer the time it has not been used. short, so the time that the stored information has not been used can be used as a reference for the frequency of use of the stored information. The longer the time that the stored information has not been used, the lower the frequency of use. It will be used in subsequent neural network operations. In the process, the probability of being used is lower, so deleting it will have less impact on the operation of the neural network.
如若神经网络为脉冲神经网络,神经元之间存在脉冲发放,发放该脉冲的源神经元对应的源处理核中不存在接收该脉冲的目的神经元对应的目的处理核的信息,则源处理核可以从外加存储空间 中获取目的处理核的信息。If the neural network is a spiking neural network, and there are pulses firing between neurons, and the source processing core corresponding to the source neuron that sends the pulse does not have information about the destination processing core corresponding to the destination neuron that receives the pulse, then the source processing core Storage space can be added from outside Obtain the information of the destination processing core.
在存储目的处理核的信息所需要的存储空间的大小大于源处理核的空闲存储空间的情况下,则可以按照已经存入源处理核的已存入信息最近一次被读取的时间的从早到晚的顺序,进行删除,直至源处理核的空闲存储空间的大小大于存储目的处理核的信息所需要的存储空间的大小,再将目的处理核的信息存储在源处理核的空闲存储空间。When the size of the storage space required to store the information of the destination processing core is greater than the free storage space of the source processing core, the stored information that has been stored in the source processing core can be calculated based on the time when the stored information was last read in the source processing core. Deletions are performed in order of the latest until the size of the free storage space of the source processing core is larger than the size of the storage space required to store the information of the destination processing core, and then the information of the destination processing core is stored in the free storage space of the source processing core.
若发放该脉冲的目的神经元对应的目的处理核中不存在源神经元与目的神经元的连接权重值,则目的处理核可以从外加存储空间中获取源神经元与目的神经元的连接权重值。If the connection weight value between the source neuron and the destination neuron does not exist in the destination processing core corresponding to the destination neuron that emits the pulse, the destination processing core can obtain the connection weight value between the source neuron and the destination neuron from the external storage space. .
在存储源神经元与目的神经元的连接权重值所需要的存储空间的大小大于目的处理核的空闲存储空间的情况下,则首先可以按照已经存入目的处理核的已存入信息最近一次被读取的时间的从早到晚的顺序进行删除,直至目的处理核的空闲存储空间的大小大于源神经元与目的神经元的连接权重值所需要的存储空间的大小,再将源神经元与目的神经元的连接权重值存储在目的处理核的空闲存储空间。When the size of the storage space required to store the connection weight value between the source neuron and the destination neuron is greater than the free storage space of the destination processing core, first, the stored information that has been stored in the destination processing core can be processed according to the last time it was stored. The reading time is deleted in order from early to late until the size of the free storage space of the destination processing core is greater than the size of the storage space required for the connection weight value of the source neuron and the destination neuron, and then the source neuron and the destination neuron are The connection weight value of the destination neuron is stored in the free storage space of the destination processing core.
图10为本公开实施例提供的一种信息处理方法的流程示意图,可用于描述神经网络神经元信息处理过程中的部分步骤。Figure 10 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
在一些实施例中,参照图10,本公开实施例的神经网络神经元信息处理过程中删除发放处理核的已占用存储空间的已存入信息,直至空闲存储空间大于存储发放处理所需信息所需占用的空间,将发放处理所需信息存储在空闲存储空间的步骤,可以包括:In some embodiments, referring to FIG. 10 , during the neural network neuron information processing process of the embodiment of the present disclosure, the stored information that has occupied the storage space of the issuance processing core is deleted until the free storage space is larger than the information required for storing the issuance processing. The space required and the steps to store the information required for issuance processing in free storage space may include:
S1001、删除处理核的已占用存储空间的已存入数据获取新空闲存储空间,直至新空闲存储空间与原空闲存储空间之和大于存储发放处理所需信息所需占用的空间。S1001. Delete the stored data in the occupied storage space of the processing core and obtain new free storage space until the sum of the new free storage space and the original free storage space is greater than the space required to store the information required for issuance processing.
S1002、在新空闲存储空间与原空闲存储空间不连续的情况下,将发放处理所需信息按顺序先存储在原空闲存储空间,再存储在新空闲存储空间,且在原空闲存储空间存储新空闲存储空间的起始地址。S1002. When the new free storage space is not continuous with the original free storage space, store the information required for issuance processing in the original free storage space first, then store it in the new free storage space, and store the new free storage space in the original free storage space. The starting address of the space.
在第一神经元满足发放相关条件的情况下,若第一神经元所对应的处理核中不存在第一神经元的发放处理所需信息,则可以从众核系统外的外加存储空间获取第一神经元的发放处理所需信息。When the first neuron meets the conditions related to firing, if the information required for the firing processing of the first neuron does not exist in the processing core corresponding to the first neuron, the first neuron can be obtained from an external storage space outside the many-core system. Neurons fire to process the information needed.
在存储第一神经元的发放处理所需信息所需要的存储空间的大小大于处理核的空闲存储空间(即原空闲存储空间)的情况下,则可以删除已经存入发放相关神经元所对应的处理核的已占用存储空间的已存入数据,获取新空闲存储空间,直至新空闲存储空间与原空闲存储空间之和大于或等于存储第一神经元发放处理所需信息所需占用的空间。When the size of the storage space required to store the information required for the firing processing of the first neuron is greater than the free storage space of the processing core (i.e., the original free storage space), the data corresponding to the firing-related neuron that has been stored can be deleted. Process the stored data in the occupied storage space of the core and obtain new free storage space until the sum of the new free storage space and the original free storage space is greater than or equal to the space required to store the information required for the first neuron's release processing.
如可以按照已经存入发放相关神经元所对应的处理核的已存入信息存入处理核的时间从早到晚的顺序,对已存入信息进行删除,获取新空闲存储空间。For example, the stored information that has been stored in the processing core corresponding to the firing-related neuron can be deleted in the order of the time when the stored information is stored in the processing core from early to late, and new free storage space can be obtained.
还可以按照已经存入处理核的已存入信息最近一次被发放相关神经元所对应的处理核读取的时间从早到晚的顺序,对已存入信息进行删除,获取新空闲存储空间。The stored information that has been stored in the processing core can also be deleted in order from early to late when it was last read by the processing core corresponding to the relevant neuron, and new free storage space can be obtained.
在获取新空闲存储空间之后,若新空闲存储空间与原空闲存储空间是连续空间,则可直接将发放处理所需信息存储在新空闲存储空间与原空闲存储空间组成的连续空间即可。After acquiring the new free storage space, if the new free storage space and the original free storage space are contiguous spaces, the information required for issuance processing can be directly stored in the contiguous space composed of the new free storage space and the original free storage space.
若新空闲存储空间与原空闲存储空间不是连续空间,则可以将发放处理所需信息按顺序首先存储在原空闲存储空间,在原空闲存储空间占用完成之后,将剩余的发放处理所需信息存储在新空闲存储空间。If the new free storage space and the original free storage space are not continuous spaces, the information required for issuance processing can be first stored in the original free storage space in order. After the original free storage space is occupied, the remaining information required for issuance processing can be stored in the new free storage space. Free storage space.
由于原空闲存储空间和新空闲存储空间是不连续空间,为了让处理核在读取发放处理所需信息时,能够知道在读取完原空闲存储空间的发放处理所需信息之后去哪里读取剩下的发放处理所需信息,在原空闲存储空间中还可以存储新空闲存储空间的起始地址,在读取完原空闲存储空间的发放处理所需信息之后,处理核可以获取新空闲存储空间的起始地址,根据新空闲存储空间的起始地址,从新空闲存储空间中读取剩下的发放处理所需信息。Since the original free storage space and the new free storage space are discontinuous spaces, in order to allow the processing core to know where to read the information required for issuance processing after reading the information required for issuance processing in the original free storage space. The remaining information required for issuance processing can also store the starting address of the new free storage space in the original free storage space. After reading the information required for issuance processing of the original free storage space, the processing core can obtain the new free storage space. According to the starting address of the new free storage space, read the remaining information required for issuance processing from the new free storage space.
图11为本公开实施例提供的信息处理方法的流程示意图,可用于描述神经网络神经元信息处理过程中的部分步骤。Figure 11 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the process of processing neural network neuron information.
在一些实施例中,参照图11,本公开实施例提供的一种神经网络神经元信息处理过程中,将发放处理所需信息存储在处理核的步骤之后,该信息处理方法还可以包括:In some embodiments, referring to Figure 11, in the neural network neuron information processing process provided by the embodiment of the present disclosure, after the step of storing the information required for issuance processing in the processing core, the information processing method may also include:
S1101、将发放处理所需信息的索引信息存储在处理核。S1101. Store the index information of the information required for issuance processing in the processing core.
其中,发放处理所需信息的索引信息包括第一神经元的标识(如发放相关神经元的id)以及第一神经元的发放处理所需信息在处理核存储位置的地址信息。The index information of the information required for the release processing includes the identification of the first neuron (such as the ID of the neuron related to the release) and the address information of the storage location of the information required for the release processing of the first neuron in the processing core.
也就是说,处理核在存储发放处理所需信息的同时,也可以将发放处理所需信息的索引信息存储在处理核。 That is to say, while the processing core stores the information required for the issuance processing, it can also store the index information of the information required for the issuance processing in the processing core.
在之后的神经网络运行过程中,当处理核想要再次获取第一神经元的发放处理所需信息时,可以首先根据第一神经元的标识,获取第一神经元的发放处理所需信息在处理核存储位置的地址信息,并根据该地址信息在处理核的对应位置读取第一神经元的发放处理所需信息。During the subsequent operation of the neural network, when the processing core wants to obtain the information required for the firing processing of the first neuron again, it can first obtain the information required for the firing processing of the first neuron based on the identity of the first neuron. The address information of the storage location of the processing core is read, and the information required for the firing processing of the first neuron is read at the corresponding location of the processing core based on the address information.
在一些实施例中,发放处理所需信息的索引信息还包括发放处理所需信息存入处理核的时间。In some embodiments, issuing the index information of the information required for processing also includes the time when the information required for issuing processing is stored in the processing core.
处理核将发放处理所需信息存入处理核的时间存储在处理核,当获取发放处理所需信息需要将其存储在处理核且存储发放处理所需信息所需要的存储空间的大小大于处理核的空闲存储空间,则可以根据发放处理所需信息存入处理核的时间,按照从早到晚的顺序,对已存入的发放处理所需信息进行删除,直至处理核的空闲存储空间的大小大于存储发放处理所需信息所需要的存储空间的大小,再将发放处理所需信息存储在处理核空闲存储空间。The processing core stores the time when the information required for issuance processing is stored in the processing core. When obtaining the information required for issuance processing, it needs to be stored in the processing core and the size of the storage space required to store the information required for issuance processing is larger than that of the processing core. of free storage space, you can delete the stored information required for issuance processing in order from early to late according to the time when the information required for issuance processing is stored in the processing core, until the size of the free storage space of the processing core is larger than the size of the storage space required to store the information required for issuance processing, and then store the information required for issuance processing in the free storage space of the processing core.
在一些实施例中,发放处理所需信息的索引信息还可以包括发放处理所需信息最近一次被读取的时间。每次发放处理所需信息被读取时,索引信息中的最近一次被读取的时间都可以进行相应更新。In some embodiments, the index information of the information required for issuance processing may also include the time when the information required for issuance processing was last read. Each time the information required for issuance processing is read, the latest read time in the index information can be updated accordingly.
当获取发放处理所需信息需要将其存储在处理核且存储发放处理所需信息所需要的存储空间的大小大于处理核的空闲存储空间,则可以根据发放处理所需信息最近一次被读取的时间,按照从早到晚的顺序,对已存入信息进行删除,直至处理核的空闲存储空间的大小大于或等于存储发放处理所需信息所需要的存储空间的大小,再将发放处理所需信息存储在处理核空闲存储空间。When obtaining the information required for issuance processing needs to be stored in the processing core and the size of the storage space required to store the information required for issuance processing is greater than the free storage space of the processing core, the information required for issuance processing can be based on the last time it was read. Time, in order from early to late, delete the stored information until the size of the free storage space of the processing core is greater than or equal to the size of the storage space required to store the information required for issuance processing, and then delete the information required for issuance processing. The information is stored in the free memory space of the processing core.
图12为本公开实施例提供的一种信息处理方法的流程示意图,可应用于计算资源的调度过程。Figure 12 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the scheduling process of computing resources.
参照图12,本公开实施例提供的计算资源的调度过程,主要包括:Referring to Figure 12, the computing resource scheduling process provided by the embodiment of the present disclosure mainly includes:
在步骤S1210中,确定多个计算节点中各个计算节点在预定时间段内的计算量;In step S1210, determine the computing amount of each computing node among the plurality of computing nodes within a predetermined time period;
在步骤S1220中,当各个计算节点之间的计算量不均衡时,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点。In step S1220, when the calculation amount among the various calculation nodes is unbalanced, the calculation task of at least one neuron in the calculation node with overloaded calculation amount is transferred to the target calculation node.
在本公开实施例中,在利用包括多个计算节点的计算系统执行神经网络运算时,对预定时间段内的计算节点的计算量进行统计,当发现不同计算节点之间的计算量不均衡(即,不同计算节点之间计算量差距较大),则将计算量过载的计算节点中的部分计算任务转移至其他计算量未过载的计算节点中,从而可以实现不同计算节点之间的负载均衡、并提高神经网络的整体运算效率的目的。通过上述计算资源的调度方式对神经元的计算任务进行调整后,各个计算节点所负责的计算任务可能不再对应于同一层中的神经元。换言之,在本公开实施例中,在对计算任务进行重新分配后,发放率较大的神经元的计算任务分散在多个不同的计算节点中,使得不同计算节点的负载较为均衡。In embodiments of the present disclosure, when a computing system including multiple computing nodes is used to perform neural network operations, statistics are made on the computing volume of the computing nodes within a predetermined time period. When it is found that the computing volume among different computing nodes is unbalanced ( That is, if there is a large difference in the amount of calculations between different computing nodes), some of the computing tasks in the computing nodes that are overloaded will be transferred to other computing nodes that are not overloaded, so that load balancing between different computing nodes can be achieved. , and to improve the overall computing efficiency of the neural network. After adjusting the computing tasks of neurons through the above-mentioned scheduling method of computing resources, the computing tasks responsible for each computing node may no longer correspond to the neurons in the same layer. In other words, in the embodiment of the present disclosure, after the computing tasks are redistributed, the computing tasks of neurons with larger firing rates are distributed among multiple different computing nodes, so that the loads of different computing nodes are more balanced.
其中,目标计算节点包括满足预设条件、且计算量未过载的计算节点。The target computing nodes include computing nodes that meet preset conditions and are not overloaded in computing workload.
在利用包括多个计算节点的计算系统执行神经网络运算时,对预定时间段内的计算节点的计算量进行统计,当发现不同计算节点之间的计算量不均衡(即,不同计算节点之间计算量差距较大),则可以将计算量过载的计算节点中的部分计算任务转移至其他计算量未过载的计算节点中,从而可以实现不同计算节点之间的负载均衡、并提高神经网络的整体运算效率的目的。其中,将某一计算节点的部分计算任务转移至其他计算节点,本质上属于对计算资源的调度,即根据神经元的发放信息对计算资源进行重新分配,从而提高计算任务和计算资源的均衡性。When using a computing system including multiple computing nodes to perform neural network operations, statistics are made on the computing volume of the computing nodes within a predetermined time period. When it is found that the computing volume among different computing nodes is unbalanced (i.e., the computing volume between different computing nodes is If the calculation amount gap is large), some computing tasks in the computing nodes with overloaded calculations can be transferred to other computing nodes that are not overloaded in calculations, thereby achieving load balancing between different computing nodes and improving the performance of the neural network. The purpose of overall computing efficiency. Among them, transferring part of the computing tasks of a certain computing node to other computing nodes essentially belongs to the scheduling of computing resources, that is, the computing resources are reallocated according to the release information of neurons, thereby improving the balance of computing tasks and computing resources. .
通过上述计算资源的调度对神经元的计算任务进行调整后,各个计算节点所负责的计算任务可能不再对应于同一层中的神经元。换言之,通过本公开实施例所提供的计算资源的调度方式对计算任务进行重新分配后,发放率较大的神经元的计算任务分散在多个不同的计算节点中,使得不同计算节点的负载均衡。After the computing tasks of neurons are adjusted through the above-mentioned scheduling of computing resources, the computing tasks responsible for each computing node may no longer correspond to the neurons in the same layer. In other words, after the computing tasks are reallocated through the computing resource scheduling method provided by the embodiments of the present disclosure, the computing tasks of neurons with larger firing rates are dispersed among multiple different computing nodes, so that the loads of different computing nodes are balanced. .
在本公开实施例中,对“预设条件”也不做特殊的限定。例如,预定条件可以是计算量低于某个特定的计算量。再例如,预定条件可以为:与计算量过载的计算节点之间的距离不超过预定数量的计算节点。也就是说,目标计算节点应当是与计算量过载的计算节点距离较近的计算节点(例如,目标计算计算节点与计算量过载的计算节点之间的距离不超过两个计算节点)。In the embodiment of the present disclosure, the "preset condition" is not particularly limited. For example, the predetermined condition may be that the calculation amount is lower than a certain calculation amount. For another example, the predetermined condition may be: the distance from the computing node with an overloaded computing load does not exceed a predetermined number of computing nodes. That is to say, the target computing node should be a computing node that is close to the computing node with overloaded calculations (for example, the distance between the target computing node and the computing node with overloaded calculations is no more than two computing nodes).
在一些可选的实现方式中,可以周期性地执行上述调度过程,并且,不同周期内的预定时间段为各自周期内的时间段。在这种实施方式中,每隔一段时间进行一次计算节点的计算量统计,发现存在计算节点之间计算量不均衡(即,负载不均衡)的现象时,即对计算量过载的计算节点进行计算任务转出,再次实现负载均衡。也就是说,通过本公开实施方式所提供的调度方法,可以在出现负载不均衡时及时对计算资源进行重新分配,并在整个计算过程中实现大致负载均衡,最终提高神经网络的运算效率。In some optional implementations, the above scheduling process can be performed periodically, and the predetermined time periods in different cycles are time periods within respective cycles. In this implementation, the calculation amount statistics of the computing nodes are performed every once in a while. When it is found that the computing amount is unbalanced among the computing nodes (that is, the load is unbalanced), the computing nodes with overloaded computing amount are processed. The computing tasks are transferred out and load balancing is achieved again. That is to say, through the scheduling method provided by the embodiments of the present disclosure, computing resources can be reallocated in a timely manner when load imbalance occurs, and approximate load balancing can be achieved throughout the computing process, ultimately improving the computing efficiency of the neural network.
在本公开实施例中,对如何确定多个计算节点中各个计算节点在预定时间段内的计算量不做特殊的限定。 In the embodiment of the present disclosure, there is no special limitation on how to determine the calculation amount of each of the multiple computing nodes within a predetermined time period.
作为一种可选实施方式,图13为本公开实施例提供的一种信息处理方法的流程示意图,可用于描述计算资源的调度过程中的部分步骤。As an optional implementation manner, FIG. 13 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the scheduling process of computing resources.
如图13所示,步骤S1210确定多个计算节点中各个计算节点在预定时间段内的计算量,可以包括:As shown in Figure 13, step S1210 determines the computing amount of each computing node among multiple computing nodes within a predetermined time period, which may include:
在步骤S1210a中,分别统计预定时间段内多个计算节点中的每一个计算节点的发放脉冲个数;In step S1210a, count the number of pulses issued by each computing node in the plurality of computing nodes within the predetermined time period;
在步骤S1210b中,根据公式(2)计算各个计算节点在预定时间段内的计算量:
Pi=Ri·Ci      (2)
In step S1210b, the calculation amount of each computing node within the predetermined time period is calculated according to formula (2):
P i =R i ·C i (2)
其中,多个计算节点依次编号,i为计算节点的编号;Among them, multiple computing nodes are numbered in sequence, and i is the number of the computing node;
Pi为第i个计算节点在预定时间段内的计算量; Pi is the calculation amount of the i-th computing node within a predetermined time period;
Ri为第i个计算节点在预定时间段内的发放脉冲个数;R i is the number of pulses issued by the i-th computing node within a predetermined time period;
Ci为第i个计算节点在预定时间段内的突触连接个数。C i is the number of synaptic connections of the i-th computing node within a predetermined time period.
在本公开实施例中,对调度计算资源的执行设备不做特殊的限定。作为一种可选实施方式,可以利用独立于计算节点的电子设备执行该调度方法、也可以利用多个计算节点中的一者执行该调度方法。In the embodiments of the present disclosure, there is no special limitation on the execution device for scheduling computing resources. As an optional implementation manner, the scheduling method may be executed using an electronic device independent of the computing node, or one of multiple computing nodes may be used to execute the scheduling method.
当由独立于计算节点的电子设备执行该调度方法时,电子设备可以向各个计算节点发送发放脉冲个数获取请求,以获得各个计算节点在预定时间段内的发放脉冲个数。When the scheduling method is executed by an electronic device independent of the computing node, the electronic device may send a pulse number acquisition request to each computing node to obtain the number of pulses issued by each computing node within a predetermined time period.
当由计算节点执行该调度方法时,执行该调度方法的计算节点可以向其他计算节点发送发放脉冲个数获取请求,以获得其他各个计算节点在预定时间段内发放的脉冲个数。当然,本公开实施例并不限于此,在这种实施方式中,各个计算节点可以周期性地向其他计算节点发送自己在预定时间段内的发放脉冲个数。When the computing node executes the scheduling method, the computing node executing the scheduling method may send a pulse number acquisition request to other computing nodes to obtain the number of pulses issued by each other computing node within a predetermined time period. Of course, the embodiments of the present disclosure are not limited to this. In this implementation, each computing node may periodically send the number of pulses it issues within a predetermined time period to other computing nodes.
在本公开实施例中,对如何判定各个计算节点之间的计算量是否出现不均衡现象不做特殊的限定。In the embodiment of the present disclosure, there is no special limitation on how to determine whether there is an imbalance in the amount of calculations between each computing node.
在一些实施例中,在确定多个计算节点中各个计算节点在预定时间段内的计算量之后,信息处理方法还包括:确定预定时间段内多个计算节点的平均计算量;确定各个计算节点在预设时间段内的计算量和平均计算量之间的差值绝对值,并根据差值绝对值与平均计算量的比值确定各个计算节点的均衡系数;当存在至少一个计算节点的均衡系数大于预设阈值的情况下,确定多个计算节点之间的计算量不均衡。In some embodiments, after determining the computing amount of each computing node among the multiple computing nodes within a predetermined time period, the information processing method further includes: determining the average computing amount of the multiple computing nodes within the predetermined time period; determining each computing node The absolute value of the difference between the calculation amount and the average calculation amount within the preset time period, and the balance coefficient of each calculation node is determined based on the ratio of the absolute value of the difference to the average calculation amount; when there is the balance coefficient of at least one calculation node If it is greater than the preset threshold, it is determined that the calculation amount among multiple computing nodes is unbalanced.
作为一种可选实施方式,图14为本公开实施例提供的一种信息处理方法的流程示意图,可用于描述计算资源的调度过程中的部分步骤。As an optional implementation manner, FIG. 14 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be used to describe some steps in the scheduling process of computing resources.
如图14所示,在步骤S1210之后,该信息处理方法还可以包括如下步骤:As shown in Figure 14, after step S1210, the information processing method may also include the following steps:
在步骤S1212中,确定预定时间段内多个计算节点的平均计算量;In step S1212, determine the average calculation amount of multiple computing nodes within a predetermined time period;
在步骤S1214中,根据各个计算节点在预定时间段内的计算量、以及平均计算量按照公式(1)分别计算各个计算节点的均衡系数;In step S1214, the equilibrium coefficient of each computing node is calculated according to the calculation amount of each computing node within a predetermined time period and the average calculation amount according to formula (1);
在步骤S1216中,当存在均衡系数大于预设阈值的计算节点时,判定各个计算节点之间的计算量不均衡。
In step S1216, when there is a computing node with a balance coefficient greater than a preset threshold, it is determined that the calculation amount among each computing node is unbalanced.
其中,i为计算节点的编号;Among them, i is the number of the computing node;
Pi为第i个计算节点在预定时间段内的计算量; Pi is the calculation amount of the i-th computing node within a predetermined time period;
为在预定时间段内所有计算节点的平均计算量; It is the average calculation amount of all computing nodes within a predetermined time period;
εi为第i个计算节点的均衡系数。ε i is the equilibrium coefficient of the i-th calculation node.
εi越大、则说明第i个计算节点的计算量与多个计算节点的平均计算量相差越大。The larger ε i is, the greater the difference between the calculation amount of the i-th computing node and the average calculation amount of multiple computing nodes.
在本公开实施例中,对预设阈值的取值不做特殊的限定,可以根据对神经网络的运算速度要求来确定预设阈值。要求神经网络的运算速度越快、则预设阈值的取值越小。作为一种可选实施方式,预设阈值可以取自5至10之间。也就是说,当存在运算量与平均运算量相差5至10倍的计算节点时,则认为出现了负载不均衡。In the embodiment of the present disclosure, there is no special limitation on the value of the preset threshold, and the preset threshold can be determined according to the operation speed requirements of the neural network. The faster the calculation speed of the neural network is required, the smaller the value of the preset threshold is. As an optional implementation, the preset threshold can be between 5 and 10. That is to say, when there are computing nodes whose computing power differs from the average computing power by 5 to 10 times, it is considered that there is a load imbalance.
在本公开实施例中,对如何确定负载不均衡情况中的“计算量过载的计算节点”不做特殊的限定。例如,可以将计算量超过预定量的计算节点确定为计算量过载的计算节点。也可以将计算量超过平均计算量过多的计算节点确定为计算量过载的计算节点(例如,可以将计算量超过平均计算量5-10倍的计算节点确定为计算量过载的计算节点)。相应地,在该调度过程中,可以将计算量未达到在预定时间段内所有计算节点的平均计算量的计算节点确定为计算量未过载的计算节点。In the embodiment of the present disclosure, there is no special limitation on how to determine the “computing node with overloaded calculation” in the load imbalance situation. For example, a computing node whose computing volume exceeds a predetermined amount may be determined as a computing node whose computing volume is overloaded. A computing node whose computing amount exceeds the average computing amount may also be determined as a computing node with an overloaded computing amount (for example, a computing node whose computing amount exceeds 5-10 times the average computing amount may be determined as a computing node with an overloaded computing amount). Correspondingly, in the scheduling process, computing nodes whose computing volume does not reach the average computing volume of all computing nodes within a predetermined time period may be determined as computing nodes whose computing volume is not overloaded.
在本公开实施例中,对如何确定需要被转移至目标计算节点的计算任务不做特殊的限定。为了 提高转移速率,作为一种可选实施方式,在步骤S1220中,可以随机地从计算量过载的计算节点中选择神经元,并将选中的神经元的计算任务转移至目标计算节点。In the embodiment of the present disclosure, there is no special limitation on how to determine the computing tasks that need to be transferred to the target computing node. for To increase the transfer rate, as an optional implementation, in step S1220, neurons can be randomly selected from computing nodes with overloaded calculations, and the computing tasks of the selected neurons can be transferred to the target computing node.
对于神经网络而言,神经元通常是分组的。例如,生物特性相同的神经元可以被划分在同一个组中。对应于计算节点而言,计算节点中执行的计算任务也是分组的。为了提高任务转移的效率,作为本公开实施例的一种可选的实施方式,可以对计算任务进行整组转移,也就是说,在步骤S1220中,可以将计算量过载的计算节点中至少一个任务组移至目标计算节点,其中,任务组包括多个神经元对应的计算任务。For neural networks, neurons are usually grouped. For example, neurons with identical biological properties can be grouped into the same group. Corresponding to the computing nodes, the computing tasks executed in the computing nodes are also grouped. In order to improve the efficiency of task transfer, as an optional implementation manner of the embodiment of the present disclosure, a whole set of computing tasks can be transferred. That is to say, in step S1220, at least one of the computing nodes with an overloaded calculation amount can be transferred. The task group moves to the target computing node, where the task group includes computing tasks corresponding to multiple neurons.
为了能够顺畅地通过神经网络处理数据,可选地,如图14所示,在步骤S1220之后,该信息处理方法还可以包括:In order to smoothly process data through the neural network, optionally, as shown in Figure 14, after step S1220, the information processing method may also include:
在步骤S1230中,向计算任务被转移至目标计算节点的神经元相关联的计算节点发送任务转移通知。In step S1230, a task transfer notification is sent to the computing node associated with the neuron of the target computing node to which the computing task is transferred.
其中,任务转移通知携带有目标计算节点的地址信息。Among them, the task transfer notification carries the address information of the target computing node.
在本公开实施例中,所谓“计算任务被转移至目标计算节点的神经元相关联的计算节点”为“计算任务被转移至目标计算节点的神经元”的前继突触所在的计算节点、和/或“计算任务被转移至目标计算节点的神经元”的后继突触所在的计算节点。In the embodiment of the present disclosure, the so-called "computing node associated with the neuron in which the computing task is transferred to the target computing node" refers to the computing node where the predecessor synapse of "the neuron in which the computing task is transferred to the target computing node" is located, and/or the computing node where the successor synapse is located "where the computing task is transferred to the neuron of the target computing node".
进一步地,如图14所示,在步骤S1220之后,该信息处理方法还可以包括:Further, as shown in Figure 14, after step S1220, the information processing method may also include:
在步骤S1240中,将被转移至目标计算节点的计算任务对应的神经元的胞体处理信息、以及后继突触信息发送至目标节点。In step S1240, the cell body processing information of the neuron corresponding to the computing task transferred to the target computing node and the subsequent synapse information are sent to the target node.
在一些可选的实现方式中,本公开实施例的信息处理方法还可用于执行相应的数据处理;例如,可应用于供神经元进行突触积分计算。In some optional implementations, the information processing method of the embodiment of the present disclosure can also be used to perform corresponding data processing; for example, it can be applied to synaptic integral calculation for neurons.
图15为本公开实施例提供的一种信息处理方法的流程示意图,可应用于神经元的数据处理过程。如图15所示,该数据处理过程包括:Figure 15 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to the data processing process of neurons. As shown in Figure 15, the data processing process includes:
在步骤S1510中,确定与当前计算节点连接的突触信息,突触信息包括当前计算节点对应的神经元的后继神经元的位置信息、以及当前计算节点对应的神经元的突触权重;In step S1510, determine the synaptic information connected to the current computing node. The synaptic information includes the position information of the successor neuron of the neuron corresponding to the current computing node and the synaptic weight of the neuron corresponding to the current computing node;
在步骤S1520中,将当前计算节点对应的神经元的突触权重发送至后继神经元对应的计算节点,以供计算节点进行突触积分计算。In step S1520, the synaptic weight of the neuron corresponding to the current calculation node is sent to the calculation node corresponding to the subsequent neuron for the calculation node to perform synaptic integral calculation.
其中,当存在任务转移通知时,后继神经元的位置信息由任务转移通知所携带,且任务转移通知包括执行本公开实施例任一项信息处理方法所生成的任务转移通知。Wherein, when there is a task transfer notification, the location information of the subsequent neuron is carried by the task transfer notification, and the task transfer notification includes a task transfer notification generated by executing any one of the information processing methods in the embodiments of the present disclosure.
当然,在不存在任务转移通知时,后继神经元的位置信息即为初始设定的后继神经元的位置信息。Of course, when there is no task transfer notification, the position information of the successor neuron is the initially set position information of the successor neuron.
下面参照图16对本公开所提供的数据处理过程进行详细的介绍。The data processing process provided by the present disclosure will be introduced in detail with reference to FIG. 16 below.
图16为本公开实施例提供的一种神经网络的示意图。Figure 16 is a schematic diagram of a neural network provided by an embodiment of the present disclosure.
图16中示出了两个前继神经元(分别为前继神经元A1和前继神经元A2),以及四个后继神经元(分别为后继神经元B、后继神经元C、后继神经元D、后继神经元E)。Figure 16 shows two predecessor neurons (respectively, successor neuron A1 and successor neuron A2), and four successor neurons (respectively, successor neuron B, successor neuron C, successor neuron D. Successor neuron E).
对于前继神经元A1所在的计算节点,执行的数据处理方法如下:For the computing node where the predecessor neuron A1 is located, the data processing method performed is as follows:
获取前继神经元A1连接的突触的突触信息,该突触信息包括后继神经元的地址信息(例如,编号)、以及前继神经元分别对于各个后继神经元的突触权重w1、w2、w3、w4;Obtain the synaptic information of the synapse connected to the predecessor neuron A1. The synapse information includes the address information (for example, number) of the successor neuron, and the synaptic weights w1 and w2 of the predecessor neuron to each successor neuron respectively. , w3, w4;
将权重信息分发给负责各个后继神经元的计算节点,以供各个计算节点进行突触积分计算。Distribute the weight information to the computing nodes responsible for each subsequent neuron for each computing node to perform synaptic integral calculation.
第二方面,本公开实施例提供一种信息处理单元。In a second aspect, embodiments of the present disclosure provide an information processing unit.
图17为本公开实施例提供的一种信息处理单元的组成框图。参照图17,本公开实施例的信息处理单元可应用于众核系统,众核系统的至少部分处理核中加载有神经网络的神经元,信息处理单元1700包括:Figure 17 is a block diagram of an information processing unit provided by an embodiment of the present disclosure. Referring to Figure 17, the information processing unit of the embodiment of the present disclosure can be applied to a many-core system. At least some of the processing cores of the many-core system are loaded with neurons of the neural network. The information processing unit 1700 includes:
动态调度子单元1701,被配置为根据神经元的发放信息,动态调度存储资源,以供神经元基于调度后的存储资源执行发放处理,和/或,根据神经元的发放信息,动态调度计算资源,以供神经元基于调度后的计算资源执行计算任务;The dynamic scheduling subunit 1701 is configured to dynamically schedule storage resources according to the issuance information of neurons, so that neurons can perform issuance processing based on the scheduled storage resources, and/or dynamically schedule computing resources according to the issuance information of neurons. , for neurons to perform computing tasks based on scheduled computing resources;
其中,存储资源包括众核系统的片上存储空间和/或众核系统外的外加存储空间。The storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
在本公开实施例中,充分考虑了神经元的发放情况,并基于此分析了不同发放情况下对存储资源进行读写操作的特征,并基于读写操作特征制定更加合理的存储资源调度方案,以在满足存储需求的同时,尽量提高读写效率,且缓解读写可能对处理性能带来的不利影响。并且,上述对存储资源的调度过程并非一次性的,而是可以根据需求(例如,基于时间周期的要求重新调度,或者响应于某些事件进行调度),及时地基于神经元当前的发放信息进行动态性地调整,以使存储资源的分 配与神经元的发放情况始终是较为匹配的,确保对存储资源进行及时调度。在调度计算资源时,不同于相关技术中依赖于神经网络中各个神经元的静态拓扑连接特性,为各个计算节点分配计算任务以实现计算资源的调度,而是考虑到计算量与神经元的发放情况之间的相关性,基于神经元的发放信息,动态地、均衡地调整计算量不均衡的计算节点中的神经元的计算任务,以此实现对计算资源的更加准确合理的调度,使得各个计算节点的计算量和计算资源均处于相对均衡的状态。In the embodiment of the present disclosure, the issuance of neurons is fully considered, and based on this, the characteristics of read and write operations on storage resources under different issuance situations are analyzed, and a more reasonable storage resource scheduling plan is formulated based on the characteristics of read and write operations. In order to meet the storage requirements, it can improve the efficiency of reading and writing as much as possible, and alleviate the adverse impact that reading and writing may have on processing performance. Moreover, the above-mentioned scheduling process of storage resources is not a one-time process, but can be performed in a timely manner based on the current release information of neurons according to needs (for example, rescheduling based on time period requirements, or scheduling in response to certain events). Dynamically adjust the distribution of storage resources The distribution of neurons is always relatively consistent, ensuring timely scheduling of storage resources. When scheduling computing resources, unlike related technologies that rely on the static topological connection characteristics of each neuron in the neural network to allocate computing tasks to each computing node to achieve computing resource scheduling, the amount of calculation and the distribution of neurons are taken into consideration. Based on the correlation between situations, based on the release information of neurons, the computing tasks of neurons in computing nodes with unbalanced computing amounts are dynamically and evenly adjusted to achieve more accurate and reasonable scheduling of computing resources, so that each The computing workload and computing resources of computing nodes are in a relatively balanced state.
在一些可选的实现方式中,神经网络的稀疏神经元的权重信息存储在众核系统外的外加存储空间,神经网络的非稀疏神经元的权重信息存储在众核系统的片上存储空间,动态调度子单元包括:神经网络神经元信息存储装置;In some optional implementations, the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system, and the weight information of the non-sparse neurons of the neural network is stored in the on-chip storage space of the many-core system, dynamically The scheduling subunit includes: a neural network neuron information storage device;
相应的,神经网络神经元信息存储装置,包括:Correspondingly, the neural network neuron information storage device includes:
判断模块,被配置为根据神经网络的神经元的近期发放活跃度确定神经元当前时刻为稀疏神经元或非稀疏神经元;A judgment module configured to determine whether the neuron at the current moment is a sparse neuron or a non-sparse neuron based on the recent firing activity of the neuron of the neural network;
第一执行模块,被配置为在神经元当前时刻为稀疏神经元,且神经元在当前时刻之前时刻为非稀疏神经元的情况下,将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间;The first execution module is configured to transfer the weight information of the neuron from the on-chip storage space of the many-core system to Additional storage space outside of many-core systems;
第二执行模块,被配置为在神经元当前时刻为非稀疏神经元,且神经元在当前时刻之前时刻为稀疏神经元的情况下,将神经元的权重信息从众核系统外的外加存储空间转移至众核系统的片上存储空间。The second execution module is configured to transfer the weight information of the neuron from the external storage space outside the many-core system when the neuron is a non-sparse neuron at the current time and the neuron was a sparse neuron at the time before the current time. to the on-chip storage space of many-core systems.
图18为本公开实施例提供的一种神经网络神经元信息存储装置的组成框图,可应用于神经网络神经元信息的存储。Figure 18 is a block diagram of a neural network neuron information storage device provided by an embodiment of the present disclosure, which can be applied to the storage of neural network neuron information.
参照图18,本公开实施例提供了一种神经网络神经元信息存储装置1800,其中,该神经网络为加载在众核系统的神经网络,神经网络的稀疏神经元的权重信息存储在众核系统外的外加存储空间,神经网络的非稀疏神经元的权重信息存储在众核系统的片上存储空间,则神经网络神经元信息存储装置1800包括:Referring to Figure 18, an embodiment of the present disclosure provides a neural network neuron information storage device 1800, wherein the neural network is a neural network loaded in a many-core system, and the weight information of the sparse neurons of the neural network is stored in the many-core system. In addition to the additional storage space, the weight information of the non-sparse neurons of the neural network is stored in the on-chip storage space of the many-core system, then the neural network neuron information storage device 1800 includes:
判断模块1801,用于根据神经网络的神经元的近期发放活跃度确定神经元当前时刻为稀疏神经元或非稀疏神经元;The judgment module 1801 is used to determine whether the neuron at the current moment is a sparse neuron or a non-sparse neuron based on the recent firing activity of the neuron of the neural network;
第一执行模块1802,用于在神经元当前时刻为稀疏神经元,且神经元在当前时刻之前时刻为非稀疏神经元的情况下,将神经元的权重信息从众核系统的片上存储空间转移至众核系统外的外加存储空间;The first execution module 1802 is used to transfer the weight information of the neuron from the on-chip storage space of the many-core system to Additional storage space outside of many-core systems;
第二执行模块1803,用于在神经元当前时刻为非稀疏神经元,且神经元在当前时刻之前时刻为稀疏神经元的情况下,将神经元的权重信息从众核系统外的外加存储空间转移至众核系统的片上存储空间。The second execution module 1803 is used to transfer the weight information of the neuron from the external storage space outside the many-core system when the neuron is a non-sparse neuron at the current time and the neuron was a sparse neuron at the time before the current time. to the on-chip storage space of many-core systems.
在一些可选的实现方式中,动态调度子单元包括:神经网络神经元信息处理装置;In some optional implementations, the dynamic scheduling subunit includes: a neural network neuron information processing device;
相应的,神经网络神经元信息处理装置,包括:Correspondingly, the neural network neuron information processing device includes:
判断模块,被配置为在神经元满足发放相关条件的情况下,确定处理核中是否存在神经元的发放处理所需信息,神经元为加载于处理核的神经元中的任一个;The judgment module is configured to determine whether there is information required for neuron firing processing in the processing core when the neuron meets firing-related conditions, and the neuron is any one of the neurons loaded in the processing core;
获取模块,被配置为在处理核中不存在神经元的发放处理所需信息的情况下,从众核系统外的外加存储空间获取神经元的发放处理所需信息;The acquisition module is configured to obtain the information required for the neuron firing processing from an external storage space outside the many-core system when the information required for the neuron firing processing does not exist in the processing core;
执行模块,被配置为将发放处理所需信息存储在处理核,并执行与神经元满足的发放相关条件对应的操作。The execution module is configured to store information required for firing processing in the processing core, and perform operations corresponding to firing-related conditions satisfied by the neuron.
图19为本公开实施例提供的一种神经网络神经元信息处理装置的组成框图,可应用于神经网络神经元信息的处理。Figure 19 is a block diagram of a neural network neuron information processing device provided by an embodiment of the present disclosure, which can be applied to the processing of neural network neuron information.
参照图19,本公开实施例提供了一种神经网络神经元信息处理装置1900,该神经网络神经元信息处理装置1900应用于众核系统的处理核,处理核中加载有神经网络的神经元,该神经网络神经元信息处理装置1900包括:Referring to Figure 19, an embodiment of the present disclosure provides a neural network neuron information processing device 1900. The neural network neuron information processing device 1900 is applied to the processing core of a many-core system, and the processing core is loaded with neurons of the neural network. The neural network neuron information processing device 1900 includes:
判断模块1901,用于在第一神经元满足发放相关条件的情况下,确定处理核中是否存在第一神经元的发放处理所需信息,第一神经元为加载于处理核的神经元中的任一个;The judgment module 1901 is used to determine whether there is information required for the firing processing of the first neuron in the processing core when the first neuron meets the conditions related to firing. The first neuron is a neuron loaded in the processing core. any one;
获取模块1902,用于在处理核中不存在第一神经元的发放处理所需信息的情况下,从众核系统外的外加存储空间获取第一神经元的发放处理所需信息;The acquisition module 1902 is used to obtain the information required for the firing processing of the first neuron from an external storage space outside the many-core system when the information required for the firing processing of the first neuron does not exist in the processing core;
执行模块1903,用于将发放处理所需信息存储在处理核,并执行与第一神经元满足的发放相关条件对应的操作。The execution module 1903 is used to store information required for firing processing in the processing core, and perform operations corresponding to firing-related conditions satisfied by the first neuron.
在一些可选的实现方式中,动态调度子单元包括:计算资源的调度装置; In some optional implementations, the dynamic scheduling subunit includes: a computing resource scheduling device;
相应的,计算资源的调度装置,包括:Correspondingly, the computing resource scheduling device includes:
计算量确定模块,被配置为确定多个计算节点中各个计算节点在预定时间段内的计算量;a calculation amount determination module configured to determine the calculation amount of each of the plurality of computing nodes within a predetermined time period;
任务转移模块,被配置为在多个计算节点之间的计算量不均衡的情况下,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,其中,目标计算节点为满足预设条件、且计算量过载的计算节点。The task transfer module is configured to transfer the computing task of at least one neuron in the computing node with overloaded computing volume to the target computing node when the computing volume among the multiple computing nodes is unbalanced, where the target computing node is Computing nodes that meet preset conditions and are overloaded with calculations.
图20为本公开实施例提供的一种计算资源的调度装置的组成框图,可应用于计算资源的调度。Figure 20 is a block diagram of a computing resource scheduling device provided by an embodiment of the present disclosure, which can be applied to computing resource scheduling.
参照图20,本公开实施例提供了一种计算资源的调度装置2000,该计算资源的调度装置2000可以包括:Referring to Figure 20, an embodiment of the present disclosure provides a computing resource scheduling device 2000. The computing resource scheduling device 2000 may include:
计算量确定模块2010,被配置为确定多个计算节点中各个计算节点在预定时间段内的计算量;The calculation amount determination module 2010 is configured to determine the calculation amount of each of the plurality of computing nodes within a predetermined time period;
任务转移模块2020,被配置为在各个计算节点之间的计算量不均衡时,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,其中,目标计算节点为满足预设条件、且计算量过载的计算节点。The task transfer module 2020 is configured to transfer the computing task of at least one neuron in the computing node with an overloaded computing workload to a target computing node when the computing volume among the computing nodes is unbalanced, where the target computing node satisfies the predetermined requirements. Compute nodes that are conditional and overloaded with calculations.
需要指出的是,在本公开实施例中,对计算任务的类型不做特殊的限定。例如,计算任务可以是图像处理任务、语音处理任务、文本处理任务等中的一者或几者。此外,计算任务还可包括对当前计算节点对应的神经元所连接的后继突触的权重、延迟、后继神经元的编号信息进行收集。即,当前计算节点可以根据神经元编号获取上述信息。这部分计算任务是突触前神经元的主要运算负载。上述收集过程可以是从存储器(片上或片外)的读取和整理过程。It should be noted that in the embodiments of the present disclosure, the type of computing tasks is not particularly limited. For example, the computing task may be one or more of image processing tasks, speech processing tasks, text processing tasks, etc. In addition, the computing task may also include collecting the weight, delay, and number information of the succeeding synapses connected to the neuron corresponding to the current computing node, and the numbering information of the succeeding neurons. That is, the current computing node can obtain the above information based on the neuron number. This part of the computational task is the main computational load of the presynaptic neuron. The above collection process may be a reading and sorting process from memory (on-chip or off-chip).
可选地,计算资源的调度装置2000还可以包括平均计算量确定模块2030、均衡系数计算模块2040、以及判断模块2050。Optionally, the computing resource scheduling device 2000 may also include an average calculation amount determination module 2030, an equalization coefficient calculation module 2040, and a judgment module 2050.
平均计算量确定模块2030,被配置为确定预定时间段内多个计算节点的平均计算量。The average calculation amount determination module 2030 is configured to determine the average calculation amount of multiple computing nodes within a predetermined time period.
均衡系数计算模块2040,被配置为根据各个计算节点在预定时间段内的计算量、以及平均计算量按照公式(1)分别计算各个计算节点的均衡系数。The balance coefficient calculation module 2040 is configured to calculate the balance coefficient of each computing node according to the calculation amount of each computing node in a predetermined time period and the average calculation amount according to formula (1).
判断模块2050,被配置为在存在均衡系数大于预设阈值的计算节点时,判定各个计算节点之间的计算量不均衡。The determination module 2050 is configured to determine that the amount of computation between each computing node is unbalanced when there is a computing node with a balance coefficient greater than a preset threshold.
可选地,判断模块2050,还可以被配置为:将计算量超过在预定时间段内所有计算节点的平均计算量预定倍数的计算节点确定为计算量过载的计算节点;将计算量未达到在预定时间段内所有计算节点的平均计算量的计算节点确定为计算量未过载的计算节点。Optionally, the judgment module 2050 may also be configured to: determine a computing node whose computing volume exceeds a predetermined multiple of the average computing volume of all computing nodes within a predetermined time period as a computing node whose computing volume is overloaded; The computing node based on the average computing volume of all computing nodes within a predetermined time period is determined as the computing node whose computing volume is not overloaded.
可选地,任务转移模块2020,被配置为随机地从计算量过载的计算节点中选择神经元,并将选中的神经元的计算任务转移至目标计算节点。Optionally, the task transfer module 2020 is configured to randomly select neurons from computing nodes with overloaded calculations, and transfer the computing tasks of the selected neurons to the target computing nodes.
可选地,任务转移模块2020,被配置为将计算量过载的计算节点中至少一个任务组移至目标计算节点,其中,任务组包括多个神经元对应的计算任务。Optionally, the task transfer module 2020 is configured to move at least one task group in the computing node with overloaded calculations to the target computing node, where the task group includes computing tasks corresponding to multiple neurons.
可选地,调度装置还包括任务转移通知生成模块2060,被配置为:生成任务转移通知,任务转移通知携带有目标计算节点的地址信息;向计算任务被转移至目标计算节点的神经元相关联的计算节点发送任务转移通知。Optionally, the scheduling device also includes a task transfer notification generation module 2060, configured to: generate a task transfer notification, which carries the address information of the target computing node; and associate the computing task with the neuron of the target computing node. The computing node sends a task transfer notification.
可选地,调度装置还可以包括转发模块2070,该转发模块2070,被配置为将被转移至目标计算节点的计算任务对应的神经元的胞体处理信息、以及后继突触信息发送至目标节点。Optionally, the scheduling device may also include a forwarding module 2070 configured to send the cell body processing information of the neuron corresponding to the computing task transferred to the target computing node and the subsequent synapse information to the target node.
在一些可选的实现方式中,动态调度子单元包括:数据处理装置;In some optional implementations, the dynamic scheduling subunit includes: a data processing device;
相应的,数据处理装置,包括:Correspondingly, the data processing device includes:
关联突触信息确定模块,被配置为确定与当前数据处理装置连接的突触的突触信息,突触信息包括当前数据处理装置对应的神经元的后继神经元的位置信息、以及当前数据处理装置对应的神经元的突触权重;The associated synapse information determination module is configured to determine the synapse information of the synapse connected to the current data processing device. The synapse information includes the position information of the successor neuron of the neuron corresponding to the current data processing device, and the current data processing device. The synaptic weight of the corresponding neuron;
发送模块,被配置为将当前数据处理装置对应的神经元的突触权重发送至后继神经元对应的计算节点,以供后继神经元对应的计算节点进行突触积分计算,其中,在存在任务转移通知的情况下,至少部分后继神经元的位置信息由任务转移通知所携带。The sending module is configured to send the synaptic weight of the neuron corresponding to the current data processing device to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation, wherein, when there is task transfer In the case of notification, at least part of the position information of the subsequent neurons is carried by the task transfer notification.
图21为本公开实施例提供的一种数据处理装置的组成框图,可应用于神经元的数据处理。Figure 21 is a block diagram of a data processing device provided by an embodiment of the present disclosure, which can be applied to neuron data processing.
参照图21,本公开实施例提供了一种数据处理装置2100,该数据处理装置2100可以包括:Referring to Figure 21, an embodiment of the present disclosure provides a data processing device 2100. The data processing device 2100 may include:
关联突触信息确定模块2110,被配置为确定与当前数据处理装置连接的突触的突触信息,突触信息包括当前数据处理装置对应的神经元的后继神经元的位置信息、以及当前数据处理装置对应的神经元的突触权重。The associated synapse information determination module 2110 is configured to determine the synapse information of the synapse connected to the current data processing device. The synapse information includes the position information of the successor neuron of the neuron corresponding to the current data processing device, and the current data processing The synaptic weight of the neuron corresponding to the device.
发送模块2120,被配置为将当前数据处理装置对应的神经元的突触权重发送至后继神经元对应的计算节点,以供后继神经元对应的计算节点进行突触积分计算,其中,当存在任务转移通知时, 后继神经元的位置信息由任务转移通知所携带,且任务转移通知为执行本公开第一个方面所提供的调度方法后生成的任务转移通知。The sending module 2120 is configured to send the synaptic weight of the neuron corresponding to the current data processing device to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation, wherein, when there is a task When transferring notification, The position information of the subsequent neuron is carried by the task transfer notification, and the task transfer notification is a task transfer notification generated after executing the scheduling method provided by the first aspect of the present disclosure.
第三方面,本公开实施例提供一种处理核,该处理核包括本公开实施例中任一项的神经网络神经元信息存储装置、神经网络神经元信息处理装置、计算资源的调度装置、以及数据处理装置中的任意一种或多种。In a third aspect, embodiments of the present disclosure provide a processing core, which includes a neural network neuron information storage device, a neural network neuron information processing device, a computing resource scheduling device, and a neural network neuron information storage device according to any one of the embodiments of the present disclosure. Any one or more types of data processing devices.
第四方面,本公开实施例提供一种电子设备。In a fourth aspect, embodiments of the present disclosure provide an electronic device.
图22为本公开实施例提供的一种电子设备的框图。Figure 22 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
参照图22,本公开实施例提供了一种电子设备,该电子设备包括多个处理核2201以及片上网络2202,其中,多个处理核2201均与片上网络2202连接,片上网络2202被配置为交互多个处理核间的数据和外部数据。Referring to Figure 22, an embodiment of the present disclosure provides an electronic device. The electronic device includes multiple processing cores 2201 and an on-chip network 2202. The multiple processing cores 2201 are connected to the on-chip network 2202, and the on-chip network 2202 is configured to interact with each other. Data between multiple processing cores and external data.
其中,一个或多个处理核2201中存储有一个或多个指令,一个或多个指令被一个或多个处理核2201执行,以使一个或多个处理核2201能够执行上述的信息处理方法。One or more instructions are stored in one or more processing cores 2201, and the one or more instructions are executed by one or more processing cores 2201, so that the one or more processing cores 2201 can execute the above information processing method.
在一些实施例中,该电子设备可以是类脑芯片,由于类脑芯片可以采用向量化计算方式,且需要通过外部内存例如双倍速率(Double Data Rate,DDR)同步动态随机存储器调入神经网络模型的权重信息等参数。因此,本公开实施例采用批处理的运算效率较高。In some embodiments, the electronic device may be a brain-like chip, because the brain-like chip can adopt a vectorized calculation method and needs to be loaded into the neural network through an external memory such as a double data rate (Double Data Rate, DDR) synchronous dynamic random access memory. Model weight information and other parameters. Therefore, the operation efficiency of batch processing in the embodiments of the present disclosure is relatively high.
本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序。Embodiments of the present disclosure also provide a computer-readable storage medium with a computer program stored thereon.
图23为本公开实施例提供的一种计算机可读介质的组成框图。其中,计算机程序在被处理器/处理核执行时实现上述的数据处理方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。Figure 23 is a block diagram of a computer-readable medium provided by an embodiment of the present disclosure. Wherein, the computer program implements the above data processing method when executed by the processor/processing core. Computer-readable storage media may be volatile or non-volatile computer-readable storage media.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当该计算机可读代码在电子设备的处理器中运行时,该电子设备中的处理器执行上述信息处理方法。Embodiments of the present disclosure also provide a computer program product, including a computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, when the computer readable code is stored in a processor of an electronic device When running, the processor in the electronic device executes the above information processing method.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读存储介质上,计算机可读存储介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。Those of ordinary skill in the art can understand that all or some steps, systems, and functional modules/units in the devices disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may consist of several physical components. Components execute cooperatively. Some or all of the 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 as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be distributed on computer-readable storage media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读程序指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM)、静态随机存取存储器(SRAM)、闪存或其他存储器技术、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读程序指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。As is known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. lossless, removable and non-removable media. Computer storage media include, but are not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or that can be used to store the desired information and can be accessed by a computer any other media. Additionally, it is known to those of ordinary skill in the art that communication media typically embodies computer readable program 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 medium.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列 (FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source code or object code written in any combination of object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through the Internet). connect). In some embodiments, electronic circuits are customized by utilizing state information of computer readable program instructions, such as programmable logic circuits, field programmable gate arrays (FPGA) or programmable logic array (PLA), electronic circuits that can execute computer-readable program instructions to implement various aspects of the present disclosure.
这里所描述的计算机程序产品可以通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品可以体现为计算机存储介质,在另一个可选实施例中,计算机程序产品可以体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program products described herein may be implemented in hardware, software, or a combination thereof. In an optional embodiment, the computer program product can be embodied as a computer storage medium. In another optional embodiment, the computer program product can be embodied as a software product, such as a Software Development Kit (SDK), etc. wait.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine that, when executed by the processor of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executed on a computer, other programmable data processing apparatus, or other equipment to implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that embody one or more elements for implementing the specified logical function(s). Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts. , or can be implemented using a combination of specialized hardware and computer instructions.
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其他实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。 Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a general illustrative sense only and not for purpose of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone, or may be used in conjunction with other embodiments, unless expressly stated otherwise. Features and/or components used in combination. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims (43)

  1. 一种信息处理方法,其中,所述信息处理方法应用于众核系统,所述众核系统的至少部分处理核中加载有神经网络的神经元,所述信息处理方法包括:An information processing method, wherein the information processing method is applied to a many-core system, at least some of the processing cores of the many-core system are loaded with neurons of a neural network, the information processing method includes:
    根据所述神经元的发放信息,动态调度存储资源,以供所述神经元基于调度后的存储资源执行发放处理,和/或,根据所述神经元的发放信息,动态调度计算资源,以供所述神经元基于调度后的计算资源执行计算任务;According to the issuance information of the neuron, storage resources are dynamically scheduled for the neuron to perform the issuance processing based on the scheduled storage resources, and/or according to the issuance information of the neuron, computing resources are dynamically scheduled for use. The neurons perform computing tasks based on scheduled computing resources;
    其中,所述存储资源包括所述众核系统的片上存储空间和/或所述众核系统外的外加存储空间。Wherein, the storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
  2. 根据权利要求1所述的信息处理方法,其中,所述神经元的发放信息包括所述神经元的近期发放活跃度;The information processing method according to claim 1, wherein the firing information of the neuron includes the recent firing activity of the neuron;
    根据所述神经元的发放信息,动态调度存储资源,包括:According to the neuron firing information, dynamically schedule storage resources, including:
    根据所述神经元的近期发放活跃度确定所述神经元的状态变化信息,并基于所述神经元的状态变化信息,动态调度所述众核系统的片上存储空间和/或所述众核系统外的外加存储空间存储神经网络神经元信息;Determine the state change information of the neuron according to the recent firing activity of the neuron, and dynamically schedule the on-chip storage space of the many-core system and/or the many-core system based on the state change information of the neuron. The external storage space stores neural network neuron information;
    其中,所述神经元所处状态包括稀疏神经元或非稀疏神经元,所述神经元的状态变化信息用于表征所述神经元在稀疏神经元和非稀疏神经元之间的变化。Wherein, the state of the neuron includes a sparse neuron or a non-sparse neuron, and the state change information of the neuron is used to characterize the change of the neuron between a sparse neuron and a non-sparse neuron.
  3. 根据权利要求2所述的信息处理方法,其中,所述神经网络神经元信息至少包括所述神经元的权重信息,所述神经网络的稀疏神经元的权重信息存储在所述众核系统外的外加存储空间,所述神经网络的非稀疏神经元的权重信息存储在所述众核系统的片上存储空间,所述根据所述神经元的近期发放活跃度确定所述神经元的状态变化信息,并基于所述神经元的状态变化信息,动态调度所述众核系统的片上存储空间和/或所述众核系统外的外加存储空间存储神经网络神经元信息,包括:The information processing method according to claim 2, wherein the neural network neuron information at least includes weight information of the neurons, and the weight information of the sparse neurons of the neural network is stored outside the many-core system. In addition to storage space, the weight information of the non-sparse neurons of the neural network is stored in the on-chip storage space of the many-core system, and the state change information of the neurons is determined based on the recent firing activity of the neurons, And based on the state change information of the neurons, dynamically schedule the on-chip storage space of the many-core system and/or the additional storage space outside the many-core system to store neural network neuron information, including:
    根据所述神经网络的神经元的近期发放活跃度确定所述神经元当前时刻为稀疏神经元或非稀疏神经元;Determine whether the neuron at the current moment is a sparse neuron or a non-sparse neuron according to the recent firing activity of the neuron of the neural network;
    在所述神经元当前时刻为稀疏神经元,且所述神经元在当前时刻之前时刻为非稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统的片上存储空间转移至所述众核系统外的外加存储空间;When the neuron is a sparse neuron at the current moment, and the neuron was a non-sparse neuron at the moment before the current moment, transfer the weight information of the neuron from the on-chip storage space of the many-core system to additional storage space outside the many-core system;
    在所述神经元当前时刻为非稀疏神经元,且所述神经元在当前时刻之前时刻为稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统外的外加存储空间转移至所述众核系统的片上存储空间。When the neuron is a non-sparse neuron at the current moment, and the neuron was a sparse neuron at the moment before the current moment, the weight information of the neuron is obtained from an external storage space outside the many-core system. transferred to the on-chip storage space of the many-core system.
  4. 根据权利要求3所述的信息处理方法,其中,所述将所述神经元的权重信息从所述众核系统的片上存储空间转移至所述众核系统外的外加存储空间,包括:The information processing method according to claim 3, wherein said transferring the weight information of the neurons from the on-chip storage space of the many-core system to an external storage space outside the many-core system includes:
    将所述神经元的权重信息从所述众核系统的片上存储空间转移至所述众核系统外的外加存储空间,并将所述神经元的权重信息在外加存储空间的地址信息存储在所述众核系统的片上存储空间,以使所述众核系统基于所述地址信息获取所述神经元的权重信息。Transfer the weight information of the neuron from the on-chip storage space of the many-core system to an external storage space outside the many-core system, and store the address information of the weight information of the neuron in the external storage space in the many-core system. The on-chip storage space of the many-core system is used to enable the many-core system to obtain the weight information of the neuron based on the address information.
  5. 根据权利要求3所述的信息处理方法,其中,所述将所述神经元的权重信息从所述众核系统外的外加存储空间转移至所述众核系统的片上存储空间,包括:The information processing method according to claim 3, wherein said transferring the weight information of the neuron from an external storage space outside the many-core system to an on-chip storage space of the many-core system includes:
    将所述神经元的权重信息从所述众核系统外的外加存储空间转移至所述神经元的后继神经元对应的片上存储空间,以使所述后继神经元基于所述神经元的权重信息进行相应处理。Transfer the weight information of the neuron from the external storage space outside the many-core system to the on-chip storage space corresponding to the subsequent neuron of the neuron, so that the subsequent neuron is based on the weight information of the neuron Process accordingly.
  6. 根据权利要求3所述的信息处理方法,其中,所述将所述神经元的权重信息从所述众核系统的片上存储空间转移至所述众核系统外的外加存储空间,包括:The information processing method according to claim 3, wherein said transferring the weight information of the neurons from the on-chip storage space of the many-core system to an external storage space outside the many-core system includes:
    根据所述神经元的权重信息获取所述神经元的权重索引信息以及有效权重信息;Obtain the weight index information and effective weight information of the neuron according to the weight information of the neuron;
    其中,所述神经元的权重信息包括所述神经元与其后继神经元的连接权重值;所述权重索引信息包括至少一个标识信息,所述标识信息与所述神经元的后继神经元之间存在对应关系,用于表示所述后继神经元与所述神经元的连接权重值是否为零;所述有效权重信息包括有效权重值,所述有效权重值为所述神经元与所述后继神经元不为零的连接权重值;Wherein, the weight information of the neuron includes the connection weight value of the neuron and its successor neuron; the weight index information includes at least one identification information, and there is a connection between the identification information and the successor neuron of the neuron. The corresponding relationship is used to indicate whether the connection weight value between the subsequent neuron and the neuron is zero; the effective weight information includes a valid weight value, and the effective weight value is the value between the neuron and the subsequent neuron. A non-zero connection weight value;
    将所述神经元的权重索引信息以及有效权重信息存储在所述众核系统外的外加存储空间。The weight index information and effective weight information of the neuron are stored in an external storage space outside the many-core system.
  7. 根据权利要求3所述的信息处理方法,其中,所述将所述神经元的权重信息从所述众核系统外的外加存储空间转移至所述众核系统的片上存储空间,包括:The information processing method according to claim 3, wherein said transferring the weight information of the neuron from an external storage space outside the many-core system to an on-chip storage space of the many-core system includes:
    根据所述神经元的权重信息获取所述神经元与其后继神经元的连接权重值;Obtain the connection weight value of the neuron and its subsequent neuron according to the weight information of the neuron;
    其中,所述神经元的权重信息包括所述神经元的权重索引信息以及有效权重信息,所述权重索引信息包括至少一个标识信息,所述标识信息与所述神经元的后继神经元之间存在对应关系,用于表示所述后继神经元与所述神经元的连接权重值是否为零;所述有效权重信息包括有效权重值,所 述有效权重值为所述神经元与所述后继神经元不为零的连接权重值;Wherein, the weight information of the neuron includes the weight index information of the neuron and the effective weight information. The weight index information includes at least one identification information, and there is a relationship between the identification information and the subsequent neuron of the neuron. The corresponding relationship is used to indicate whether the connection weight value between the subsequent neuron and the neuron is zero; the effective weight information includes a valid weight value, so The effective weight value is the connection weight value between the neuron and the subsequent neuron that is not zero;
    将所述神经元与至少一个后继神经元的连接权重值存储至对应后继神经元的片上存储空间。The connection weight value between the neuron and at least one subsequent neuron is stored in an on-chip storage space corresponding to the subsequent neuron.
  8. 根据权利要求3所述的信息处理方法,其中,所述神经元的近期发放活跃度包括所述神经元在当前时刻之前的预定时间段的发放频率、所述神经元在当前时刻之前的预定时间段的发放频率的变化量以及所述神经元在当前时刻的活跃度中至少一者。The information processing method according to claim 3, wherein the recent firing activity of the neuron includes the firing frequency of the neuron in a predetermined time period before the current time, the predetermined time of the neuron before the current time. At least one of the change amount of the firing frequency of the segment and the activity of the neuron at the current moment.
  9. 根据权利要求8所述的信息处理方法,其中,所述神经元在当前时刻的活跃度通过所述神经元在前一时刻的活跃度和所述神经元在当前时刻的发放值确定。The information processing method according to claim 8, wherein the activity of the neuron at the current moment is determined by the activity of the neuron at the previous moment and the firing value of the neuron at the current moment.
  10. 根据权利要求3所述的信息处理方法,其中,所述根据所述神经网络的神经元的近期发放活跃度确定所述神经元当前时刻为稀疏神经元或非稀疏神经元,包括:The information processing method according to claim 3, wherein determining whether the neuron is a sparse neuron or a non-sparse neuron at the current moment according to the recent firing activity of the neuron of the neural network includes:
    每隔预定时间根据所述神经网络的神经元的近期发放活跃度确定所述神经元当前时刻为稀疏神经元或非稀疏神经元。Every predetermined time, it is determined whether the neuron of the neural network is a sparse neuron or a non-sparse neuron at the current moment according to the recent firing activity of the neuron of the neural network.
  11. 根据权利要求1所述的信息处理方法,其中,所述存储资源用于存储所述神经元的发放处理所需信息,所述神经元基于调度后的存储资源执行发放处理的过程包括:The information processing method according to claim 1, wherein the storage resource is used to store information required for the release processing of the neuron, and the process of the neuron performing the release processing based on the scheduled storage resources includes:
    在所述神经元满足发放条件的情况下,确定所述神经元的发放处理所需信息的存储位置,基于所述存储位置获取所述发放处理所需信息,并基于所述发放处理所需信息执行所述神经元的发放处理;When the neuron satisfies the firing conditions, determine the storage location of the information required for firing processing of the neuron, obtain the information required for firing processing based on the storage location, and perform the firing processing based on the information required. Perform firing processing of the neuron;
    其中,所述存储位置对应所述众核系统的片上存储空间或者所述众核系统外的外加存储空间。Wherein, the storage location corresponds to the on-chip storage space of the many-core system or an additional storage space outside the many-core system.
  12. 根据权利要求1或者11所述的信息处理方法,其中,所述神经元的发放处理过程包括:The information processing method according to claim 1 or 11, wherein the neuron firing process includes:
    在所述神经元满足发放相关条件的情况下,确定加载所述神经元的处理核中是否存在所述神经元的发放处理所需信息;When the neuron meets the conditions related to firing, determine whether there is information required for firing processing of the neuron in the processing core loaded with the neuron;
    在所述处理核中不存在所述神经元的发放处理所需信息的情况下,从所述众核系统外的外加存储空间获取所述神经元的发放处理所需信息;When the information required for the firing processing of the neuron does not exist in the processing core, obtain the information required for the firing processing of the neuron from an external storage space outside the many-core system;
    将所述发放处理所需信息存储在所述处理核,并执行与所述神经元满足的发放相关条件对应的操作。The information required for the firing process is stored in the processing core, and operations corresponding to firing-related conditions satisfied by the neuron are performed.
  13. 根据权利要求12所述的信息处理方法,其中,所述发放相关条件包括:所述神经元为待发放的源神经元;The information processing method according to claim 12, wherein the firing-related conditions include: the neuron is a source neuron to be fired;
    所述神经元的发放处理所需信息包括:目标神经元所对应的处理核信息;其中,所述目标神经元为接收所述神经元的发放信息的神经元;The information required for the firing processing of the neuron includes: the processing core information corresponding to the target neuron; wherein the target neuron is the neuron that receives the firing information of the neuron;
    所述执行与所述神经元满足的发放相关条件对应的操作包括:将所述神经元的发放信息传输至所述目标神经元对应的处理核。The execution of operations corresponding to the firing-related conditions satisfied by the neuron includes: transmitting the firing information of the neuron to the processing core corresponding to the target neuron.
  14. 根据权利要求12所述的信息处理方法,其中,所述发放相关条件包括:所述神经元为接收到发放信息的目标神经元;The information processing method according to claim 12, wherein the firing-related conditions include: the neuron is a target neuron that receives firing information;
    所述神经元的发放处理所需信息包括:所述神经元与发放信息对应的源神经元的连接权重值;The information required for the firing processing of the neuron includes: the connection weight value of the source neuron corresponding to the neuron and the firing information;
    所述执行与所述神经元满足的发放相关条件对应的操作包括:根据所述连接权重值计算所述神经元的输入电流值。The performing an operation corresponding to the firing-related condition satisfied by the neuron includes: calculating the input current value of the neuron according to the connection weight value.
  15. 根据权利要求12所述的信息处理方法,其中,所述将所述发放处理所需信息存储在所述处理核,包括:The information processing method according to claim 12, wherein the storing the information required for the issuance processing in the processing core includes:
    在存储所述发放处理所需信息所需占用的空间大于所述处理核的空闲存储空间的情况下,删除所述处理核的已占用存储空间的已存入信息,直至所述空闲存储空间大于存储所述发放处理所需信息所需占用的空间,将所述发放处理所需信息存储在所述空闲存储空间。When the space required to store the information required for issuance processing is greater than the free storage space of the processing core, delete the stored information in the occupied storage space of the processing core until the free storage space is greater than The space required to store the information required for the issuance processing is stored in the free storage space.
  16. 根据权利要求15所述的信息处理方法,其中,所述删除所述处理核的已占用存储空间的已存入信息,直至所述空闲存储空间大于存储所述发放处理所需信息所需占用的空间,包括:The information processing method according to claim 15, wherein the deleting the stored information that has occupied the storage space of the processing core until the free storage space is larger than the occupied space required to store the information required for issuance processing. space, including:
    按照所述已存入信息存入所述已占用存储空间的时间从早到晚的顺序,依次删除所述已存入信息,直至所述空闲存储空间大于存储所述发放处理所需信息所需占用的空间。According to the order of the time when the stored information is stored in the occupied storage space from early to late, the stored information is deleted sequentially until the free storage space is larger than that required for storing the information required for the issuance process. occupied space.
  17. 根据权利要求15所述的信息处理方法,其中,所述删除所述处理核的已占用存储空间的已存入信息直至所述空闲存储空间大于存储所述发放处理所需信息所需占用的空间,包括:The information processing method according to claim 15, wherein the deleting the stored information in the occupied storage space of the processing core until the free storage space is larger than the space required to store the information required for the issuance processing ,include:
    按照所述已存入信息最近一次被读取的时间从早到晚的顺序,依次删除所述已存入信息,直至所述空闲存储空间大于存储所述发放处理所需信息所需占用的空间。Delete the stored information in order from earliest to latest time when the stored information was last read, until the free storage space is larger than the space required to store the information required for issuance processing. .
  18. 根据权利要求15所述的信息处理方法,其中,所述删除所述处理核的已占用存储空间的已存入信息,直至所述空闲存储空间大于存储所述发放处理所需信息所需占用的空间,将所述发放处理所需信息存储在所述空闲存储空间,包括: The information processing method according to claim 15, wherein the deleting the stored information that has occupied the storage space of the processing core until the free storage space is larger than the occupied space required to store the information required for the issuance processing. Space to store the information required for the issuance processing in the free storage space, including:
    删除所述处理核的已占用存储空间的已存入数据获取新空闲存储空间,直至所述新空闲存储空间与原空闲存储空间之和大于存储所述发放处理所需信息所需占用的空间;Delete the stored data that has occupied the storage space of the processing core to obtain new free storage space, until the sum of the new free storage space and the original free storage space is greater than the space required to store the information required for the issuance processing;
    在所述新空闲存储空间与所述原空闲存储空间不连续的情况下,将所述发放处理所需信息按顺序先存储在所述原空闲存储空间,再存储在所述新空闲存储空间,且在所述原空闲存储空间存储所述新空闲存储空间的起始地址。In the case where the new free storage space is not continuous with the original free storage space, the information required for issuance processing is first stored in the original free storage space and then in the new free storage space in order, And store the starting address of the new free storage space in the original free storage space.
  19. 根据权利要求12所述的信息处理方法,其中,所述将所述发放处理所需信息存储在所述处理核之后,所述信息处理方法还包括:The information processing method according to claim 12, wherein the information required for the issuance processing is stored after the processing core, and the information processing method further includes:
    将所述发放处理所需信息的索引信息存储在所述处理核,所述发放处理所需信息的索引信息包括所述神经元的标识以及所述发放处理所需信息在所述处理核存储位置的地址信息。The index information of the information required for issuance processing is stored in the processing core, and the index information of the information required for issuance processing includes the identification of the neuron and the storage location of the information required for issuance processing in the processing core. address information.
  20. 根据权利要求19所述的信息处理方法,其中,所述发放处理所需信息的索引信息包括以下至少一项:The information processing method according to claim 19, wherein the index information for issuing information required for processing includes at least one of the following:
    所述发放处理所需信息存入所述处理核的时间;The time when the information required for the issuance processing is stored in the processing core;
    所述发放处理所需信息最近一次被读取的时间。The time when the information required for the issuance process was last read.
  21. 根据权利要求1所述的信息处理方法,其中,至少部分所述神经元构成一个计算节点;The information processing method according to claim 1, wherein at least part of the neurons constitute a computing node;
    根据所述神经元的发放信息,动态调度计算资源,包括:Dynamically schedule computing resources according to the neuron firing information, including:
    针对多个所述计算节点中的至少一个,根据所述计算节点中多个所述神经元的发放信息,确定所述计算节点的计算量;For at least one of the plurality of computing nodes, determine the calculation amount of the computing node according to the firing information of a plurality of the neurons in the computing node;
    在根据多个所述计算节点的计算量确定存在计算量不均衡的情况下,调整至少部分所述计算节点的至少一个神经元的计算任务。If it is determined that there is an imbalance in the calculation amount based on the calculation amounts of a plurality of the calculation nodes, adjusting the calculation tasks of at least one neuron of at least part of the calculation nodes.
  22. 根据权利要求1或21所述的信息处理方法,其中,所述计算资源的调度过程包括:The information processing method according to claim 1 or 21, wherein the scheduling process of the computing resources includes:
    确定多个所述计算节点中各个所述计算节点在预定时间段内的计算量;Determine the calculation amount of each of the plurality of calculation nodes within a predetermined time period;
    在多个所述计算节点之间的计算量不均衡的情况下,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,其中,所述目标计算节点为满足预设条件、且计算量未过载的计算节点。In the case where the calculation amount among multiple computing nodes is unbalanced, the computing task of at least one neuron in the computing node with overloaded computing amount is transferred to the target computing node, wherein the target computing node satisfies the preset Computing nodes that meet certain conditions and are not overloaded with calculations.
  23. 根据权利要求22所述的信息处理方法,其中,在所述确定多个所述计算节点中各个所述计算节点在预定时间段内的计算量之后,所述信息处理方法还包括:The information processing method according to claim 22, wherein after determining the calculation amount of each of the plurality of calculation nodes within a predetermined time period, the information processing method further includes:
    确定所述预定时间段内多个所述计算节点的平均计算量;Determine the average calculation amount of a plurality of the computing nodes within the predetermined time period;
    确定各个所述计算节点在所述预设时间段内的计算量和所述平均计算量之间的差值绝对值,并根据所述差值绝对值与所述平均计算量的比值确定各个所述计算节点的均衡系数;Determine the absolute value of the difference between the calculation amount of each computing node within the preset time period and the average calculation amount, and determine each calculated amount based on the ratio of the absolute value of the difference to the average calculation amount. Calculate the equilibrium coefficient of the node;
    当存在至少一个计算节点的均衡系数大于预设阈值的情况下,确定多个所述计算节点之间的计算量不均衡。When there is a balance coefficient of at least one computing node that is greater than a preset threshold, it is determined that the computing volume among multiple computing nodes is unbalanced.
  24. 根据权利要求23所述的信息处理方法,其中,所述预设阈值取自5至10之间。The information processing method according to claim 23, wherein the preset threshold is taken between 5 and 10.
  25. 根据权利要求23所述的信息处理方法,其中,在确定多个所述计算节点之间的计算量不均衡之后,所述信息处理方法还包括:The information processing method according to claim 23, wherein after determining that the computing load is unbalanced among a plurality of the computing nodes, the information processing method further includes:
    将计算量超过在所述预定时间段内所有计算节点的平均计算量预定倍数的计算节点确定为所述计算量过载的计算节点;Determine a computing node whose computing volume exceeds a predetermined multiple of the average computing volume of all computing nodes within the predetermined time period as a computing node with an overloaded computing volume;
    将计算量未达到在所述预定时间段内所有计算节点的平均计算量的计算节点确定为所述计算量未过载的计算节点。The computing nodes whose computing volume does not reach the average computing volume of all computing nodes within the predetermined time period are determined as computing nodes whose computing volume is not overloaded.
  26. 根据权利要求25所述的信息处理方法,其中,所述预定倍数为5至10倍。The information processing method according to claim 25, wherein the predetermined multiple is 5 to 10 times.
  27. 根据权利要求22至26中任意一项所述的信息处理方法,其中,所述将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,包括:The information processing method according to any one of claims 22 to 26, wherein said transferring the computing task of at least one neuron in a computing node with an overloaded computing load to a target computing node includes:
    随机地从所述计算量过载的计算节点中选择至少一个所述神经元,并将选中的至少一个所述神经元的计算任务转移至所述目标计算节点。Randomly select at least one neuron from the computing node with overloaded calculations, and transfer the computing task of the selected at least one neuron to the target computing node.
  28. 根据权利要求22至26中任意一项所述的信息处理方法,其中,所述将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,包括:The information processing method according to any one of claims 22 to 26, wherein said transferring the computing task of at least one neuron in a computing node with an overloaded computing load to a target computing node includes:
    将所述计算量过载的计算节点中的至少一个任务组移至所述目标计算节点,其中,所述任务组包括多个神经元对应的计算任务。Move at least one task group in the computing node with overloaded calculations to the target computing node, where the task group includes computing tasks corresponding to multiple neurons.
  29. 根据权利要求22至26中任意一项所述的信息处理方法,其中,所述将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点之后,所述信息处理方法还包括:The information processing method according to any one of claims 22 to 26, wherein after transferring the computing task of at least one neuron in the computing node with overloaded computing amount to the target computing node, the information processing method further includes :
    生成任务转移通知,所述任务转移通知携带有所述目标计算节点的地址信息;Generate a task transfer notification, where the task transfer notification carries address information of the target computing node;
    向计算任务被转移至目标计算节点的神经元相关联的计算节点发送所述任务转移通知。 The task transfer notification is sent to the computing node associated with the neuron of the target computing node to which the computing task is transferred.
  30. 根据权利要求29所述的信息处理方法,其中,被转移至目标计算节点的神经元相关联的计算节点包括被转移至目标计算节点的神经元的前继突触所在的计算节点,和/或被转移至目标计算节点的神经元相关联的计算节点包括被转移至目标计算节点的神经元的后继突触所在的计算节点。The information processing method according to claim 29, wherein the computing node associated with the neuron transferred to the target computing node includes a computing node where the predecessor synapse of the neuron transferred to the target computing node is located, and/or The computing node associated with the neuron transferred to the target computing node includes the computing node where the successor synapse of the neuron transferred to the target computing node is located.
  31. 根据权利要求22至26中任意一项所述的信息处理方法,其中,所述将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点之后,所述信息处理方法还包括:The information processing method according to any one of claims 22 to 26, wherein after transferring the computing task of at least one neuron in the computing node with overloaded computing amount to the target computing node, the information processing method further includes :
    将被转移至目标计算节点的计算任务对应的神经元的胞体处理信息、以及后继突触信息发送至所述目标计算节点。The cell body processing information of the neuron corresponding to the computing task transferred to the target computing node and the subsequent synaptic information are sent to the target computing node.
  32. 根据权利要求22至26中任意一项所述的信息处理方法,其中,所述预设条件包括:The information processing method according to any one of claims 22 to 26, wherein the preset conditions include:
    与所述计算量过载的计算节点之间的距离不超过预定数量的计算节点。The distance from the computationally overloaded computing node does not exceed a predetermined number of computing nodes.
  33. 根据权利要求22至26中任意一项所述的信息处理方法,其中,所述信息处理方法周期性地进行计算资源调度,且不同周期内的预定时间段为各自周期内的时间段。The information processing method according to any one of claims 22 to 26, wherein the information processing method periodically performs computing resource scheduling, and the predetermined time periods in different cycles are time periods within the respective cycles.
  34. 根据权利要求22至26中任意一项所述的信息处理方法,其中,所述计算任务包括以下任务中的至少一者:The information processing method according to any one of claims 22 to 26, wherein the computing tasks include at least one of the following tasks:
    图像处理任务、语音处理任务、文本处理任务、当前计算节点对应的神经元所连接的后继突触的权重、延迟、以及后继神经元的编号信息进行收集。Image processing tasks, speech processing tasks, text processing tasks, the weight, delay, and number information of subsequent neurons connected to the neuron corresponding to the current computing node are collected.
  35. 根据权利要求21所述的信息处理方法,其中,所述信息处理方法包括:The information processing method according to claim 21, wherein the information processing method includes:
    确定与当前计算节点连接的突触的突触信息,所述突触信息包括当前计算节点对应的神经元的后继神经元的位置信息、以及当前计算节点对应的神经元的突触权重;Determine the synaptic information of the synapse connected to the current computing node, the synaptic information including the position information of the successor neuron of the neuron corresponding to the current computing node, and the synaptic weight of the neuron corresponding to the current computing node;
    将当前计算节点对应的神经元的突触权重发送至后继神经元对应的计算节点,以供所述后继神经元对应的计算节点进行突触积分计算,Send the synaptic weight of the neuron corresponding to the current computing node to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation,
    其中,在存在任务转移通知的情况下,至少部分所述后继神经元的位置信息由所述任务转移通知所携带。Wherein, when there is a task transfer notification, at least part of the position information of the subsequent neurons is carried by the task transfer notification.
  36. 一种信息处理单元,其中,所述信息处理单元应用于众核系统,所述众核系统的至少部分处理核中加载有神经网络的神经元,所述信息处理单元包括:An information processing unit, wherein the information processing unit is applied to a many-core system, at least some of the processing cores of the many-core system are loaded with neurons of a neural network, the information processing unit includes:
    动态调度子单元,被配置为根据所述神经元的发放信息,动态调度存储资源,以供所述神经元基于调度后的存储资源执行发放处理,和/或,根据所述神经元的发放信息,动态调度计算资源,以供所述神经元基于调度后的计算资源执行计算任务;Dynamic scheduling subunit, configured to dynamically schedule storage resources according to the issuing information of the neuron, so that the neuron can perform issuing processing based on the scheduled storage resources, and/or, according to the issuing information of the neuron , dynamically schedule computing resources for the neurons to perform computing tasks based on the scheduled computing resources;
    其中,所述存储资源包括所述众核系统的片上存储空间和/或所述众核系统外的外加存储空间。Wherein, the storage resources include on-chip storage space of the many-core system and/or additional storage space outside the many-core system.
  37. 根据权利要求36所述的信息处理单元,其中,所述神经网络的稀疏神经元的权重信息存储在所述众核系统外的外加存储空间,所述神经网络的非稀疏神经元的权重信息存储在所述众核系统的片上存储空间,所述动态调度子单元包括:神经网络神经元信息存储装置;The information processing unit according to claim 36, wherein the weight information of the sparse neurons of the neural network is stored in an additional storage space outside the many-core system, and the weight information of the non-sparse neurons of the neural network is stored In the on-chip storage space of the many-core system, the dynamic scheduling subunit includes: a neural network neuron information storage device;
    所述神经网络神经元信息存储装置,包括:The neural network neuron information storage device includes:
    判断模块,被配置为根据所述神经网络的神经元的近期发放活跃度确定所述神经元当前时刻为稀疏神经元或非稀疏神经元;A judgment module configured to determine whether the neuron of the neural network is a sparse neuron or a non-sparse neuron at the current moment based on the recent firing activity of the neuron of the neural network;
    第一执行模块,被配置为在所述神经元当前时刻为稀疏神经元,且所述神经元在当前时刻之前时刻为非稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统的片上存储空间转移至所述众核系统外的外加存储空间;The first execution module is configured to convert the weight information of the neuron from the neuron when the neuron is a sparse neuron at the current moment and the neuron is a non-sparse neuron at the moment before the current moment. Transferring the on-chip storage space of the many-core system to an additional storage space outside the many-core system;
    第二执行模块,被配置为在所述神经元当前时刻为非稀疏神经元,且所述神经元在当前时刻之前时刻为稀疏神经元的情况下,将所述神经元的权重信息从所述众核系统外的外加存储空间转移至所述众核系统的片上存储空间。The second execution module is configured to, when the neuron is a non-sparse neuron at the current moment, and the neuron was a sparse neuron at the moment before the current moment, convert the weight information of the neuron from the The additional storage space outside the many-core system is transferred to the on-chip storage space of the many-core system.
  38. 根据权利要求36所述的信息处理单元,其中,所述动态调度子单元包括:神经网络神经元信息处理装置;The information processing unit according to claim 36, wherein the dynamic scheduling subunit includes: a neural network neuron information processing device;
    所述神经网络神经元信息处理装置,包括:The neural network neuron information processing device includes:
    判断模块,被配置为在神经元满足发放相关条件的情况下,确定所述处理核中是否存在所述神经元的发放处理所需信息,所述神经元为加载于所述处理核的神经元中的任一个;A judgment module configured to determine whether there is information required for the firing processing of the neuron in the processing core when the neuron meets the firing-related conditions, and the neuron is a neuron loaded in the processing core. any of;
    获取模块,被配置为在所述处理核中不存在所述神经元的发放处理所需信息的情况下,从所述众核系统外的外加存储空间获取所述神经元的发放处理所需信息;An acquisition module configured to obtain the information required for the firing processing of the neuron from an external storage space outside the many-core system when the information required for the firing processing of the neuron does not exist in the processing core. ;
    执行模块,被配置为将所述发放处理所需信息存储在所述处理核,并执行与所述神经元满足的发放相关条件对应的操作。An execution module is configured to store the information required for the firing process in the processing core, and perform operations corresponding to firing-related conditions satisfied by the neuron.
  39. 根据权利要求36所述的信息处理单元,其中,所述动态调度子单元包括:计算资源的调度装置; The information processing unit according to claim 36, wherein the dynamic scheduling subunit includes: a scheduling device for computing resources;
    所述计算资源的调度装置,包括:The computing resource scheduling device includes:
    计算量确定模块,被配置为确定多个计算节点中各个所述计算节点在预定时间段内的计算量;A calculation amount determination module configured to determine the calculation amount of each of the plurality of computing nodes within a predetermined time period;
    任务转移模块,被配置为在多个所述计算节点之间的计算量不均衡的情况下,将计算量过载的计算节点中至少一个神经元的计算任务转移至目标计算节点,其中,所述目标计算节点为满足预设条件、且计算量过载的计算节点。A task transfer module configured to transfer the computing task of at least one neuron in the computing node with an overloaded computing load to the target computing node when the computing load among the plurality of computing nodes is unbalanced, wherein, the The target computing node is a computing node that meets the preset conditions and is overloaded with calculations.
  40. 根据权利要求36所述的信息处理单元,其中,所述动态调度子单元包括:数据处理装置;The information processing unit according to claim 36, wherein the dynamic scheduling subunit includes: a data processing device;
    所述数据处理装置,包括:The data processing device includes:
    关联突触信息确定模块,被配置为确定与当前数据处理装置连接的突触的突触信息,所述突触信息包括当前数据处理装置对应的神经元的后继神经元的位置信息、以及当前数据处理装置对应的神经元的突触权重;The associated synapse information determination module is configured to determine the synapse information of the synapse connected to the current data processing device, the synapse information includes the position information of the successor neuron of the neuron corresponding to the current data processing device, and the current data The synaptic weight of the neuron corresponding to the processing device;
    发送模块,被配置为将当前数据处理装置对应的神经元的突触权重发送至后继神经元对应的计算节点,以供所述后继神经元对应的计算节点进行突触积分计算,其中,在存在任务转移通知的情况下,至少部分所述后继神经元的位置信息由所述任务转移通知所携带。The sending module is configured to send the synaptic weight of the neuron corresponding to the current data processing device to the computing node corresponding to the subsequent neuron, so that the computing node corresponding to the subsequent neuron can perform synaptic integral calculation, wherein, when there is In the case of a task transfer notification, at least part of the position information of the subsequent neurons is carried by the task transfer notification.
  41. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至35中任一所述的信息处理方法。An electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, any one of claims 1 to 35 is implemented The information processing method described.
  42. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1至35中任一所述的信息处理方法。A computer-readable storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the information processing method as described in any one of claims 1 to 35 is implemented.
  43. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,其中,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现权利要求1-35中的任一项所述的信息处理方法。 A computer program product comprising computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, wherein when the computer readable code is executed in a processor of an electronic device, the The processor in the electronic device executes the information processing method described in any one of claims 1-35.
PCT/CN2023/090799 2022-04-29 2023-04-26 Information processing method and information processing unit, and device, medium and product WO2023208027A1 (en)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN202210476435.8 2022-04-29
CN202210475019.6A CN114861895A (en) 2022-04-29 2022-04-29 Neural network neuron information storage method and device, many-core system and medium
CN202210476435.8A CN114861896A (en) 2022-04-29 2022-04-29 Neural network neuron information processing method and device, many-core system and medium
CN202210475019.6 2022-04-29
CN202210467443.6A CN114816755A (en) 2022-04-29 2022-04-29 Scheduling method, scheduling device, processing core, electronic device and readable medium
CN202210467443.6 2022-04-29

Publications (1)

Publication Number Publication Date
WO2023208027A1 true WO2023208027A1 (en) 2023-11-02

Family

ID=88517819

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/090799 WO2023208027A1 (en) 2022-04-29 2023-04-26 Information processing method and information processing unit, and device, medium and product

Country Status (1)

Country Link
WO (1) WO2023208027A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795226A (en) * 2020-01-03 2020-02-14 中科寒武纪科技股份有限公司 Method for processing task using computer system, electronic device and storage medium
CN111199275A (en) * 2018-11-20 2020-05-26 上海登临科技有限公司 System on chip for neural networks
CN113673688A (en) * 2021-08-24 2021-11-19 北京灵汐科技有限公司 Weight generation method, data processing method and device, electronic device and medium
US20220019545A1 (en) * 2020-07-17 2022-01-20 The Regents Of The University Of Michigan Hybrid On/Off-Chip Memory Architecture For Graph Analytics
CN114064561A (en) * 2021-11-17 2022-02-18 北京灵汐科技有限公司 Data processing method, device, chip and medium
CN114816755A (en) * 2022-04-29 2022-07-29 北京灵汐科技有限公司 Scheduling method, scheduling device, processing core, electronic device and readable medium
CN114861896A (en) * 2022-04-29 2022-08-05 北京灵汐科技有限公司 Neural network neuron information processing method and device, many-core system and medium
CN114861895A (en) * 2022-04-29 2022-08-05 北京灵汐科技有限公司 Neural network neuron information storage method and device, many-core system and medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199275A (en) * 2018-11-20 2020-05-26 上海登临科技有限公司 System on chip for neural networks
CN110795226A (en) * 2020-01-03 2020-02-14 中科寒武纪科技股份有限公司 Method for processing task using computer system, electronic device and storage medium
US20220019545A1 (en) * 2020-07-17 2022-01-20 The Regents Of The University Of Michigan Hybrid On/Off-Chip Memory Architecture For Graph Analytics
CN113673688A (en) * 2021-08-24 2021-11-19 北京灵汐科技有限公司 Weight generation method, data processing method and device, electronic device and medium
CN114064561A (en) * 2021-11-17 2022-02-18 北京灵汐科技有限公司 Data processing method, device, chip and medium
CN114816755A (en) * 2022-04-29 2022-07-29 北京灵汐科技有限公司 Scheduling method, scheduling device, processing core, electronic device and readable medium
CN114861896A (en) * 2022-04-29 2022-08-05 北京灵汐科技有限公司 Neural network neuron information processing method and device, many-core system and medium
CN114861895A (en) * 2022-04-29 2022-08-05 北京灵汐科技有限公司 Neural network neuron information storage method and device, many-core system and medium

Similar Documents

Publication Publication Date Title
CN109885397B (en) Delay optimization load task migration algorithm in edge computing environment
JP2017050001A (en) System and method for use in efficient neural network deployment
CN109167671A (en) A kind of adapted communication system equally loaded dispatching algorithm towards quantum key distribution business
Xie et al. Pandas: robust locality-aware scheduling with stochastic delay optimality
WO2019134197A1 (en) Method and system for selecting minimum load router based on naive bayes classifier
WO2022171066A1 (en) Task allocation method and apparatus based on internet-of-things device, and network training method and apparatus
CN109656713B (en) Container scheduling method based on edge computing framework
CN116360972A (en) Resource management method, device and resource management platform
CN112379985B (en) Computing task allocation method and device in cloud edge computing environment
CN115629865B (en) Deep learning inference task scheduling method based on edge calculation
CN112667400A (en) Edge cloud resource scheduling method, device and system managed and controlled by edge autonomous center
CN115714820A (en) Distributed micro-service scheduling optimization method
CN117155942A (en) Micro-service dynamic self-adaptive client load balancing method and system
CN111158893B (en) Task unloading method, system, equipment and medium applied to fog computing network
WO2023208027A1 (en) Information processing method and information processing unit, and device, medium and product
CN116954866A (en) Edge cloud task scheduling method and system based on deep reinforcement learning
CN114693141B (en) Transformer substation inspection method based on end edge cooperation
Yuan et al. A DRL-Based Container Placement Scheme with Auxiliary Tasks.
CN115484205B (en) Deterministic network routing and queue scheduling method and device
WO2023188437A1 (en) Control device, control method, and program
CN111245906B (en) Service request distribution method
CN114816755A (en) Scheduling method, scheduling device, processing core, electronic device and readable medium
CN114625493A (en) Kubernetes cluster resource scheduling method based on improved intelligent longicorn stigma method
Kargahi et al. Utility accrual dynamic routing in real-time parallel systems
CN113254172A (en) Task scheduling method and device

Legal Events

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

Ref document number: 23795459

Country of ref document: EP

Kind code of ref document: A1