Neural Network Weight Distribution from a Grid of Memory Elements

The implementation of a stall-free weight distribution network-on-chip with advanced buffering techniques addresses memory bandwidth limitations in neural inference chips, ensuring efficient and timely delivery of neural network weights, thereby improving performance and energy efficiency.

JP7549430B2Active Publication Date: 2024-09-11INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022560217
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-04-07
Filing Date
2021-01-28
Publication Date
2024-09-11
Estimated Expiration
2041-01-28

AI Technical Summary

Technical Problem

Existing neural inference chips face challenges in efficiently distributing neural network weights and parameters to computational cores due to limitations in memory bandwidth and congestion in the network-on-chip (NoC), leading to performance bottlenecks and stalls in neural network evaluations.

Method used

A stall-free weight distribution network-on-chip is implemented using a grid of memory elements with advanced scheduling and buffering techniques, including one-dimensional and two-dimensional memory arrays with horizontal, vertical, and layover buffers, ensuring consistent and efficient delivery of instructions and data to neural cores.

Benefits of technology

The solution provides a stable and high-bandwidth weight distribution mechanism that eliminates stalls, allowing for efficient and timely delivery of neural network weights to computational cores, enhancing the performance and energy efficiency of neural inference chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007549430000017
    Figure 0007549430000017
  • Figure 0007549430000042
    Figure 0007549430000042
  • Figure 0007549430000009
    Figure 0007549430000009
Patent Text Reader

Abstract

A neural inference chip for calculating neural activity values ​​is provided. In various embodiments, the neural inference chip includes at least one neural core, a memory array, an instruction buffer, and an instruction memory. The instruction buffer has a location corresponding to each of a plurality of elements of the memory array. The instruction memory provides at least one instruction to the instruction buffer. When the memory of at least one of the plurality of elements contains data associated with at least one instruction, the instruction buffer provides the at least one instruction from its associated location in the instruction buffer to at least one of the plurality of elements of the memory array. Each element of the memory array provides a data block from its memory to its horizontal buffer in response to arrival of the associated instruction from the instruction buffer. The horizontal buffer of each element of the memory array provides the data block to a horizontal buffer of another element of the memory array or to at least one neural core.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] TECHNICAL FIELD Embodiments of the present disclosure relate to neural network processing, and more particularly, to neural network weight distribution from a grid of memory elements. Summary of the Invention

[0002] According to an embodiment of the present disclosure, a neural inference chip for calculating neural activity values ​​is provided. In various embodiments, the neural inference chip includes at least one neural core, a memory array, an instruction buffer, and an instruction memory. The memory array is operatively coupled to the at least one neural core and includes a plurality of elements, each including a memory and a horizontal buffer, and the horizontal buffer of each element of the memory array communicates with either a horizontal buffer of another element of the memory array or the at least one neural core. The instruction buffer communicates with the memory array and has a location corresponding to each of the plurality of elements of the memory array. The instruction memory communicates with the instruction buffer. The instruction memory is adapted to provide at least one instruction to the instruction buffer. The instruction buffer is adapted to advance the at least one instruction between locations in the instruction buffer. The instruction buffer is adapted to provide at least one instruction to at least one element of the plurality of elements of the memory array from its associated location in the instruction buffer when the memory of at least one element of the plurality of elements includes data associated with the at least one instruction. Each of the plurality of elements of the memory array is adapted to provide a block of data from its memory to its horizontal buffer in response to arrival of an associated instruction from the instruction buffer, and the horizontal buffer of each element of the memory array is adapted to provide the block of data to a horizontal buffer of another element of the memory array or to at least one neural core.

[0003] Preferably, the invention provides a neural inference chip wherein the instruction buffer is adapted to advance instructions between locations in the instruction buffer at a rate of one location per cycle, and wherein the horizontal buffer of each element of the memory array is adapted to provide blocks of data to a horizontal buffer of another element of the memory array or to at least one neural core at a rate of one data block per cycle.

[0004] Preferably, the present invention provides a neural inference chip including an array of neural cores including at least one neural core and having a plurality of rows.

[0005] Preferably, the present invention provides a neural inference chip, wherein the memory array is one-dimensional, with multiple elements of the memory array arranged in a row and multiple columns.

[0006] Preferably, the present invention provides a neural inference chip, wherein the memory array is two-dimensional, with elements of the memory array arranged in rows and columns.

[0007] Preferably, the present invention provides a neural inference chip, wherein each element of the memory array further comprises a vertical buffer, the vertical buffer of each element of the memory array in communication with a vertical buffer of another element of the memory array.

[0008] Preferably, the invention provides a neural inference chip, wherein each of a plurality of elements of a memory array is adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from an instruction buffer, each of the plurality of elements of the memory array is adapted to provide a block of data from its vertical buffer to its horizontal buffer, and the vertical buffer of each element of the memory array is adapted to provide a block of data to the vertical buffer of another element of the memory array.

[0009] Preferably, the invention provides a neural inference chip, wherein a horizontal buffer of each element of the memory array is adapted to provide data blocks to a horizontal buffer of another element of the memory array or to at least one neural core at a rate of one data block per cycle, and a vertical buffer of each element of the memory array is adapted to provide data blocks to a vertical buffer of another element of the memory array at a rate of one data block per cycle.

[0010] Preferably, the present invention provides a neural inference chip, wherein each element of the memory array further includes a layover buffer, the layover buffer of each element of the memory array in communication with the horizontal buffer and vertical buffer of that element of the memory array.

[0011] Preferably, the present invention provides a neural inference chip, wherein each of a plurality of elements of a memory array is adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from an instruction buffer, each of the plurality of elements of the memory array is adapted to provide a block of data from its vertical buffer to its layover buffer, each of the plurality of elements of the memory array is adapted to provide a block of data from its layover buffer to its horizontal buffer, and the vertical buffer of each element of the memory array is adapted to provide a block of data to the vertical buffer of another element of the memory array.

[0012] Preferably, the invention provides a neural inference chip, wherein a horizontal buffer of each element of the memory array is adapted to provide data blocks to a horizontal buffer of another element of the memory array or to at least one neural core at a rate of one data block per cycle, a vertical buffer of each element of the memory array is adapted to provide data blocks to a vertical buffer of another element of the memory array at a rate of one data block per cycle, and a layover buffer of each element of the memory array is adapted to provide data blocks to the horizontal buffer of that element of the memory array at a rate of one data block per cycle.

[0013] Preferably, the present invention provides a neural inference chip in which the instruction memory is adapted to provide a plurality of instructions per cycle to an instruction buffer, each location of the instruction buffer being adapted to store a plurality of instructions, and the instruction buffer being adapted to advance the plurality of instructions between locations in the instruction buffer per cycle.

[0014] According to an embodiment of the present disclosure, a neural inference chip for calculating neural activity values ​​is provided. In various embodiments, the neural inference chip includes at least one neural core, a memory array, a plurality of instruction buffers, and a plurality of instruction memories. The memory array is operatively coupled to the at least one neural core, and the memory array includes a plurality of elements, each including a memory, a horizontal buffer, and a vertical buffer, the horizontal buffer of each element of the memory array communicating with either a horizontal buffer of another element of the memory array or the at least one neural core, and the vertical buffer of each element of the memory array communicating with a vertical buffer of another element of the memory array. The plurality of instruction buffers communicate with the memory array, each of the plurality of instruction buffers having a location corresponding to one of the plurality of elements of the memory array. Each of the plurality of instruction memories communicates with one of the plurality of instruction buffers. Each instruction memory is adapted to provide at least one instruction to its instruction buffer. Each instruction buffer is adapted to advance at least one instruction between locations within its instruction buffer. Each instruction buffer is adapted to provide at least one instruction from its associated location in its instruction buffer to at least one element of the plurality of elements of the memory array when the memory of at least one element of the plurality of elements includes data associated with at least one instruction. Each of the plurality of elements of the memory array is adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from the instruction buffer. Each of the plurality of elements of the memory array is adapted to provide a block of data from its vertical buffer to its horizontal buffer. The vertical buffer of each element of the memory array is adapted to provide the block of data to a vertical buffer of another element of the memory array. The horizontal buffer of each element of the memory array is adapted to provide the block of data to a horizontal buffer of another element of the memory array or to at least one neural core.

