Neural network device, method, and system comprising said device
By introducing configurable memory mapping units and memory interface modules into neural network devices, the problem of different memory requirements for different applications is solved, efficient memory management suitable for any application is achieved, and silicon occupancy and cost are reduced.
Patent Information
- Application Number
- CN202280085938.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2021-11-30
- Filing Date
- 2022-11-30
- Publication Date
- 2024-10-29
AI Technical Summary
Due to different memory requirements when processing different applications, existing neural network devices require a large amount of integrated circuit surface area, resulting in irregular VLSI layout and inefficiency. Multi-port SRAM is also costly and difficult to apply to any application.
Design a neural network device, including a physical memory, a data processor core, a configurable memory mapping unit and a memory interface module. The configurable memory mapping unit maps logical memory addresses to multiple independently accessible physical memory groups. The configuration module is configured according to The application configures the memory mapping unit and the memory interface module coordinates memory accesses to avoid conflicts and optimize memory usage.
This enables a neural network device suitable for any application, reducing uncertainty in memory requirements, avoiding memory access conflicts, increasing memory usage efficiency, and reducing silicon footprint.
Smart Images

Figure CN118871897A_ABST
Abstract
Description
Background Art
[0001] The present disclosure relates to a neural network device.
[0002] The present disclosure also relates to a neural network system including a neural network device.
[0003] The present disclosure also relates to a neural network method. Background Art
[0005] A neural network device is designed to perform computations in a manner comparable to the operation of biological neural networks (e.g., as found in the brain). A neural network device simulates neurons as neural network device elements interconnected by a message transmission network. A neural network device element that has reached an excitation state transmits an output message to a neural network device element connected to it, in a manner similar to the manner in which a biological neuron transmits a spike via its axon to the synapse of a receiving biological neuron. In practice, a corresponding set of neural network device elements share a corresponding computation and control module that is responsible for executing the computations and logical steps to be performed by the neural network device element. For example, the neural network device is provided as a plurality of processor cores, each processor core having a corresponding memory unit having a corresponding storage location for storing the state of the corresponding neural network device element. The neural network device is typically organized into a plurality of neural network device layers, wherein each neural network device layer includes a plurality of neural network device elements. The corresponding states of the plurality of neural network device elements of a neural network device layer together define a feature graph.
[0006] The processor core of a neural network device requires storage space for mutually different purposes. Examples are an event queue for queuing event messages to be exchanged between neural network device elements, a state memory for storing respective states of neural network device elements, a weight (synapse) memory for storing weight values indicating weights assigned by a device element to event messages received from another device element or from itself, and a connectivity memory for specifying connections between neural network device elements. In addition, storage space may be required to store a delay value indicating a predetermined delay for transmitting an event message.
[0007] By providing these storage spaces in the corresponding physical memory, the memory access time can be minimized so that memory accesses for mutually different purposes can be performed independently. Thus, it should be taken into account that mutually different processing applications may involve significantly different memory requirements. For example, one application may require a larger physical memory to store an event queue, while another application may require a larger physical memory to store connectivity data.
[0008] More specifically, in a large neural network device, some processor cores support (small) parts of a single network layer, while other processor cores may support multiple (small) layers. Furthermore, in lower index layers (at the front end of the graph), a lot of storage space may be required to store neuron states. In some higher index layers, a lot of storage space may be required to store network parameters that specify connectivity, and network parameters are, for example, connection weights. As another example, some processor cores may need a lot of storage space to queue incoming events and avoid overflow. Thus, the amount of storage space required depends on the structure of the network and the nature of the application.
[0009] In order to make the data processor device suitable for any application, a large amount of storage space needs to be able to be used for each purpose. This in turn requires a large surface area in the integrated circuit. In addition, various physical memories of different sizes usually cause VLSI layout irregularities and are therefore inefficient. The resulting layout may contain a large amount of so-called empty spaces. Alternatively, the access time can be adjusted by providing various storage spaces in a shared multi-port memory. However, the area cost of each bit of multi-port SRAM is much higher than the area cost of each bit of single-port SRAM. Summary of the invention
[0010] One object of the present disclosure is to provide a neural network device that is suitable for arbitrary applications while having modest memory requirements.
[0011] Another object of the present disclosure is to provide a neural network method that is applicable to arbitrary applications while having modest memory requirements.
[0012] According to the present disclosure, a neural network device is claimed herein, comprising a physical memory, a data processor core, a configurable memory mapping unit, a configuration module, and a memory interface module.
[0013] The physical memory includes a plurality of independently accessible memory groups. The data processor core is configured to execute instructions of an instruction set. One or more of these instructions involve a plurality of memory access operations that specify corresponding memory addresses in corresponding logical memories within the physical memory. The instruction may, for example, specify an operation to update a state value of a neural network element in response to an event message. The operation requires access to: a first storage location, in which weights to be used to weight the event message are stored; and a second storage location, from which a current state is read and an updated state is written to the second storage location. The first storage location is part of a first logical memory storing weight data, and the second storage location is part of a second logical memory storing state data.
[0014] The claimed neural network device also includes a configurable memory mapping unit for mapping a logical memory address to a physical address. The physical address includes an indication of a memory bank of a plurality of memory banks and a row address within the indicated memory bank.
[0015] The claimed neural network device further comprises a configuration module for configuring a configurable memory mapping unit for a particular application. In the configuration, corresponding logical memories are allocated corresponding segments of physical memory. The configuration of the configurable memory mapping unit is maintained during runtime (i.e., during the execution of the application). In one example, the allocation of the physical memory segments is completely controlled by an operator. In another example, the allocation is performed automatically based on a description of the application to be executed. In yet another example, the allocation is performed semi-automatically.
[0016] As an example, in an application where a processor core is used to implement (a) a lower index layer (at the input side of a neural network), a large portion of the available physical storage space may be configured for storing neuron states. Typically, the memory capacity required for neuron states at (a) a higher index layer (at the output side of a neural network) is more modest. Typically, for the higher index layers, a relatively large amount of available storage space may be configured for connectivity data (i.e., data specifying which processor device elements are connected to each other). In another example, the configuration module configures the configurable memory mapping unit to configure a relatively large segment of physical memory as logical memory for queuing incoming events.
[0017] The neural network device claimed for protection also includes a memory interface module to facilitate memory access operations on mutually different logical memories configured in the physical memory. The memory interface module receives a memory access request for writing data to a corresponding segment and / or reading data from a corresponding segment to the corresponding logical memory, and coordinates access to the corresponding allocated segment in the physical memory.
[0018] There may be various options for the manner in which the configurable memory mapping unit is able to allocate the corresponding segments of the physical memory to the corresponding logical memory. According to one option, the configurable memory mapping unit is able to allocate the corresponding set of groups of the physical memory to the corresponding logical memory. In the configuration phase, the configuration module configures the configurable memory mapping unit for a specific application by allocating an appropriate number of groups to each corresponding logical memory. During the execution of the application, i.e., during operation, the memory interface module causes the memory access operation for the corresponding logical memory according to the corresponding set of groups allocated in the configuration phase. Due to the fact that different logical memories are allocated different sets of groups, possible conflicts between memory access operations associated with different logical memories are completely avoided. However, the same logical memory "port" can access different sets of physical memory groups according to the application. During execution, the memory interface module provides appropriate routing of memory access operations to the physical memory groups allocated in the configuration phase.
[0019] According to another option, the configurable memory mapping unit is capable of allocating corresponding address ranges within the group to corresponding logical memories. In the configuration phase, the configuration module configures the configurable memory mapping unit for a specific application by allocating corresponding address ranges to each logical memory. During the execution of the application, that is, during operation, the memory interface module promotes memory access operations for the corresponding logical memories according to the corresponding address ranges allocated in the configuration phase. If the memory access operation requests access to mutually different logical memories sharing the same group, a potential access conflict may occur. In order to address this situation, the memory interface module includes an arbitration module for serializing such concurrent group (load / store) access requests. In one embodiment, a corresponding buffer is provided for each memory group to temporarily buffer pending memory access requests. In one example, the arbitration module is configured to prioritize load (memory read) requests and buffer storage (write) requests when such requests occur simultaneously. This allows the data processor core to directly receive the data indicated by the load request and also directly write the data contained in the storage request. It should be noted that mutually different logical memories can share a group set. Although access conflicts may still occur due to concurrent memory access requests, the probability of this occurring can be greatly reduced as long as the number of groups is significantly larger than the number of logical memories.
[0020] According to another option, a hybrid physical memory partition is provided, wherein mutually different sets of logical memories share mutually different sets of groups. For example, a first logical memory and a second logical memory share a first set of one or more groups, and a third logical memory and a fourth logical memory share a second set of one or more groups.
[0021] In some embodiments, the memory banks of the physical memory are single port memory cells. Although multi-port memory cells will also work, using single port memory cells can achieve a reduced silicon footprint.
[0022] In some embodiments, memory groups are identical memory cells to each other. This helps simplify the memory control structure.
[0023] In one embodiment, even more efficient use of physical memory is achieved where the data processor core is configured to execute a series of consecutive instructions in which data words located consecutively in logical memory are accessed. In embodiments where the data processor core is configured to execute instructions that load or store multiple data words in parallel using a single logical memory address, further improvements are achieved.
[0024] The present disclosure also provides an improved neural network system, which includes a plurality of neural network devices as described above, and also includes a message exchange network having a corresponding network node for each neural network device and a network link connecting the network nodes. The message exchange network enables the neural network devices to exchange messages. In this way, by mapping corresponding segments of the neural network to corresponding neural network devices, a neural network can be implemented at any scale. Thus, each neural network device can be appropriately configured for the segment of the neural network mapped thereto.
[0025] The present disclosure also provides an improved neural network processing method, which includes a configuration phase and an execution phase.
[0026] In the configuration phase, the physical memory of the neural network processing device is configured by allocating corresponding segments of the physical memory to corresponding logical memories. This operation includes configuring a memory mapping unit to map corresponding logical memory addresses to corresponding physical addresses in a shared physical memory having a plurality of independently accessible memory groups according to the configuration.
[0027] In the execution phase, the data processor core of the neural network processing device executes at least one instruction, and the at least one instruction involves a plurality of memory access operations that specify a corresponding memory address in a corresponding logical memory. Then, the configured memory mapping unit maps the corresponding memory address in the corresponding logical memory to a corresponding physical memory address. The corresponding physical memory address includes the name of a memory group in the physical memory and an address in the memory group. As described above, the allocated segment can be one or more group sets, address ranges within a group, or a combination of both.
[0028] Advantageously, the layout of data in the logical memory is such that typically (but not necessarily always) the load and store operations of P consecutive instructions involve data words located consecutively in the corresponding logical memory. The data processor core is configured to execute instructions in which data words located consecutively in the logical memory are accessed in a single memory cycle. It should be noted that the phrase "accessed in a single memory cycle" should be understood to mean in a throughput sense, not in a latency sense. That is, the data processor core accesses each of the consecutive logical memory addresses in a single cycle, but it may be the case that additional cycles are involved between initiating a read access and the read data being available for further processing.
[0029] In one embodiment, the memory mapping unit can be configured to allow P words to be loaded and stored in parallel using a single address. This allows the processor core to execute instructions that specify a single logical memory address. When executing the instruction, the memory mapping unit converts the logical address into the name of a range of P groups, and the memory interface module accesses the groups within the range in parallel to load a corresponding one of the P words from each of these groups. Similarly, it can access these groups in parallel to store a corresponding one of the P words in each of these groups. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] These and other aspects are described in more detail with reference to the accompanying drawings, in which:
[0031] Figure 1 Schematically illustrates a neural network device according to an embodiment of the present disclosure;
[0032] Figure 2 Shown in more detail Figure 1 Part of the embodiment of the invention;
[0033] Figure 3 Shows Figure 1 A first variation of the components of the embodiment;
[0034] Figure 4 Shows Figure 1 A second variation of the components of the embodiment;
[0035] Figure 5 Shows Figure 1 A third variation of the components of the embodiment;
[0036] Figure 6 A neural network method according to an embodiment of the present disclosure is shown;
[0037] Figure 7 A neural network system according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0038] Figure 1 A neural network device 1 is schematically shown, which includes a physical memory 2, a data processor core 3, a configurable memory mapping unit 4, a configuration module 5 and a memory interface module 6.
[0039] like Figure 2 As shown in more detail, the physical memory 2 has a plurality of M independently accessible memory banks. Figure 2 In the illustrative example shown, the plurality M is equal to 4, and four independently accessible memory banks are in Figure 2 In the figure, they are represented as 2a, 2b, 2c, and 2d.
[0040] The data processor core 3 is configured to execute instructions of an instruction set. One or more instructions involve multiple memory access operations that specify corresponding logical memory addresses in corresponding logical memories within the physical memory 2. The instruction set may include additional instructions, such as instructions that do not require memory access or instructions that only request access to a single logical memory. Figure 2 In the example shown, the data processor core 3 executes an instruction that specifies three logical memory addresses Ai, Aj, Ak in corresponding logical memories within the physical memory 2. The access request may be a load operation requesting to read data Di, Dj, Dk from a physical address corresponding to the specified logical memory address Ai, Aj, Ak, or a storage operation requesting to write data Di, Dj, Dk to a physical address corresponding to the specified logical memory address Ai, Aj, Ak. Further, the access request may be a read-modify-write operation requesting to read data from a physical address corresponding to the specified logical memory address and write it back to the same physical address after the data is modified by the operation executed by the data processor core 3. Although in this example, the data processor core 3 executes an instruction that specifies three logical memory addresses, other examples can be envisioned in which the instruction specifies a smaller or larger number of logical memory addresses.
[0041] The configurable memory mapping unit 4 maps a logical memory address A to a physical address. The physical address comprises an indication of a memory bank B among a plurality of memory banks and a row address R within the indicated memory bank.
[0042] During the configuration phase, configuration module 5 determines the specific configuration of the configurable memory mapping unit for a specific application, and maintains this configuration during operation when the application is executed by neural network device 1. As described above, configuration module 5 may operate automatically, may be operated by a user providing the application, or may operate semi-automatically.
[0043] Depending on how the physical memory is configured, the memory interface module 6 causes memory access operations to be performed on mutually different logical memories configured in the physical memory.
[0044] exist Figure 2 In the illustrated embodiment, the configurable memory mapping unit 4 includes corresponding mapping components 4i, 4j, 4k for each logical memory. It should be noted that the instructions executed by the processor core 3 do not have to access each logical memory. In the illustrated example, the first mapping component 4i in the mapping components maps the logical memory address Ai to a physical address defined by a memory group Bi in a plurality of memory groups and a row address Ri within the memory group Bi. Similarly, the second mapping component 4j in the mapping components maps the logical memory address Aj to a physical address defined by a memory group Bj in a plurality of memory groups and a row address Rj within the memory group Bj. Similarly, the third mapping component 4k in the mapping components maps the logical memory address Ak to a physical address defined by a memory group Bk in a plurality of memory groups and a row address Rk within the memory group Bk.
[0045] Then, the memory interface module 6 routes the memory access request to the corresponding physical memory group. In one example, memory groups 2a and 2b are both assigned to the first logical memory in the logical memory, and memory groups 2c and 2d are respectively assigned to the second logical memory and the third logical memory in the logical memory. In this example, the memory group Bi to which the first logical address Ai is mapped is one of groups 2a and 2b, and the memory groups Bj and Bk to which the second logical address Aj and the third logical address Ak are mapped are groups 2c and 2d, respectively. The allocation of memory groups to logical memories depends on the configuration. To this end, the memory interface module 6 includes a routing unit 61 to provide a method for routing the physical memory access request specified by group B and row address R to a specified group.
[0046] In this example, the configurable memory mapping unit 4 is capable of allocating the corresponding set of groups to the corresponding logical memories and providing the allocation accordingly. That is, groups 2a, 2b are exclusively allocated to the first logical memory, and groups 2c, 2d are exclusively allocated to the second logical memory and the third logical memory. Thus, access requests to mutually different logical memories will never conflict because they need to access the same memory group. As a precautionary measure, the routing unit 61 can be configured to verify whether each physical memory access request from the memory mapping unit 4 complies with the configuration defined by the configuration module 5, and issue a runtime error when non-compliance is detected.
[0047] Figure 3A component 4q of the configurable memory mapping unit 4 is shown in more detail, said component specifically enabling the allocation of a respective set of banks to a respective logical memory.
[0048] The logical memory address Aq of the logical memory q is mapped to the row Rq of the bank Bq of the physical memory 2. The blocks 42q and 43q calculate the number of banks as follows:
[0049] Bq=Aq mod MNq+OBq
[0050] The groups allocated to the logical memory q by the configuration module 5 are OBq, ..., OBq+MNq-1
[0051] Block 41q calculates the row address Rq as follows:
[0052]
[0053] In the example presented above, the values of OBq and MNq for logical memories i, j and k are:
[0054] OBi=1,MNi=2
[0055] OBj=3,MNj=1
[0056] OBj=4,MNj=1
[0057] In another example, the neural network device may configure the memory mapping unit 4 to allocate corresponding address ranges within the group to corresponding logical memories. Figure 4 A component 4q of the configurable memory mapping unit 4 is shown in more detail, which component specifically enables the allocation of respective address ranges within a group to respective logical memories.
[0058] In this case, blocks 42q and 43q calculate the group number Bq as follows:
[0059] Bq=(Aq+Oq)mod M,
[0060] The row addresses within a group of size Bq are calculated as follows:
[0061]
[0062] Where M is the number of groups ( Figure 2 4) in the example, and Oq is the offset specified for each logical memory. The offset Oq should be selected during configuration so that for each q>1: q+1 >Aq+Oq. According to this requirement, the logical memory has an appropriate, non-overlapping available address range in the physical memory.
[0063] During operation, the memory interface module 6 causes the corresponding logical memory to perform memory access operations on the corresponding allocated address range. Although the address ranges of the logical memories allocated to the physical memory do not overlap each other, access conflicts may occur, that is, two or more logical memory access operations need to access the same memory group in the same time slot associated with the execution of an instruction with multiple memory access operations. One option to solve this problem is to execute the instructions in multiple clock cycles, wherein the separate access operations are executed in sequence. The execution of such instructions in multiple clock cycles can be scheduled statically or dynamically. In the case of static scheduling, the instructions are always scheduled to be executed in a fixed number of clock cycles. The fixed number is the number of memory access operations sufficient to serialize all potential conflicts. For example, if the instruction needs to access 5 logical memories that may need to access the same memory group, the instruction is statically scheduled to be executed in 5 clock cycles. In the case of dynamic scheduling, it is dynamically determined how many clock cycles are needed to serialize the memory access operations that actually conflict. If all memory access requests point to different groups, the instructions can be executed in a single clock cycle. If the number of available groups is high, the probability of conflict will be low.
[0064] exist Figure 2 In the illustrated embodiment, the memory interface module 6 comprises an arbitration module 62, 63a, ..., 63d. The arbitration module comprises a priority designation component 62, which assigns a priority, which indicates the execution order of access requests to the same memory group. In the illustrated embodiment, the memory interface module 6 also comprises a corresponding buffer 63a, ..., 63d for each memory group 2a, ..., 2d. Non-conflicting memory access requests or memory access requests with the highest priority are executed immediately. Memory access requests with lower priority are buffered in the buffer of the memory group to which access is requested. It is sufficient for the arbitration module 6 to dynamically schedule the execution of conflicting access requests in any order. Thus, all requests can be processed correctly. In one embodiment, in the case where a storage operation occurs simultaneously with a load operation requesting access to the same group, the memory interface module (6) assigns a lower priority to the storage operation. In this case, it buffers the storage operation. Thus, the load operation in the instruction can be executed immediately, so that the requested data is quickly retrieved from the memory group. In addition, the execution process of the instruction does not need to be delayed by the buffered storage operation, because the storage operation can be completed later during the execution of other instructions.
[0065] As described above, the configuration module allocates appropriate physical memory segments for each logical memory according to the application to be executed. However, as a precaution, the memory mapping unit 4 or the memory interface module 6 can verify during operation whether the access request complies with the allocation of the configuration module, and issue an error message if it does not comply.
[0066] refer to Figure 3 and Figure 4 , two methods are described for flexibly configuring the physical memory of a neural network device (1) as a shared storage space for multiple logical memories.
[0067] According to reference Figure 3 The first method is to allocate corresponding groups (sets) of physical memory to corresponding logical memory. The advantage of this method is that access conflicts are completely avoided. As long as a large enough number of memory groups are available, the physical memory can be partitioned in fine granularity. Figure 2 In the example of , only four groups are available, allowing a very rough configuration in which only one logical memory can be allocated two groups instead of one, it is conceivable to increase the number of memory groups so that a wider range of possibilities is available for partitioning the physical memory.
[0068] According to reference Figure 4 In the second method described, the memory mapping unit can be configured so that corresponding address ranges within a group can be allocated to corresponding logical memories. The advantage of this second method is that even if the number of memory groups is relatively small, even if only one group is available, the partitioning of the physical memory into segments allocated to the logical memory can be achieved in a very fine-grained manner. In this second method, additional measures need to be taken to avoid memory access conflicts. Examples of these measures are: static scheduling of memory access operations in instructions, dynamic scheduling of memory access operations in instructions, buffering of memory access operations, and prioritizing memory access operations (advantageously by prioritizing load operations over store operations).
[0069] In addition to these approaches, a hybrid approach can be used in which physical memory is partitioned both by memory groups and by address ranges within memory groups. Figure 5 Give a description.
[0070] In this case, blocks 42q, 43q and 44q calculate the group number Bq as follows:
[0071] Bq=(Aq+Oq)mod MNq+OBq,
[0072] For blocks 41q and 44q, the row addresses within a group of number Bq are calculated as follows:
[0073]
[0074] exist Figure 2 In a possible configuration of the example having 3 logical memories and a physical memory 2 having four groups 2a, ..., 2d, the first logical memory is allocated the first two memory groups of the physical memory, and the other two logical memories share the remaining two memories.
[0075] This can be achieved by selecting the following configuration parameters Oq, MNq and OBq:
[0076] Logical memory Oq Mn OB 1 1 2 1 2 1 2 3 3 O3 2 3
[0077] Here, O3 is an offset that determines which bank in the last two memory groups is reserved for the third logical memory.
[0078] An advantage of the hybrid embodiment is that a wide range of configuration options are available, while memory access conflicts for specific logical memories can be completely avoided.
[0079] Figure 6 The neural network processing method is schematically shown.
[0080] In step S1 of the method, a physical memory 2 is configured by allocating corresponding segments of the physical memory to corresponding logical memories. In some examples, the segments are corresponding sets of one or more memory groups allocated to each logical memory. Alternatively, the segments are corresponding address ranges allocated to each logical memory. As another example, a hybrid approach is used, in which, for example, a subset of the memory groups of the physical memory is allocated to two or more logical memories, each of which uses an appropriate address range within each memory group of the subset. Similarly, other logical memories can share another subset of the memory groups, that is, each of the other logical memories is allowed to use an appropriate address range for each memory group in another subset. Alternatively, it may be the case that the other logical memories are each allocated an appropriate memory group.
[0081] In step S2, the memory mapping unit 4 is configured to map the corresponding logical memory address to the corresponding physical address in, for example, the shared physical memory 2 having a plurality of independently accessible memory groups 2a, ..., 2d. That is, the memory mapping unit 4 is configured to convert the logical memory address into a physical address in the shared physical memory according to the configuration determined in step S1.
[0082] After completing the configuration steps S1 , S2 for a specific application, the application is executed.
[0083] In step S3, the data processor core 3 executes at least one instruction, the instruction involving a plurality of memory access operations specifying corresponding memory addresses in corresponding logical memories. Typically, the data processor core executes a sequence of instructions selected from an instruction set. The instruction set may also contain instructions that do not require access to logical memories, or instructions that only require access to a single logical memory.
[0084] In step S4, the memory mapping unit 4 configured in step S2 maps a corresponding memory address specified in at least one instruction to a corresponding physical memory address, wherein the physical memory address includes a name of a memory group in the physical memory and an address in the memory group.
[0085] Examples are Figure 3 , Figure 4 and Figure 5 It should be noted that if Figure 5 The configuration unit 5 shown does not necessarily always configure the memory mapping unit 4 in a mixed manner. For some applications, for example, the configuration unit 5 may be configured in a mixed manner. Figure 3 The memory mapping unit 4 is configured in the same manner as in the example of FIG. 1 , that is, by allocating corresponding one or more group sets to each logical memory. Alternatively, for other applications, for example, the memory mapping unit 4 may be configured in the same manner as in FIG. Figure 4 The memory mapping unit 4 is configured in the same manner as in the example of FIG. 1 , namely by allocating a corresponding address range of a group to each logical memory.
[0086] The neural network device 1 may be as follows Figure 7 A portion of a neural network system 100 is shown. The neural network system 100 shown therein includes, in addition to the neural network device 1, a plurality of other neural network devices 1a, ..., 1o, and a message exchange network 7, the message exchange network comprising a respective network node 71 for each neural network device and a network link 72 connecting the network nodes 71. The message exchange network 7 enables the neural network devices 1, 1a, ..., 1o to exchange messages. An example of such a message is an event message indicating that a neural network element of the neural network device has "triggered". The message serves as input to one or more addressed neural network elements of the receiving neural network device in the network. Event messages directed to neural network elements of the same neural network device may be processed by the neural network device, thereby bypassing the message exchange network 7. Alternatively, processing these messages may involve the message exchange network 7, for example using facilities provided by the message exchange network 7, such as buffering and controllable delays. Other message exchange network architectures may also be considered, including corresponding clustering of neural network devices. It is also conceivable to have a message exchange network architecture in which the neural network devices are clustered in layers, in which each neural network device except the last neural network device may send messages to the neural network devices in the next layer in sequence.
[0087] It should be noted that a component or module may include a dedicated circuit or logic that is permanently configured (e.g., as a dedicated processor) to perform certain operations. A component or module may also include a programmable logic or circuit that is temporarily configured by software to perform certain operations (e.g., as a programmable logic or circuit included in a general-purpose processor or other programmable processor). Therefore, the term "component" or "module" should be understood to cover a tangible entity, an entity that is physically constructed, permanently configured (e.g., hardwired) or temporarily configured (e.g., programmed) to operate in a certain manner and / or perform certain operations described herein. Considering embodiments in which a component or module is temporarily configured (e.g., programmed), each of the components or modules does not need to be configured or instantiated at any one time. For example, in the case where a component or module includes a general-purpose processor configured using software, the general-purpose processor can be configured as correspondingly different components or modules at different times. Software can configure the processor accordingly, for example, to constitute a specific component or module at one time, and to constitute different components or modules at different times.
[0088] The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used herein, the singular forms "one", "an" and "described" are also intended to include plural forms, unless the context clearly states otherwise. It should also be understood that when used in this specification, the term "includes" specifies the existence of stated features, integers, steps, operations, elements and / or parts, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, parts and / or their groups. In addition, unless otherwise clearly stated, "or" refers to inclusive "or" rather than exclusive "or". For example, any of the following satisfies condition A or B: A is true (or exists) and B is false (or does not exist), A is false (or does not exist) and B is true (or exists), and A and B are both true (or exist).
Claims
1. A neural network device (1), include: - a shared physical memory (2), the shared physical memory having a plurality (M) of independently accessible memory groups (2a, 2b, 2c, 2d); a data processor core (3) configured to execute instructions, the instructions including at least one instruction involving a plurality of memory access operations, the plurality of memory access operations specifying respective logical memory addresses (Ai, Aj, Ak) in respective logical memories within the shared physical memory (2), the at least one instruction specifying an operation to update a state value of a neural network element in response to an event message, the operation requiring access to a first memory location in which a weight to be used to weight the event message is stored, and a second memory location, wherein the first memory location stores a weight to be used to weight the event message, the current state value of the neural network element is read from the second memory location, and the updated state value is written to the second memory location, the first memory location being part of a first logical memory storing weight data, and the second memory location being part of a second logical memory storing state data; a configurable memory mapping unit (4) for mapping a logical memory address (A) to a physical address, the physical address comprising an indication of a memory bank (B) of the plurality of memory banks and a row address (R) within the indicated memory bank; - a configuration module (5) for configuring the configurable memory mapping unit (4) for a specific application and maintaining the configuration during operation; - a memory interface module (6) for causing memory access operations to mutually different logical memories arranged in the shared physical memory.
2. The neural network device according to claim 1, wherein the configurable memory mapping unit enables allocation of corresponding group sets to corresponding logical memories, and wherein the memory interface module (6) causes memory access operations to the corresponding logical memories according to the corresponding allocated group sets.
3. The neural network device of claim 1 , wherein the configurable memory mapping unit enables allocation of corresponding address ranges within a group to corresponding logical memories, and wherein the memory interface module (6) causes memory access operations of the corresponding logical memories to the corresponding allocated address ranges, wherein the memory interface module includes an arbitration module (62) for serializing concurrent group (load / store) access requests.
4. The neural network device according to claim 3, wherein the configurable memory mapping unit enables allocation of corresponding bank sets to corresponding logical memory sets, and wherein the memory interface module (6) causes memory access operations to mutually different logical memory sets according to the corresponding allocated bank sets.
5. The neural network device of claim 1, wherein the memory groups (2a, 2b, 2c, 2d) are single-port memory cells.
6. The neural network device according to claim 1 or 2, wherein the memory groups (2a, 2b, 2c, 2d) are identical memory units.
7. A neural network device according to claim 1, 2 or 3, further comprising a respective buffer (63a, 63b, 63c, 63d) for each memory group (2a, 2b, 2c, 2d).
8. The neural network device according to claim 3 or 4, wherein in case of concurrent group access requests for a load operation and a store operation, the arbitration module (6) prioritizes the load operation and buffers the store operation.
9. The neural network device according to one of the preceding claims, wherein the data processor core (3) is configured to execute instructions in which data words located consecutively in a logic memory are accessed in a single memory cycle.
10. A neural network device according to any one of the preceding claims, wherein the data processor core (3) is configured to execute instructions for loading or storing multiple data words in parallel using a single logical memory address.
11. A neural network system (100) comprising a plurality of neural network devices (1) as claimed in any one of claims 1 to 10, and further comprising a message exchange network (7), the message exchange network having a corresponding network node (71) for each neural network device and a network link (72) connecting the network nodes (71).
12. A neural network processing method, include: - configuring (S1) the shared physical memory by allocating corresponding segments of the shared physical memory to corresponding logical memories; - configuring (S2) a memory mapping unit (4) to map corresponding logical memory addresses to corresponding physical addresses in the shared physical memory having a plurality of independently accessible memory groups; - wherein the data processor core executes (S3) at least one instruction, the at least one instruction involving a plurality of memory access operations specifying respective memory addresses in respective logical memories; - wherein the configured memory mapping unit maps (S4) the respective memory addresses in the respective logical memories to corresponding physical memory addresses, the physical memory addresses comprising the names of the memory groups in the shared physical memory and the addresses in the memory groups.
13. The method of claim 12 , wherein the configuring comprises assigning corresponding sets of groups to corresponding logical memories, and mapping each logical memory address of the corresponding memory addresses to a corresponding physical memory address when executing instructions, the physical memory address comprising a name of a memory group assigned to the addressed logical memory and an address in the memory group.
14. The method of claim 12 , wherein the configuring comprises assigning corresponding address ranges of the group to corresponding logical memories, and mapping each logical memory address of the corresponding memory addresses to a corresponding physical memory address when executing instructions, the physical memory address comprising a name of the memory group and an address in the memory group within the address range assigned to the associated logical memory.
15. The method of claim 12 , wherein the configuring comprises assigning a corresponding set of groups to a corresponding logical memory, and mapping each logical memory address of the corresponding memory address to a corresponding physical memory address when executing an instruction, the physical memory address comprising a name of the memory group selected from the assigned set of groups and an address in a designated memory group within an address range assigned to the associated logical memory.