[0015] According to an embodiment of the present disclosure, a method and computer program product for calculating neural activity values ​​is provided. At least one instruction is provided from an instruction memory to an instruction buffer. The at least one instruction is advanced between locations in the instruction buffer. The at least one instruction is provided from the instruction buffer to at least one element of the plurality of elements of a memory array when at least one instruction of the plurality of elements includes data associated with the at least one instruction. The memory array includes a plurality of elements, each including a memory and a horizontal buffer, and the horizontal buffer of each element of the memory array communicates with either a horizontal buffer of another element of the memory array or at least one neural core. In response to the arrival of the at least one instruction from the instruction buffer, a data block is provided from the memory to at least one horizontal buffer of the plurality of elements. The data block is provided from the at least one horizontal buffer of the plurality of elements to a horizontal buffer of another element of the memory array or at least one neural core.

[0016] Preferably, the invention provides a neural inference chip wherein each instruction buffer is adapted to advance instructions between positions therein at a rate of one position per cycle, and wherein the horizontal buffer of each element of the memory array is adapted to provide blocks of data to at least one neural core or a horizontal buffer of another said element of the memory array at a rate of one data block per cycle.

[0017] Preferably, the present invention provides a neural inference chip including an array of neural cores including at least one neural core and having a plurality of rows.

[0018] Preferably, the present invention provides a neural inference chip, wherein the memory array is two-dimensional, and the elements of the memory array are arranged in a number of rows and a number of columns.

[0019] Preferably, the present invention provides a neural inference chip, wherein each element of the memory array further comprises a vertical buffer, the vertical buffer of each element of the memory array in communication with a vertical buffer of another element of the memory array.

[0020] Preferably, the invention provides a neural inference chip, wherein each of a plurality of elements of a memory array is adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from an instruction buffer, each of the plurality of elements of the memory array is adapted to provide a block of data from its vertical buffer to its horizontal buffer, and the vertical buffer of each element of the memory array is adapted to provide a block of data to the vertical buffer of another element of the memory array.

[0021] Preferably, the invention provides a neural inference chip, wherein a horizontal buffer of each element of the memory array is adapted to provide data blocks to a horizontal buffer of another element of the memory array or to at least one neural core at a rate of one data block per cycle, and a vertical buffer of each element of the memory array is adapted to provide data blocks to a vertical buffer of another element of the memory array at a rate of one data block per cycle.

[0022] Preferably, the present invention provides a neural inference chip, wherein each element of the memory array further includes a layover buffer, the layover buffer of each element of the memory array in communication with the horizontal buffer and the vertical buffer of that element of the memory array.

[0023] Preferably, the present invention provides a neural inference chip, wherein each of a plurality of elements of a memory array is adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from an instruction buffer, each of the plurality of elements of the memory array is adapted to provide a block of data from its vertical buffer to its layover buffer, each of the plurality of elements of the memory array is adapted to provide a block of data from its layover buffer to its water buffer, and the vertical buffer of each element of the memory array is adapted to provide a block of data to the vertical buffer of another element of the memory array.

[0024] Preferably, the invention provides a neural inference chip, wherein a horizontal buffer of each element of the memory array is adapted to provide data blocks to a horizontal buffer of another element of the memory array or to at least one neural core at a rate of one data block per cycle, a vertical buffer of each element of the memory array is adapted to provide data blocks to a vertical buffer of another element of the memory array at a rate of one data block per cycle, and a layover buffer of each element of the memory array is adapted to provide data blocks to the horizontal buffer of that element of the memory array at a rate of one data block per cycle.

[0025] Preferably, the present invention provides a neural inference chip in which the instruction memory is adapted to provide a plurality of instructions per cycle to an instruction buffer, each location of the instruction buffer being adapted to store a plurality of instructions, and the instruction buffer being adapted to advance the plurality of instructions between locations in the instruction buffer per cycle.

[0026] Viewed from another aspect, the present invention includes providing at least one instruction from an instruction memory to an instruction buffer; advancing the at least one instruction between locations in the instruction buffer; and providing the at least one instruction from the instruction buffer to at least one element of a plurality of elements of a memory array when the memory of at least one element of the plurality of elements includes data associated with the at least one instruction, the memory array including a plurality of elements each including a memory and a horizontal buffer, the horizontal buffer of each element of the memory array in communication with either a horizontal buffer of another element of the memory array or the at least one neural core; and further providing, in response to arrival of the at least one instruction from the instruction buffer, a block of data from the memory to the at least one horizontal buffer of the plurality of elements and providing the block of data from the at least one horizontal buffer of the plurality of elements to the horizontal buffer of another element of the memory array or the at least one neural core. [Brief description of the drawings]

[0027] [Figure 1] 1 illustrates a neural core according to an embodiment of the present disclosure. [Diagram 2] 1 illustrates an exemplary inference processing unit (IPU) according to an embodiment of the present disclosure. [Diagram 3] 1 illustrates a multi-core inference processing unit (IPU) according to an embodiment of the present disclosure. [Figure 4] 1 illustrates a neural core and associated network according to an embodiment of the present disclosure. [Diagram 5] FIG. 1 is a schematic diagram of data distribution from a global memory array according to an embodiment of the present disclosure. [Figure 6] 1 illustrates an exemplary memory controller using a linearly weighted memory array, according to an embodiment of the present disclosure. [Figure 7] 7 illustrates a memory distribution method using the controller of FIG. 6 according to an embodiment of the present disclosure. [Figure 8]1 illustrates an exemplary memory controller using a two-dimensional weighted memory array, according to an embodiment of the present disclosure. [Figure 9] 9 illustrates a memory distribution method using the controller of FIG. 8 according to an embodiment of the present disclosure. [Figure 10] 1 illustrates an exemplary memory controller using a two-dimensional weight memory array and a layover buffer, according to an embodiment of the present disclosure. [Figure 11] 1 includes an exemplary configuration including multiple memory controllers using a two-dimensional weighted memory array, according to an embodiment of the present disclosure. [Figure 12A] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12B] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12C] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12D] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12E] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12F] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12G] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12H] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 12I] 1 illustrates distribution of instructions and sequential data using a linear weighted memory array according to an embodiment of the present disclosure. [Figure 13A]1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13B] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13C] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13D] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13E] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13F] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13G] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13H] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 13I] 1 illustrates distribution of instructions and randomly accessed data using a linearly weighted memory array according to an embodiment of the present disclosure. [Figure 14A] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14B] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14C] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14D] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14E] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14F] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14G] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14H] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14I] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14J] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14K] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14L] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 14M] 1 illustrates distribution of instructions and sequential data using a two-dimensional weight memory array according to an embodiment of the present disclosure. [Figure 15A] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15B] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15C] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15D] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15E] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15F] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15G] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15H] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15I] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15J] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15K] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15L] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 15M] 1 illustrates distribution of instructions and randomly accessed data using a two-dimensional weighted memory array according to an embodiment of the present disclosure. [Figure 16A] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16B] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16C] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16D]1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16E] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16F] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16G] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16H] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16I] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16J] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 16K] 1 illustrates distribution of instructions and data using a two-dimensional weight memory array and layover buffers according to an embodiment of the present disclosure. [Figure 17] 1 illustrates a method for calculating neural activity values ​​according to an embodiment of the present disclosure. [Figure 18] 1 illustrates a computing node according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] An artificial neuron is a mathematical function whose output is a nonlinear function of a linear combination of its inputs. Two neurons are connected if the output of one is an input to the other. A weight is a scalar value that encodes the strength of the connection between the output of one neuron and the input of another neuron.

[0029] A neuron calculates an output, called an activation value, by applying a nonlinear activation function to a weighted sum of its inputs. A weighted sum is an intermediate result calculated by multiplying each input by its corresponding weight and accumulating the products. A partial sum is a weighted sum of a subset of the inputs. The weighted sum of all inputs can be calculated incrementally by accumulating one or more partial sums.

[0030] A neural network is a collection of one or more neurons. Neural networks are often divided into groups of neurons called layers. A layer is a collection of one or more neurons that all receive inputs from the same layer, all send outputs to the same layer, and typically perform a similar function. An input layer is a layer that receives inputs from sources outside the neural network. An output layer is a layer that sends outputs to targets outside the neural network. All other layers are intermediate processing layers. A multilayer neural network is a neural network with more than one layer. A deep neural network is a multilayer neural network with many layers.

[0031] A tensor is a multidimensional array of numbers. A tensor block is a contiguous subarray of the elements of a tensor.

[0032] Each neural network layer is associated with a parameter tensor V, a weight tensor W, an input data tensor X, an output data tensor Y, and an intermediate data tensor Z. The parameter tensor contains all of the parameters that control the activation function σ of the neurons in the layer. The weight tensor contains all of the weights that connect the inputs to the layer. The input data tensor contains all of the data that the layer consumes as input. The output data tensor contains all of the data that the layer computes as output. The intermediate data tensor contains any data that the layer generates as intermediate computations, such as partial sums.

[0033] The data tensors for a layer (input, output, and intermediate) can be three-dimensional, with the first two dimensions interpreted as encoding spatial locations and the third dimension interpreted as encoding different features. For example, when a data tensor represents a color image, the first two dimensions encode the vertical and horizontal coordinates in the image, and the third dimension encodes the color at each location. Because every element of the input data tensor X can be connected to every neuron by a separate weight, the weight tensor W generally has six dimensions, concatenating the three dimensions of the input data tensor (input row a, input column b, input feature c) and the three dimensions of the output data tensor (output row i, output column j, output feature k). The intermediate data tensor Z has the same shape as the output data tensor Y. The parameter tensor V concatenates the three output data tensor dimensions with an additional dimension o that indexes the parameters of the activation function σ. In some embodiments, the activation function σ does not require any additional parameters, in which case no additional dimensions are required. However, in some embodiments, the activation function σ requires at least one additional parameter that appears in dimension o.

[0034] The elements of the output data tensor Y of a layer can be calculated as in Equation 1, where the neuron activation function σ consists of a vector of activation function parameters V[i,j,k,:], and the weighted sum Z[i,j,k] can be calculated as in Equation 2.

number

number

[0035] For simplicity of notation, we can refer to the weighted sum in Equation 2 as the output, which is equivalent to using a linear activation function Y[i,j,k] = σ(Z[i,j,k]) = Z[i,j,k], with the understanding that the same description applies without loss of generality when different activation functions are used.

[0036] In various embodiments, the computation of the output data tensors as described above is decomposed into smaller problems, each of which can then be solved in parallel on one or more neural cores, or on one or more cores of a conventional multi-core system.

[0037] It will be understood from the above that neural networks are parallel structures. Neurons in a given layer receive elements x from one or more layers or other inputs. i Each neuron receives an input X with the input and an element w i The neural network computes its state y∈Y based on weights W with the weights b having the same magnitude as the inputs. In various embodiments, the weighted sum of the inputs is scaled by a bias b, and the result is then passed to the nonlinear F(·). For example, the activation value of a single neuron can be calculated as y=F(b+Σx i w i ) can be expressed as

[0038] Since all neurons in a given layer receive input from the same layer and calculate their output independently, neuron activations can be calculated in parallel. This aspect of the neural network as a whole accelerates the overall computation by performing the computations in parallel distributed cores. Furthermore, vector operations can be calculated in parallel within each core. Even in the case of a recurrent input, for example when a layer projects back to itself, all neurons are still updated simultaneously. In effect, the recurrent connections are delayed to match subsequent inputs to the layer.

[0039] Referring now to FIG. 1, a neural core according to an embodiment of the present disclosure is shown. The neural core 100 is a tileable computational unit that computes one block of output tensors. The neural core 100 has M inputs and N outputs. In various embodiments, M=N. To compute the output tensor block, the neural core multiplies an M×1 input data tensor block 101 by an M×N weight tensor block 102 and accumulates the products into a weighted sum that is stored in a 1×N intermediate tensor block 103. The O×N parameter tensor block contains O parameters that specify each of the N neuron activation functions that are applied to the intermediate tensor blocks 103, producing a 1×N output tensor block 105.

[0040] Multiple neural cores can be tiled into a neural core array, hi some embodiments, the array is two-dimensional.

[0041] A neural network model is a set of constants that collectively specify the entire set of computations performed by a neural network, including the graph of connections between neurons, as well as the weight and activation function parameters for every neuron. Training is the process of modifying a neural network model to perform a desired function. Inference is the process of applying a neural network to inputs to produce outputs, without modifying the neural network model.

[0042] An inference processing unit is a category of processor that performs neural network inference. A neural inference chip is a specific physical instance of an inference processing unit.

[0043] Referring now to FIG. 2, an exemplary inference processing unit (IPU) according to an embodiment of the present disclosure is shown. The IPU 200 includes a memory 201 for a neural network model. As mentioned above, the neural network model may include synaptic weights for the neural network to be computed. The IPU 200 includes an activity memory 202, which may be temporary. The activity memory 202 may be divided into an input domain and an output domain, and stores neuron activity values ​​for processing. The IPU 200 includes a neural computation unit 203 that loads the neural network model from the model memory 201. Input activity values ​​are provided from the activity memory 202 prior to each computation step. Output from the neural computation unit 203 is written back to the activity memory 202 for processing in the same or another neural computation unit.

[0044] In various embodiments, a micro-engine 204 is included in the IPU 200. In such embodiments, all operations within the IPU are directed by the micro-engine. As described below, in various embodiments, a central micro-engine or distributed micro-engines or both may be provided. A global micro-engine may be referred to as a chip micro-engine, while a local micro-engine may be referred to as a core micro-engine or local controller. In various embodiments, a micro-engine includes one or more micro-engines, microcontrollers, state machines, CPUs, or other controllers.

[0045] Referring to FIG. 3, a multi-core inference processing unit (IPU) according to an embodiment of the present disclosure is shown. The IPU 300 includes a memory 301 for neural network models and instructions. In some embodiments, the memory 301 is divided into a weight portion 311 and an instruction portion 312. As mentioned above, the neural network model may include synaptic weights for the neural network to be calculated. The IPU 300 includes an activity value memory 302, which may be temporary. The activity value memory 302 may be divided into an input domain and an output domain, and stores neuron activity values ​​for processing.

[0046] The IPU 300 includes an array 306 of neural cores 303. Each core 303 includes a computation unit 333 that operates to load a neural network model from the model memory 301 and perform vector computations. Each core also includes a local activity memory 332. Input activity values ​​are provided from the local activity memory 332 prior to each computation step. Output from the computation unit 333 is written back to the activity memory 332 for processing in the same or another computation unit.

[0047] The IPU 300 includes one or more networks on chip (NoC) 305. In some embodiments, a partial sum NoC 351 interconnects the cores 303 and transmits partial sums between them. In some embodiments, a separate parameter distribution NoC 352 connects the cores 303 to memory 301 for distributing weights and instructions to the cores 303. It will be appreciated that various configurations of NoCs 351 and 352 are suitable for use with the present disclosure. For example, a broadcast network, a row broadcast network, a tree network, and a switching network may be used.

[0048] In various embodiments, a global micro-engine 304 is included in the IPU 300. In various embodiments, a local core controller 334 is included in each core 303. In such embodiments, the global micro-engine (chip micro-engine) and the local core controller (core micro-engine) cooperate to support operations. Specifically, at 361, computation instructions are loaded from the instruction portion 312 of the model memory 301 to the core controller 334 on each core 303 by the global micro-engine 304. At 362, parameters (e.g., neural network / synaptic weights) are loaded from the weight portion 311 of the model memory 301 to the neural computation unit 333 on each core 303 by the global micro-engine 304. At 363, neural network activity data is loaded from the local activity memory 332 to the neural computation unit 333 on each core 303 by the local core controller 334. As mentioned above, activation values ​​are provided to the neurons of a particular neural network defined by the model, and may come from the same or another neural computation unit, or may come from outside the system. At 364, the neural computation unit 333 performs a calculation when instructed by the local core controller 334 to generate activation values ​​for the output neurons. Specifically, the calculation includes applying input synaptic weights to the input activity values. It will be appreciated that various methods are available for performing such calculations, including in silico dendrites, as well as vector multiplication units. At 365, the results of the calculation are stored in the local activity memory 332 when instructed by the local core controller 334. As mentioned above, these stages may be pipelined, resulting in efficient use of the neural computation units on each core. It will also be appreciated that inputs and outputs may be transferred from the local activity memory 332 to the global activity memory 302 depending on the requirements of a given neural network.

[0049] Thus, the present disclosure provides run-time control of operations in an inference processing unit (IPU). In some embodiments, the micro-engine is centralized (a single micro-engine). In some embodiments, the IPU computations are distributed (performed by an array of cores). In some embodiments, the run-time control of operations is hierarchical, involving both central and distributed micro-engines.

[0050] A single or multiple micro-engines direct the execution of all operations in the IPU. Each micro-engine instruction corresponds to several sub-operations (e.g., address generation, load, calculation, store, etc.). Core microcode executes on the core micro-engines (e.g., 334). For local computation, the core microcode contains instructions to perform a complete single tensor operation, such as a convolution between a weight tensor and a data tensor. For distributed computation, the core microcode contains instructions to perform a single tensor operation on a subset (and partial sums) of the locally stored data tensors. Chip microcode executes on the chip micro-engines (e.g., 304). The microcode contains instructions to perform all of the tensor operations in the neural network.

[0051] Referring now to Figure 4, an exemplary neural core and associated networks are illustrated according to an embodiment of the present disclosure. Core 401, which may be embodied as described with reference to Figure 1, is interconnected with additional cores by networks 402...404. In this embodiment, network 402 is responsible for distributing weights and / or instructions, network 403 is responsible for distributing partial sums, and network 404 is responsible for distributing activation values. However, it will be appreciated that in various embodiments of the present disclosure, these networks may be combined or further separated into multiple additional networks.

[0052] Input activation values ​​(X) are distributed from off-core to core 401 via activation network 404 and into activation memory 405. Layer instructions are distributed from off-core to core 401 via weight / instruction network 402 and into instruction memory 406. Layer weights (W) and / or parameters are distributed from off-core to core 401 via weight / instruction network 402 and into weight memory 407 and / or parameter memory 408.

[0053] The weight matrix (W) is read from the weight memory 407 by a vector matrix multiply (VMM) unit 409. The activity vector (V) is read from the activity memory 405 by the vector matrix multiply (VMM) unit 409. The vector matrix multiply (VMM) unit 409 then performs a vector-matrix multiplication Z=X T 403. The vector-vector unit 410 computes W and provides the result to the vector-vector unit 410. The vector-vector unit 410 reads additional partial sums from the partial sum memory 411 and receives additional partial sums from off-core via the partial sum network 403. The vector-vector unit 410 computes vector-vector operations from these source partial sums. For example, various partial sums may be summed in sequence. The resulting target partial sums may be written to the partial sum memory 411, sent off-core via the partial sum network 403, or fed back for further processing by the vector-vector unit 410, or a combination thereof.

[0054] After all calculations for a given layer's inputs are completed, the partial sum results from the Vector-Vector Unit 410 are provided to the Activation Unit 412 for calculation of the output activation values. The activation vector (Y) is written to the Activity Memory 405. The layer's activation values ​​(including the results written to the Activity Memory) are redistributed among the cores from the Activity Memory 405 via the Activity Network 404. As each core receives its activation value, it is written to the local activity memory of each of the receiving cores. Once processing for a given frame is completed, the output activation values ​​are read from the Activity Memory 405 and sent out of the core via the Network 404.

[0055] Thus, in operation, a core control micro-engine (e.g., 413) coordinates the data movement and computation of the core. The micro-engine issues an activity memory address read operation to load an input activity block into the vector-matrix multiplication unit. The micro-engine issues a weight memory address read operation to load a weight block into the vector-matrix multiplication unit. The micro-engine issues a compute operation to the vector-matrix multiplication unit to cause the vector-matrix multiplication unit to compute a partial sum block.

[0056] The microengine issues one or more of a partial sum read / write memory address operation, a vector calculation operation, or a partial sum communication operation to read the partial sum data from a partial sum source, to calculate with a partial sum arithmetic unit, or to write the partial sum data to a partial sum target. Writing the partial sum data to a partial sum target can include communicating external to the core via a partial sum network interface or sending the partial sum data to an active arithmetic unit.

[0057] The micro-engine issues an activation function calculation operation so that the activation function arithmetic unit calculates an output activation value block, and the micro-engine issues an activation value memory address write operation so that the output activation value block is written to the activation value memory through the activation value memory interface.

[0058] Thus, for a given core, various sources, targets, address types, computation types, and control components are defined.

[0059] The sources for the vector-vector unit 410 include the vector matrix multiplication (VMM) unit 409 , constants from the parameter memory 408 , the partial sum memory 411 , the partial sum result from the previous cycle (TGT partial sum), and the partial sum network 403 .

[0060] The targets of the vector-vector unit 410 include a partial sum memory 411 , a partial sum result for the subsequent cycle (SRC partial sum), an activation unit 412 , and a partial sum network 403 .

[0061] Thus, a given instruction may be a read or write from activation value memory 405, a read from weight memory 407, or a read or write from partial sum memory 411. Computational operations performed by the cores include vector matrix multiplication by VMM unit 409, vector (partial sum) operations by vector-vector unit 410, and activation functions by activation unit 412.

[0062] The control operations include updating a program counter and a loop counter and / or a sequence counter.

[0063] Thus, memory operations are issued to read weights from weight memory addresses, read parameters from parameter memory addresses, read activations from activation memory addresses, read partial sums from partial sum memory addresses, and write partial sums to partial sum memory addresses. Computation operations are issued to perform vector-matrix multiplication, vector-vector operations, and activation functions. Communication operations are issued to select vector-vector operands, route messages on the partial sum network, and select partial sum targets. Loops over layer outputs and loops over layer inputs are controlled by control operations that specify the microengine's program counter, loop counter, and sequence counter.

[0064] 5, a schematic diagram of data distribution from a global memory array is provided in accordance with an embodiment of the present disclosure. Global memory array 501 includes multiple elements 502, each including a memory element 504 and a buffer 503. Weights and instructions are provided from global memory array 501 to array 505 of cores 506 via network 507. An exemplary configuration of cores 303 is described above with respect to FIG. 3. Memory 303 in FIG. 3 may be implemented as described with respect to global memory array 501, where core array 306 corresponds to 505.

[0065] As discussed above, many-core architectures for neural inference provide significant advantages in computational power. However, if the neural network weights and parameters are not provided to the computation cores in time, the cores cannot perform any useful computations. As a result, the performance of a neural chip may be limited by the ability to provide the neural network weights and parameters to the computation cores on the chip. On-chip memory significantly improves memory bandwidth when compared to typical off-chip memories such as dynamic random access memory (DRAM) or high bandwidth memory (HBM). Furthermore, on-chip memory results in a neural inference system that is more energy and power efficient than off-chip memory. In various embodiments, the on-chip memory may include static random access memory (SRAM) or other embedded memory. However, providing the neural network weights to the cores fast enough to keep up with the processing speed remains a challenge.

[0066] Significant efficiencies can be achieved using Convolutional Neural Networks (CNNs). In a CNN, the same weight matrix (sometimes called a convolution filter) is used repeatedly. To minimize the amount of on-chip memory used, it is preferable to store a given weight matrix in one location without duplication. To store large neural networks, some embodiments of the on-chip memory consist of a large collection of memory elements. It will also be appreciated that many cores are targets for memory weights. This results in a many-to-many communication problem (many memory elements vs. many cores). Broadcasting weights can cause congestion in the network-on-chip (NoC), resulting in many contentions and pipeline stalls, leading to degradation of the broadcast bandwidth.

[0067] As outlined above, in various embodiments of the neural inference chip, a grid of neural inference cores is provided to accelerate neural network inference. In various embodiments, pre-scheduling of instructions is provided. Since neural network evaluations require a regular pattern of computation, instructions can be pre-scheduled without stalling to achieve high performance. However, it is preferable that all neural network weights are delivered to the cores just in time as pre-scheduled. If the weight distribution network becomes congested and weight distribution stalls, pre-scheduling of neural network evaluations will not work.

[0068] This disclosure provides a stall-free weight distribution network-on-chip for distributing weight parameters from a grid of memory elements to a grid of computational cores. A one-dimensional scheme is first presented below and then extended to a two-dimensional grid scheme. These techniques are further extended to support different weight distributions, such as striping (different rows of cores get different weights).

[0069] The techniques described herein work consistently even when the delivery of instructions to memory elements and data from memory elements to computational cores occurs at different times. These techniques accommodate instruction flows that can access any column in any order. The new scheme removes the constraint that all columns start at the same time.

[0070] 6, an exemplary memory controller using a linear weight memory array is shown, according to an embodiment of the present disclosure. Memory controller 601 includes an instruction memory, shown here as having four instruction slots 611...614. Weight memory array 602 includes a number of elements 621...624, each including a data buffer 625 and a memory element 626. Instruction buffer 603 includes a number of elements 631...634, each corresponding to one of the weight memory elements 621...624. Core grid 604 includes a number of cores 641, as described above with respect to FIG.

[0071]

[0033] Referring now to Figure 7, a method of memory distribution using the controller of Figure 6 is shown. At 701, an instruction is issued from instruction memory 601. The instruction proceeds along instruction buffer 603 between elements 631...634. When the instruction reaches the column in which the applicable data is stored (e.g., memory element 621), the data is read from memory (e.g., memory 626 in this example) into a data buffer (e.g., buffer 625 in this example). Once read, the data propagates along the data buffer, e.g., from memory elements 621 through 622...624. After reaching the last element 624, the value is delivered to the core grid 604.

[0072] It will be appreciated that sequential instructions can be issued by the controller 601, for example one per cycle. The number of cycles for each instruction to advance along the instruction buffer 603 plus the number of cycles for the data to advance along the data buffer (in memory elements 621...624) is constant regardless of the location of the data. In particular, the overall delay of the instruction distribution plus the total delay of the data distribution is constant. This is also true for the random access case.

[0073] Referring to FIG. 8, an exemplary memory controller using a two-dimensional weight memory array is shown, according to an embodiment of the present disclosure. The memory controller 801 includes an instruction memory, here shown with four instruction slots 811...814. The weight memory array 802 includes a number of elements arranged in rows and columns 821...824, each including a data buffer 825 and a memory element 826. In addition to the data buffer 825, the two-dimensional case includes a second buffer 827 to accommodate communication of data within a column. The instruction buffer 803 includes a number of elements 831...834, each corresponding to one column of the weight memory elements 821...824. The core grid 804 includes a number of cores 841, as described above with respect to FIG. 5.

[0074] Referring to Figure 9, a method of memory distribution using the controller of Figure 8 is shown. At 901, an instruction is issued from instruction memory 801. At 902, the instruction proceeds along instruction buffer 803 between elements 831...834. At 903, when the instruction reaches a column (e.g., column 821) in which the applicable data is stored, the data is read from memory (e.g., memory 826 in this example) into a data buffer (e.g., buffer 825 in this example). At 904, once read, the data propagates vertically along the buffer (e.g., down column 821). At 905, the data propagates along each row, e.g., from column 821 through 822...824. At 906, after reaching the last column 824, the value is delivered to the core grid 804.

[0075] As in the one-dimensional case, the total delay between each step of instruction distribution, vertical distribution, and horizontal distribution is constant. In particular, the sum of cycles of delay for instruction distribution + cycles for vertical distribution + cycles for horizontal distribution is constant. Furthermore, it will be appreciated that when multiple columns are accessed out-of-order, the instruction and data delivery delays match each other.

[0076] Referring to FIG. 10, an exemplary memory controller having a two-dimensional weight memory array and a layover buffer is shown, according to an embodiment of the present disclosure. The memory controller 1001 includes an instruction memory, here shown as four instruction slots 1011...1014. These instruction slots are arranged in multiple columns to allow for the simultaneous issuance of multiple instructions within a cycle. In this example, slots 1011 and 1013 store instructions to be issued in a first cycle, while slots 1012 and 1014 store instructions for a second cycle. The weight memory array 1002 includes multiple elements arranged in rows and columns 1021...1024, each including a data buffer 1025 and a memory element 1026. In addition to the data buffer 1025, the two-dimensional case includes a second (vertical) buffer 1027 to accommodate data communication within the columns. In this example, a layover buffer 1028 is also included between the vertical buffer 1027 and the horizontal buffer 1025. The instruction buffer 1003 includes a number of elements 1031...1034, each corresponding to one column of the weight memory elements 1021...1024. Each of the elements 1031...1034 can store multiple instructions issued during the same cycle. The core grid 1004 includes a number of cores 1041, as described above with respect to FIG.

[0077] In this exemplary embodiment, striping is supported, specifically allowing multiple reads of data on the same column. A layover buffer 1028 is added to support multiple reads of data and sending stripes of data. Sending different data to different rows can be useful in many cases, and with the cooperation of the neural inference cores, can substantially increase the bandwidth to receive the memory array.

[0078] The total time for instruction distribution, vertical distribution, time waiting in the layover buffer, and horizontal distribution is constant regardless of where the source data is stored and which row the data is distributed to. The maximum number of cycles to distribute data through the vertical buffer is determined as a combination of the time for vertical distribution and the time waiting in the layover buffer. That way, all data comes out of the layover buffer to the horizontal buffer at the same time. One could also assign a counter on each vertical distribution packet to count down on every clock cycle. This is one way to make sure that all data is transferred from the layover buffer to the horizontal buffer in the same cycle.

[0079] Referring to FIG. 11, an exemplary configuration including multiple memory controllers using a two-dimensional weight memory array is shown, according to an embodiment of the present disclosure. Each of the memory controllers 1101 includes an instruction memory, shown here with four instruction slots 1111...1114. The weight memory array 1102 includes multiple elements arranged in rows and columns 1121...1124, each including a data buffer 1125 and a memory element 1126. In addition to the data buffer 1125, the two-dimensional case includes a second (vertical) buffer 1127 to accommodate data communication within the columns. Each row of the memory array 1102 has a corresponding instruction buffer 1103, including multiple elements 1131...1134, each corresponding to one column of the weight memory elements 1121...1124. The core grid 1104 includes multiple cores 1141, as described above with respect to FIG. 5.

[0080] In this example, each row has a separate memory controller with an instruction memory and an instruction buffer. With this approach, each memory element is physically located close to its corresponding instruction buffer. This allows the instruction buffer to control the memory element without additional pipeline delays.

[0081] Referring to Figures 12A-I, the distribution of instructions and data according to an embodiment of the present disclosure is shown. In this example, data is read from left to right, with each figure showing successive cycles. The memory control instruction in the instruction memory and the data read by that instruction are labeled with the same symbol. For example, a first instruction A0 in the instruction memory attempts to read data A0 stored in a memory element in the leftmost column of the memory array. In Figure 12A, instruction A0 is shown in the instruction buffer. In Figure 12B, a second instruction is issued, and both A0 and A1 are in the instruction buffer. In Figure 12C, a third instruction is issued, and A0, A1, and A2 are in the instruction buffer. In Figure 12D, a fourth instruction is issued, and A0, A1, A2, and A3 are in the instruction buffer and reach their destination memory array elements. In Figure 12E, instructions A0, A1, A2, and A3 are executed, reading from the corresponding memory into their data buffers. In Figure 12F, data travels through the data buffer and data A0 reaches the core grid. In Figure 12G, data travels through the data buffer and data A1 reaches the core grid. In Figure 12H, data travels through the data buffer and data A2 reaches the core grid. In Figure 12I, data travels through the data buffer and data A3 reaches the core grid.

[0082] Referring to Figures 13A-I, the distribution of instructions and data according to an embodiment of the present disclosure is shown. In this example, data is read in random order and each figure shows a cycle. In Figure 13A, instruction A2 is issued and arrives in the instruction buffer. In Figure 13B, a second instruction is issued, A2 and A1 are both in the instruction buffer, and A2 arrives at its destination column. In Figure 13C, a third instruction A3 is issued, instruction A1 advances, instruction A2 executes and reads data into the data buffer. A1 and A3 are in the instruction buffer. In Figure 13D, a fourth instruction A0 is issued, instruction A1 advances, data A2 advances through the data buffer, and instruction A3 executes and reads data into the data buffer. A0 and A1 are in the instruction buffer. In Figure 13E, instruction A0 advances, A1 executes and reads data from memory, and data A2 and A3 advance through the data buffer. In Figure 13F, data advances through the data buffer and data A2 arrives at the core grid. In FIG. 13G, data progresses through the data buffer and data A1 reaches the core grid. In FIG. 13H, data progresses through the data buffer and data A3 reaches the core grid. Instruction A0 is executed, reading data into memory. In FIG. 13I, data progresses through the data buffer and data A0 reaches the core grid. Although the data corresponding to the instructions is randomly placed in the memory elements, there were no network collisions because the number of cycles to advance an instruction plus the number of cycles to advance data is constant. Furthermore, data is delivered to the core grid in the order of instructions, that is, A2, A1, A3, and A0.

[0083] Referring to Figures 14A-M, instruction and data distribution according to an embodiment of the present disclosure is shown. In this example, data is read from a two-dimensional weight memory array, and each figure shows a cycle. In Figure 14A, instruction A0 is issued and arrives in the instruction buffer. In Figure 14B, a second instruction is issued and both A0 and A1 arrive in the instruction buffer. In Figure 14C, a third instruction A2 is issued and instructions A0 and A1 advance. A0, A1, and A2 are in the instruction buffer. In Figure 14D, a fourth instruction A3 is issued and the previous instruction advances. A0, A1, A2, and A3 are in the instruction buffer. In Figure 14E, all instructions are executed on the corresponding columns and read data from the memory. In Figure 14F, the vertical buffer starts propagating data along each column. In Figure 14G, vertical data propagation continues. The A1 column has finished vertical distribution, but waits an additional cycle before starting horizontal propagation to even out delays with the other columns. In Figure 14H, vertical data propagation is complete. In Figure 14I, data is copied to the horizontal buffer. In Figures 14J-M, data progresses through the horizontal buffer until all data has reached the core array.

[0084] Referring to Figures 15A-M, the distribution of instructions and data according to an embodiment of the present disclosure is illustrated. In this example, data is read from a two-dimensional weight memory array in random order, with each figure showing a cycle. In Figure 15A, instruction A2 is issued and arrives in the instruction buffer. In Figure 15B, a second instruction A1 is issued, both A2 and A1 are in the instruction buffer, and A2 arrives at its target column. In Figure 15C, a third instruction A3 is issued and instruction A1 advances. A1 and A3 are in the instruction buffer, and the data for A2 is read into the vertical buffer. In Figure 14D, a fourth instruction A0 is issued and the previous instruction advances. A1 and A0 are in the instruction buffer. The data for A2 is distributed vertically. The data for A3 is read into the vertical buffer. In Figure 15E, A0 advances. The data for A1 is read from memory. The data A2 and A3 are distributed and advance along the vertical buffer. In Figure 15F, the vertical buffer continues to propagate data along each column. A0 advances along the instruction buffer. In FIG. 15G, vertical data propagation continues for A1 and A3. Instruction A0 reaches its target column. Vertical distribution is completed and data for A2 is copied to the horizontal buffer. In FIG. 15H, data A0 is read into the corresponding vertical buffer and vertical propagation continues for A1. Data A2 advances through the horizontal buffer. Data A3 is copied from the vertical buffer to the corresponding horizontal buffer. In FIG. 15I, data A2 and A3 advance through the horizontal buffer. Data for A1 is copied to the horizontal buffer without contention between data for A2 and data for A3. In FIG. 15J, data for the first instruction A2 is delivered to the core grid. Data for A1 and A3 advance through the horizontal buffer and data for A0 advances through the vertical buffer. In FIG. 15K, data for the second instruction A1 is delivered. The last instruction A0 completes the vertical distribution. In FIG. 15L, data for A3 is delivered. Data for A0 is copied to the horizontal buffer. In Figure 15M, the data for A0 is delivered to the core array. Although the instructions read data from random locations, the data proceeds without collisions and is delivered to the core grid in instruction order.To avoid network collisions in the vertical buffer, during vertical data propagation, instructions should not be read from memory elements in the same column.

[0085] 16A-K, distribution of instructions and data according to an embodiment of the present disclosure is shown. In this example, data is read from a two-dimensional weighted memory array, and each figure shows a cycle. A pair of instructions are issued in the same cycle. In this example, the memory elements in the first row have data A0 and the memory elements in the second row have data B0. Data A0 is distributed over all even rows and B0 is distributed over all odd rows.

[0086] In Figure 16A, instructions A0 and B0 are issued and reach the instruction buffer. In Figure 16B, instructions A1 and B1 are issued and A0 and B0 advance. In Figure 16C, each pair of instructions advances to its destination column. In Figure 16D, all instructions are executed on the corresponding column, reading data from memory into the corresponding vertical buffer. In Figure 16E, the vertical buffer starts propagating data along each column. The vertical buffer transfers data, but some data is stored in the layover buffer. The layover buffer is used when data has already reached its target row and needs to wait until horizontal distribution begins. In Figure 16F, vertical data propagation continues. In Figure 16G, all data has reached the target row and is copied to the layover buffer. The stripe pattern is in the layover buffer. In Figure 16H, data is copied from the layover buffer to the horizontal buffer. In Figure 16I, data advances through the data buffer. In Figure 16J, data travels through the data buffer delivering a stripe of data A0 and B0 to the core grid. In Figure 16K, data travels through the data buffer delivering a stripe of data A1 and B1 to the core grid.

[0087] Referring to FIG. 17, a method for calculating neural activity values ​​is shown. At 1701, at least one instruction is provided from an instruction memory to an instruction buffer. At 1702, the at least one instruction advances between locations in the instruction buffer. At 1703, the at least one instruction is provided from the instruction buffer to at least one element of the plurality of elements of the memory array when the memory of the at least one element of the plurality of elements includes data associated with the at least one instruction. The memory array includes a plurality of elements, each including a memory and a horizontal buffer, and the horizontal buffer of each element of the memory array communicates with either a horizontal buffer of another element of the memory array or at least one neural core. At 1704, in response to the arrival of the at least one instruction from the instruction buffer, a data block is provided from the memory to at least one horizontal buffer of the plurality of elements. At 1705, the data block is provided from the horizontal buffer of the at least one horizontal buffer of the plurality of elements to a horizontal buffer of another element of the memory array or to at least one neural core.

[0088] Various embodiments of the present disclosure provide for the distribution of instructions and data in one or two dimensional memory arrays using a combination of instruction buffers, horizontal buffers, vertical buffers, and layover buffers. It will be appreciated that the present disclosure is also applicable to higher dimensional arrays with the addition of additional buffers. In these embodiments, the time from issuing an instruction to outputting data from the data array is constant, even though each step may take a different time. Columns may be accessed in random order. For more than one dimension, two instructions accessing the same column should be separated by the vertical distribution time. For one dimension, the vertical distribution time is zero, so there is no constraint.

[0089] In various embodiments, a system is provided that includes a memory array, an instruction buffer, and a horizontal data buffer, and for all instructions, the sum of the number of cycles for instruction distribution and the number of cycles for memory distribution is constant.

[0090] In various embodiments, a two-dimensional memory array is provided. For each row of the memory array, a horizontal buffer is provided. For each column of the memory array, a vertical buffer is provided. The sum of the number of cycles for instruction distribution, the number of cycles for data distribution along the vertical buffers, and the number of cycles for data distribution along the horizontal buffers is constant.

[0091] In various embodiments, a two-dimensional memory array is provided. For each location in the memory array, a layover buffer is provided. The sum of the number of cycles for instruction distribution, the number of cycles for data distribution along the vertical buffer, the number of cycles for data distribution along the horizontal buffer, and the number of cycles for data passing through the layover buffer is constant.

[0092] 18, an example computing node is shown generally. Computing node 10 is merely one example of a suitable computing node and is not intended to suggest any limitation as to the scope of use or functionality of the embodiments described herein. Nevertheless, computing node 10 may implement and / or perform any of the functionality described above.

[0093] In computing node 10, computer system / server 12 is operable in numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments or configurations or combinations thereof that may be suitable for use with computer system / server 12 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices.

[0094] The computer system / server 12 may be described in the general context of computer system executable instructions, such as program modules, executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system / server 12 may be practiced in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media, including memory storage devices.

[0095] 18, computer system / server 12 in computing node 10 is shown in the form of a general purpose computing device. Components of computer system / server 12 may include, but are not limited to, one or more processors or processing units 16, a system memory 28, and a bus 18 coupling various system components including system memory 28 to processor 16.

[0096] Bus 18 represents any one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures, including, by way of example and not limitation, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, Peripheral Component Interconnect (PCI) bus, Peripheral Component Interconnect Express (PCIe), and Advanced Microcontroller Bus Architecture (AMBA).

[0097] In various embodiments, one or more inference processing units (not shown) are coupled to bus 18. In such embodiments, the IPU can receive data from or write data to memory 28 via bus 18. Similarly, the IPU can interact with other components via bus 18, as described herein.

[0098] Computer system / server 12 typically includes a variety of computer system readable media, which may be any available media that can be accessed by computer system / server 12 and includes both volatile and nonvolatile media, removable and non-removable media.

[0099] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 or cache memory 32, or both. The computer system / server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 may be provided for reading from and writing to a non-removable, non-volatile magnetic medium (not shown, typically referred to as a "hard drive"). Although not shown, a magnetic disk drive may be provided for reading from and writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive may be provided for reading from and writing to a removable, non-volatile optical disk, such as a CD-ROM, DVD-ROM, or other optical medium. In such cases, each may be connected to the bus 18 by one or more data media interfaces. As further shown and described below, the memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of embodiments of the present disclosure.

[0100] By way of example and not limitation, stored within memory 28 may be a program / utility 40 having a set (at least one) of program modules 42, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data, or any combination thereof, may include an implementation of a networking environment. Program modules 42 generally perform the functions and / or methods of embodiments of the invention described herein.

[0101] The computer system / server 12 may also communicate with one or more external devices 14, such as a keyboard, pointing device, display 24, or the like, one or more devices that allow a user to interact with the computer system / server 12, or any device that allows the computer system / server 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.), or combinations thereof. Such communication may occur via an input / output (I / O) interface 22. Additionally, the computer system / server 12 may also communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), or a public network (e.g., the Internet), or combinations thereof, via a network adapter 20. As shown, the network adapter 20 communicates with other components of the computer system / server 12 via a bus 18. It is understood that other hardware and / or software components, not shown, may be used with the computer system / server 12. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archive storage systems.

[0102] The present disclosure may be a system, method, or computer program product, or a combination thereof. The computer program product may include a computer readable storage medium or media having computer readable program instructions thereon for causing a processor to perform aspects of the present invention.

[0103] A computer readable storage medium may be any tangible device capable of holding and storing instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. A non-exhaustive list of more specific examples of computer readable storage media includes the following: portable computer diskettes, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), static random access memories (SRAM), portable compact disk read-only memories (CD-ROM), digital versatile disks (DVDs), memory sticks, floppy disks, mechanically encoded devices having instructions recorded thereon, and any suitable combination of the above. As used herein, a computer-readable storage medium is not to be construed as a transitory signal per se, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., light pulses through a fiber optic cable), or an electrical signal sent through a wire.

[0104] The computer readable program instructions described herein may be downloaded from a computer readable storage medium to each computing / processing device or to an external computer or storage device over a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface in each computing / processing device receives the computer readable program instructions from the network and transfers the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0105] The computer readable program instructions for carrying out the operations of the present disclosure may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcores, firmware instructions, state setting data, or source or object cores written in any combination of one or more programming languages, including object oriented programming languages ​​such as Smalltalk, C++, and traditional procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partially on the user's computer as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the last scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) can execute computer readable program instructions to individualize the electronic circuitry by utilizing state information of the computer readable program instructions to implement aspects of the present disclosure.

[0106] Aspects of the present disclosure are described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present 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.

[0107] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, whereby the instructions executed by the processor of the computer or other programmable data processing apparatus create means for performing the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams. These computer program instructions may also be stored in a computer readable medium capable of directing a computer, other programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, whereby the instructions stored in the computer readable medium include an article of manufacture including instructions implementing aspects of the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0108] The computer program instructions may be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to generate a computer-implemented process, such that the instructions executing on the computer, other programmable apparatus, or other device provide a process for performing the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0109] 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 flowcharts or block diagrams may represent a module, segment, tensorlet, block, or part of instructions, which includes one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions shown in the blocks may be performed in a different order than that shown in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or these blocks may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, may be implemented by a dedicated hardware-based system that executes the specified functions or operations, or executes a combination of dedicated hardware and computer instructions.

[0110] The description of various embodiments of the present disclosure has been presented for illustrative purposes, but they are not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used in this specification have been selected to best explain the principles of the embodiments, practical applications, or technical improvements over the art found in the market, or to enable those skilled in the art to understand the embodiments disclosed herein.

Claims

1. A neural inference chip for calculating neural activity values, the neural inference chip comprising: at least one neural core; a memory array operatively coupled to the at least one neural core, the memory array including a plurality of elements each including a memory and a horizontal buffer, the horizontal buffer of each element of the memory array communicating either with the horizontal buffer of another of the elements of the memory array or with the at least one neural core; an instruction buffer in communication with said memory array and having a location corresponding to each of said plurality of elements of said memory array; an instruction memory in communication with the instruction buffer; Including, the instruction memory is adapted to provide at least one instruction to the instruction buffer; the instruction buffer is adapted to advance the at least one instruction between locations in the instruction buffer; the instruction buffer is adapted to provide the at least one instruction from its associated location in the instruction buffer to the at least one element of the plurality of elements of the memory array when the memory of the at least one element of the plurality of elements includes data associated with the at least one instruction; each of said plurality of elements of said memory array adapted to provide a block of data from its memory to its horizontal buffer in response to arrival of an associated instruction from said instruction buffer; the horizontal buffer of each element of the memory array is adapted to provide a block of data to the horizontal buffer of another element of the memory array or to the at least one neural core; Neural inference chip.

2. the instruction buffer is adapted to advance instructions between positions in the instruction buffer at a rate of one position per cycle; the horizontal buffer of each element of the memory array is adapted to provide blocks of data to the horizontal buffer of another of the elements of the memory array or to the at least one neural core at a rate of one data block per cycle; 2. The neural inference chip of claim 1.

3. 2. The neural inference chip of claim 1, further comprising an array of neural cores including said at least one neural core and having a plurality of rows.

4. 2. The neural inference chip of claim 1, wherein said memory array is one-dimensional, and said elements of said memory array are arranged in a row and multiple columns.

5. 2. The neural inference chip of claim 1, wherein said memory array is two-dimensional, said elements of said memory array being arranged in rows and columns.

6. 6. The neural inference chip of claim 5, wherein each element of said memory array further comprises a vertical buffer, said vertical buffer of each element of said memory array in communication with said vertical buffer of another element of said memory array.

7. each of said plurality of elements of said memory array adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from said instruction buffer; each of the plurality of elements of the memory array adapted to provide the block of data from its vertical buffer to its horizontal buffer; the vertical buffer of each element of the memory array is adapted to provide the block of data to the vertical buffer of another element of the memory array; 7. The neural inference chip of claim 6.

8. the horizontal buffer of each element of the memory array is adapted to provide blocks of data to the horizontal buffer of another of the elements of the memory array or to the at least one neural core at a rate of one data block per cycle; the vertical buffer of each element of the memory array is adapted to provide blocks of data to the vertical buffer of another of the elements of the memory array at a rate of one data block per cycle; 8. The neural inference chip of claim 7.

9. 7. The neural inference chip of claim 6, wherein each element of the memory array further comprises a layover buffer, the layover buffer of each element of the memory array in communication with the horizontal buffer and the vertical buffer of that element of the memory array.

10. each of said plurality of elements of said memory array adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from said instruction buffer; each of the plurality of elements of the memory array adapted to provide the data block from its vertical buffer to its layover buffer; each of the plurality of elements of the memory array adapted to provide the data block from its layover buffer to its horizontal buffer; the vertical buffer of each element of the memory array is adapted to provide the block of data to the vertical buffer of another element of the memory array; 10. The neural inference chip of claim 9.

11. the horizontal buffer of each element of the memory array is adapted to provide blocks of data to the horizontal buffer of another of the elements of the memory array or to the at least one neural core at a rate of one data block per cycle; the vertical buffer of each element of the memory array is adapted to provide blocks of data to the vertical buffer of another of the elements of the memory array at a rate of one data block per cycle; the layover buffer of each element of the memory array being adapted to provide blocks of data to the horizontal buffer of that element of the memory array at a rate of one data block per cycle; The neural inference chip of claim 10.

12. the instruction memory is adapted to provide a plurality of instructions to the instruction buffer per cycle, each location of the instruction buffer being adapted to store a plurality of instructions; the instruction buffer is adapted to advance a plurality of instructions between locations in the instruction buffer per cycle; The neural inference chip of claim 10.

13. A neural inference chip for calculating neural activity values, the neural inference chip comprising: at least one neural core; a memory array operably coupled to the at least one neural core, the memory array including a plurality of elements, each element including a memory, a horizontal buffer, and a vertical buffer; Including, the horizontal buffer of each element of the memory array communicates with either the horizontal buffer of another element of the memory array or with the at least one neural core; the vertical buffer of each element of the memory array communicating with the vertical buffer of another element of the memory array; a plurality of instruction buffers in communication with said memory array, each having a location corresponding to one of said plurality of elements of said memory array; a plurality of instruction memories, each in communication with one of the plurality of instruction buffers; Further comprising: Each instruction memory is adapted to provide at least one instruction to its instruction buffer; each instruction buffer adapted to advance said at least one instruction between positions within that instruction buffer; each instruction buffer is adapted to provide the at least one instruction from its associated location within its instruction buffer to the at least one element of the plurality of elements of the memory array if the memory of the at least one element of the plurality of elements includes data associated with the at least one instruction; each of said plurality of elements of said memory array adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from said instruction buffer; each of the plurality of elements of the memory array adapted to provide the block of data from its vertical buffer to its horizontal buffer; the vertical buffer of each element of the memory array is adapted to provide the block of data to the vertical buffer of another element of the memory array; the horizontal buffer of each element of the memory array is adapted to provide a block of data to the horizontal buffer of another element of the memory array or to the at least one neural core; Neural inference chip.

14. each instruction buffer is adapted to advance instructions between positions therein at a rate of one position per cycle; the horizontal buffer of each element of the memory array is adapted to provide blocks of data to the horizontal buffer of another of the elements of the memory array or to the at least one neural core at a rate of one data block per cycle; 14. The neural inference chip of claim 13.

15. 14. The neural inference chip of claim 13, comprising an array of neural cores, the array including said at least one neural core and having a plurality of rows.

16. 14. The neural inference chip of claim 13, wherein the memory array is two-dimensional, the elements of the memory array being arranged in rows and columns.

17. 17. The neural inference chip of claim 16, wherein each element of the memory array further includes a vertical buffer, the vertical buffer of each element of the memory array in communication with the vertical buffer of another element of the memory array.

18. each of said plurality of elements of said memory array adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from said instruction buffer; each of the plurality of elements of the memory array adapted to provide the block of data from its vertical buffer to its horizontal buffer; the vertical buffer of each element of the memory array is adapted to provide the block of data to the vertical buffer of another element of the memory array; 18. The neural inference chip of claim 17.

19. the horizontal buffer of each element of the memory array is adapted to provide blocks of data to the horizontal buffer of another of the elements of the memory array or to the at least one neural core at a rate of one data block per cycle; the vertical buffer of each element of the memory array is adapted to provide blocks of data to the vertical buffer of another of the elements of the memory array at a rate of one data block per cycle; 20. The neural inference chip of claim 18.

20. 20. The neural inference chip of claim 17, wherein each element of the memory array further includes a layover buffer, the layover buffer of each element of the memory array in communication with the horizontal buffer and the vertical buffer of that element of the memory array.

21. each of said plurality of elements of said memory array adapted to provide a block of data from its memory to its vertical buffer in response to arrival of an associated instruction from said instruction buffer; each of the plurality of elements of the memory array adapted to provide the data block from its vertical buffer to its layover buffer; each of the plurality of elements of the memory array adapted to provide the data block from its layover buffer to its horizontal buffer; the vertical buffer of each element of the memory array is adapted to provide the block of data to the vertical buffer of another element of the memory array; 21. The neural inference chip of claim 20.

22. the horizontal buffer of each element of the memory array is adapted to provide blocks of data to the horizontal buffer of another of the elements of the memory array or to the at least one neural core at a rate of one data block per cycle; the vertical buffer of each element of the memory array is adapted to provide blocks of data to the vertical buffer of another of the elements of the memory array at a rate of one data block per cycle; the layover buffer of each element of the memory array being adapted to provide blocks of data to the horizontal buffer of that element of the memory array at a rate of one data block per cycle; 22. The neural inference chip of claim 21.

23. the instruction memory is adapted to provide a plurality of instructions to the instruction buffer per cycle, each location of the instruction buffer being adapted to store a plurality of instructions; the instruction buffer is adapted to advance a plurality of instructions between locations in the instruction buffer per cycle; 22. The neural inference chip of claim 21.

24. providing at least one instruction from an instruction memory to an instruction buffer; advancing the at least one instruction between locations in the instruction buffer; providing the at least one instruction from the instruction buffer to at least one element of the plurality of elements of the memory array when a memory of the at least one element of the plurality of elements of the memory array contains data associated with the at least one instruction; Including, the memory array includes a plurality of elements each including a memory and a horizontal buffer, the horizontal buffer of each element of the memory array communicating with either the horizontal buffer of another of the elements of the memory array or at least one neural core; providing a block of data from the memory of the at least one element of a plurality of elements to the horizontal buffer in response to arrival of the at least one instruction from the instruction buffer; providing the block of data from the horizontal buffer of the at least one element of a plurality of elements to the horizontal buffer of another element of the memory array or to the at least one neural core; The method further comprising:

Citation Information

Patent Citations

  • Method and apparatus for loading data and instructions into computer

    JP2009064411A

  • Instruction distribution in an array of neural network cores

    US20200012929A1

  • Improving performance of neural network arrays

    WO2019152451A1