Method for storing weight data and artificial intelligence inference storage device thereof
By using high-bandwidth storage architecture and AI accelerator processing core on the AI inference platform, optimizing the storage and reading methods of weight data solves the problems of insufficient bandwidth and high power consumption in AI applications, achieving efficient data processing and low power consumption.
Patent Information
- Application Number
- CN202310651110.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-02-22
- Filing Date
- 2023-06-02
- Publication Date
- 2024-08-23
AI Technical Summary
Existing storage devices have insufficient bandwidth during read/write operations in AI inference applications, resulting in poor performance and high power consumption. They also require frequent logic updates, which are costly and difficult to meet the high bandwidth and low power consumption requirements of AI applications.
By using high-bandwidth NAND flash memory or other high-bandwidth storage architectures on the AI inference platform, we optimize the storage and reading methods of weight data, reduce the number and time of read operations, and utilize AI accelerator processing cores and neural processing units (NPUs) for data processing. Processing, using multiple non-volatile memory channels to transmit, distribute and read weight data in parallel to reduce flash access time and power consumption.
It effectively reduces flash memory access time, improves data processing efficiency, reduces power consumption, improves the processing speed and bandwidth utilization of the AI inference platform, and reduces the number and cost of read/write operations.
Smart Images

Figure CN118536552A_ABST
Abstract
Description
Technical Field
[0001] The present technology relates to integrated circuit memory devices, such as non-volatile memory devices, that support the storage and retrieval of information used in artificial intelligence (AI) inferencing applications, and in particular to methods for storage and retrieval of AI inference (weight) data that fully utilize the larger bandwidth capabilities of AI storage architectures. Background Art
[0002] Modern information technology applications, such as artificial intelligence (AI) inference, may consume a large amount of data, such as weight information, when performing inference operations.
[0003] There are many different types of storage architectures that have been created, each providing storage for digital data and handling different needs and requirements of various applications. However, existing approaches to storage devices often suffer from insufficient bandwidth, resulting in poor performance, or requiring logic upgrades that are more expensive.
[0004] Especially in AI applications, a large number of reads / writes (which may be hundreds of millions of reads / writes) consume a lot of power and require sufficient processing time. Therefore, there is a need for an AI inference platform with higher bandwidth and lower power consumption by reducing the read / write time and the number of read / write operations.
[0005] There is a need to provide a mechanism for storing and retrieving AI inference (weight) data to leverage the larger bandwidth capabilities of AI storage architectures. Summary of the invention
[0006] The present technology provides for storing weight data that is used to calculate node values for a neural network-like system during inference operations, which is used to reduce the number of read operations and the associated read time and reduce power consumption. Such operations can be implemented by one or more artificial intelligence (AI) accelerator processing cores (e.g., accelerator cores) of an AI inference platform, and the accelerator processing core is coupled to a NAND flash memory or another high-bandwidth storage architecture. The method can be implemented in logic, and the logic is configured within an AI inference storage device or in a non-volatile memory of a neural processing unit (NPU) coupled to an AI inference platform, and the AI inference platform uses a high bandwidth (HBW) NAND flash memory technology and other HBW types.
[0007] In a representative embodiment and example, a method for storing weight data is provided. The weight data is used to calculate node values during an artificial intelligence (AI) inference operation performed by a type of neural network. The method includes the following steps: receiving a type of neural network definition, the type of neural network definition defining the type of neural network having multiple layers, each layer including multiple type of neural network nodes, each type of neural network node using one or more weights to calculate a result for the type of neural network node during an inference operation by applying a function to (i) the one or more weights and (ii) an input of the type of neural network node; determining, for one of the layers defined by the type of neural network definition, a set of weights used to calculate a type of neural network inference result for use by each of the type of neural network nodes in the layer; and storing the set of weights determined for the layer in a page of memory so that for each of the type of neural network nodes in the layer, any weights of the set of weights used to calculate the type of neural network inference result are stored together in the paged memory for being retrieved together.
[0008] In another exemplary embodiment, the method further includes processing a next layer in the neural network definition so that a second set of weights used to calculate a neural network inference result for the next layer is also stored in the memory of this page for retrieval together.
[0009] In a further embodiment, multiple weights in the group of weights are assigned to multiple weight groups, and each weight group is assigned to a channel in the type of neural network definition, and the storage step also includes storing multiple weights of a specific channel together, so that for each of the type of neural network nodes in the layer, the weights of more than two weight groups used to calculate the inference results of the type of neural network are retrieved sequentially without the need to read an additional page of memory.
[0010] In yet further embodiments, the step of retrieving weights of more than two weight groups may further include retrieving all groups of a layer without requiring the reading of an additional page of memory.
[0011] In yet further embodiments, each weight group corresponds to a specific channel of the neural network. For example, a neural network configured to process images may include red (R), green (G), and blue (B) channels.
[0012] In yet further embodiments, each channel of the neural network corresponds to a filter populated by the weights of the respective weight group. For example, the filter of each corresponding channel may include a plurality of weights arranged in a pattern selected from a 3×3 pattern, a 4×4 pattern, a 5×5 pattern, and a 6×6 pattern.
[0013] In yet further embodiments, multiple weights are stored to and read from one or more dies that implement multiple non-volatile storage arrays using multiple memory channels that provide multiple paths for data to and from the NVM dies. For example, all weights belonging to a group may be assigned to a particular memory channel. In another example, multiple weights belonging to a group are distributed among multiple memory channels.
[0014] In yet a further embodiment, prior to storing the set of weights determined for a layer in a memory for a page, each weight in the set of weights may be retrieved from a previous storage location in the memory; for reconfiguring the weight data in the memory.
[0015] In another representative embodiment providing further example, an artificial intelligence (AI) inference storage device includes a plurality of non-volatile memory (NVM) dies, each NVM die including at least one memory array, and a plurality of channel logic connected to corresponding ones to provide storage in the memory array and retrieval from the memory array. The NVM dies may be operably coupled to a neural processing unit (NPU), the NPU implementing an accelerator core connected via corresponding channel logic for transferring data to and from the memory arrays and configured to perform the following operations: for storing weight data used to calculate node values during artificial intelligence (AI) inference operations performed by a class of neural networks.
[0016] In a further representative embodiment providing a further example, an AI inference system includes a plurality of non-volatile memory (NVM) dies, each NVM die including at least one memory array, and a plurality of channel logic connected to corresponding ones to provide storage in the memory arrays and retrieval from the memory arrays. The AI inference system may also include a neural processing unit (NPU) implementing an accelerator core for processing data to and from the memory arrays via corresponding channel logic connections and configured to implement the method described below. For storing weight data, the weight data is used to calculate node values during artificial intelligence (AI) inference operations performed by a class of neural networks. These elements can be configured on a common interposer or substrate or distributed among multiple packages.
[0017] In yet a further representative embodiment providing a further example, a non-volatile memory storing a plurality of instructions for storing weight data used to calculate node values during artificial intelligence (AI) inference operations performed by a type of neural network is provided. When the instructions are executed by one or more processors, the actions described below are implemented. A type of neural network definition is received; for a layer of the multiple layers defined in the type of neural network definition, a set of weights used to calculate a type of neural network inference result for each of the plurality of network nodes in the layer is determined; and weight data is stored, the weight data used to calculate node values during artificial intelligence (AI) inference operations performed by the type of neural network.
[0018] The weight data storage paradigm according to the embodiments described herein can reduce flash memory access time and increase data processing efficiency. Other implementation aspects and advantages of the present technology can be seen upon reviewing the following drawings, detailed description and appended claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The patent or application file contains at least one drawing printed in color. Copies of the patent or patent application publication with color drawing(s) will be provided by this office upon request and payment of the necessary fee.
[0020] Figure 1 A simplified diagram showing storage and retrieval of weight data in a memory system including a flash memory device implemented on an integrated circuit as described herein.
[0021] Figure 2 Weight data used by a class of neural networks to process multiple images is shown according to the techniques described herein, the weight data being stored according to various storage paradigms via a high bandwidth non-volatile memory (NVM).
[0022] Figure 3 Schematic diagram of a technique for distributing weight data among multiple NVM channels via a high-bandwidth NVM in accordance with the techniques described herein.
[0023] Figure 4 Schematic diagrams showing scenarios for distributing weight data among multiple NVM channels via a high bandwidth NVM according to the techniques described herein.
[0024] Figure 5 A flowchart showing an example of a weight data storage operation that may be performed by an inference system as described herein.
[0025] Figure 6A simplified functional block diagram of a representative neural network-like node (neuron) described herein, wherein the neural network-like node includes weight data stored into and read from a high-bandwidth NVM by AI inference system logic.
[0026] Figure 7 A representative activation function suitable for performing artificial intelligence inference as described herein is shown.
[0027] Figure 8 A simplified functional block diagram of an inference system described in this article.
[0028] Fig. 9 An illustration of a multi-chip module including a high bandwidth memory as described herein for artificial intelligence (AI) inference.
[0029] Fig.10 FIG. 1 is an illustration of another embodiment of a multi-chip module including a high bandwidth memory as described herein for use in AI inference.
[0030] Fig.11 FIG. 1 is an illustration of yet another embodiment of a multi-chip module including a high bandwidth memory as described herein for use in AI inference.
[0031] Description of Reference Numerals
[0032] D0~D5:Location
[0033] W0~W5: weight data
[0034] 1: Storage device
[0035] 101: First Practice
[0036] 102. Second method
[0037] 201: Example
[0038] 202: Example
[0039] 203: Example
[0040] 211: Red weight
[0041] 212: Green weight
[0042] 213: Blue weight
[0043] 221: Red filter
[0044] 222: Green filter
[0045] 223: Blue filter
[0046] 300: High-Bandwidth Storage Architecture
[0047] 310, 311, 312: Channels
[0048] 320A, 322A: Layer
[0049] 320B, 322B: Filter
[0050] 400A: Practice
[0051] 400B: Method
[0052] 401~408: Filter
[0053] 410-413: Memory channel
[0054] 500: Flowchart
[0055] 501-506: Operation
[0056] 602: Weight
[0057] 702: Sigmoid function
[0058] 704: Hyperbolic tangent (tanh) function
[0059] 706: Rectified Linear Unit (ReLU) function
[0060] 708: Leaky Rectified Linear Unit (Leaky LReLU) function
[0061] 710: Maximum output (maxout) function
[0062] 801: Processor chip
[0063] 802: Second storage chip / weight memory
[0064] 803: The first memory chip
[0065] 804: Logical layer
[0066] 805: On-chip memory
[0067] 810: CPU or processor core
[0068] 811: Accelerator Core
[0069] 812: First memory I / O interface
[0070] 813: First I / O interface
[0071] 814: Memory I / O Interface
[0072] 815: Data Path
[0073] 820: Bus system
[0074] 822: Second I / O interface
[0075] 830a, 830b: Memory group
[0076] 831a, 831b: Interface
[0077] 832a, 832b: Interface
[0078] 834, 844: Channel controller
[0079] 840: High Capacity Volatile Memory
[0080] 850a, 850b: vertical connection part
[0081] 901: Processor chip
[0082] 902: Second storage chip
[0083] 903: The first memory chip
[0084] 910: Intermediary Department
[0085] 911: Interconnect Wiring
[0086] 912: Interface
[0087] 913: Input / Output Interface
[0088] 914: Interface
[0089] 920: Multi-chip module (MCM)
[0090] 921: External contact structure
[0091] 922: Input / Output Interface
[0092] 1001: Processor chip
[0093] 1002: Second storage chip
[0094] 1002a~1002N: Non-volatile memory (NVM) die
[0095] 1003: First memory chip
[0096] 1010: Intermediary Department
[0097] 1011: Interconnect Wiring
[0098] 1012: Interface
[0099] 1013: Input / Output Interface
[0100] 1014: Interface
[0101] 1020: Multi-chip module (MCM)
[0102] 1021: External contact structure
[0103] 1031: Interface
[0104] 1032: Interface
[0105] 1041: Interface
[0106] 1042: Interface
[0107] 1101: Processor chip
[0108] 1102: Second storage chip
[0109] 1102a~1102N: Non-volatile memory (NVM) die
[0110] 1103: First memory chip
[0111] 1104: I / O die
[0112] 1110: Intermediary Department
[0113] 1111: Interconnection wiring
[0114] 1112: Interface
[0115] 1113: Input / Output Interface
[0116] 1114: Interface
[0117] 1120: Multi-chip module (MCM)
[0118] 1131: Interface
[0119] 1132: Interface
[0120] 1141: Interface
[0121] 1142: Interface
[0122] 1151: External contact structure
[0123] 1152: Input / Output Interface DETAILED DESCRIPTION
[0124] Please refer to the following Figures 1 to 11, and provide detailed descriptions of multiple embodiments of the present technology. Multiple embodiments described herein implement data optimization procedures in several methods and hardware logic, wherein the hardware logic is used to store weight data used in artificial intelligence (AI) inference operations, to reduce the required data acquisition during the reading of weight data to fill these neural network nodes, and to increase data output (throughput) and AI inference process efficiency.
[0125] In a typical AI inference platform configuration, an AI accelerator will retrieve weight data to be used during AI inference from a high bandwidth (HBW) non-volatile memory (NVM) or HBW NAND. During such a read operation, NAND flash memory, for example, allows access granularity at the page level. When data is stored in different pages, data retrieval may be impaired, and multiple page retrieval operations are required to obtain weight data for multiple nodes of the populated neural network layer. This may impact the processing output and / or speed of the entire program. In a critical case, the AI accelerator may even stall and wait for input data to arrive. Therefore, the multiple embodiments described herein implement data optimization procedures in several methods and hardware logic to reduce the required data retrieval and increase the data output and efficiency of the AI inference program.
[0126] In a process-constrained environment, the speed at which AI applications reach a result becomes an important factor. Therefore, due to the inherent page-level granularity of NAND flash page read operations, the existing random storage of weight data in HBW NAND flash increases the required data fetch operations and results in low data transfer efficiency. According to various embodiments described herein, various weight data storage paradigms can reduce the number of flash memory accesses and increase data processing efficiency.
[0127] Figure 1 A simplified diagram showing the storage and retrieval of weight data used to compute node values during inference operations performed by a type of neural network in a memory system comprising a flash memory device 1 implemented on an integrated circuit as described herein. The memory device may be implemented on a single integrated circuit chip, on a multi-chip module, or on multiple chips configured to suit a particular need.
[0128] like Figure 1As shown, the storage device 1 is a NAND flash memory, in which multiple read operations are performed with a page granularity, which means that each time a data retrieval operation is performed, an entire page must be read from the flash memory. When data is stored in different pages, data retrieval will be slower. This may impact the processing speed of the entire AI inference platform. Furthermore, the AI accelerator may stop and wait for data to arrive. If the locality of this data is not well preserved, low bandwidth utilization will result.
[0129] Continue to refer Figure 1 , D0 to D5 represent data storage locations; W0 to W5 represent weight data. The weight data is stored in the NVM. In a first scenario 101, the weight data (i.e., neural network weights) are randomly stored in data locations from location D0 to location D5 in page 0 and page 1. Therefore, if the neural network processing calls weights W1, W5, and W2 to perform a calculation, that is, to obtain a node value or a set of node values, the NAND flash memory device 1 will first read page 0 to obtain weight W1, then read page 1 to obtain weight W5, and then return to re-read page 0 to obtain weight W2. However, if the data is stored in multiple data locations according to a desired acquisition represented by the neural network to be processed, or is reordered into multiple storage locations as shown by the second scenario 102, the expected data acquisition time can be reduced. In the second scenario 102, weights W1, W5, and W2 are all stored in locations in page 0. Thus, the action of obtaining weights W1, W5, and W2 calls NAND flash memory device 1 to perform a single read of page 0, which can reduce access time, increase efficiency, increase performance, etc. In various embodiments, the neural network-like structure (indicating which weights are to be used, and in what order) can be received as an input by the AI inference system, or read from storage, or otherwise made accessible. Because the entire neural network-like structure can be obtained from a local storage area on the chip, received from a host or another chip in the AI inference system, the AI inference system can determine what weight data needs to be input during AI inference, and therefore in what order the weight data can be stored, so as to reduce access time during subsequent inferences.
[0130] Figure 2 Weight data used by a class of neural networks to process multiple images stored in accordance with various storage paradigms using a high bandwidth NVM according to the techniques described herein is shown. Figure 2In the exemplary embodiment shown, the weight data is stored in the same page or pages in the NVM and is read as groups or sets of nine (9) weights for each of the three (3) color neural network channels: red (1 to 9), green (1 to 9), and blue (1 to 9). A group (or set) of weights may include a filter or a feature map such that the filter may include a plurality of weights corresponding to network nodes in a layer of a neural network defined in a neural network definition. In an exemplary embodiment, an input may be an input image of 224×224×3 pixels; where 3 is the number of channels, i.e., red, green, and blue channels. However, after a first convolution process is applied to the input image, an intermediate form of the data becomes 224×224×64 because there are 64 3×3 filters (each including 9 weights) and each filter has 3 neural network channels, i.e., red, green, and blue channels, for convolutional neural network (CNN) processing.
[0131] In by Figure 2 In the example of storage examples 201, 202, 203 shown, there are 32 groups of 9 weights, each with a specific storage location, where a group of 9 weights 211, 212, 213 form respective 3×3 filters, such as 221, 222, 223. A group of 9 red weights 211 can be used to fill a red filter 221, a group of green weights 212 can be used to fill a green filter 222, and a group of blue weights 213 can fill a blue filter 223. Accordingly, there are 288 red weights (e.g., 32×9), 288 green weights, and 288 blue weights. In short, there are 864 weights in total (288×3).
[0132] like Figure 2As shown, in this figure the weights are stored from left to right, in example 201 from red to green to blue. Therefore, in example 201, 3 fetch operations are required to fetch the first filter for 3 different (i.e. red, green and blue) channels, because such data may not be stored in the same page of memory, for example, due to the page size. Therefore, at least 96 read operations (32×3) will be required, for example, to fill each of these filters. If these weights were all stored in the same page, this process would still require 3 read operations to obtain the value of a filter for use with 3 different (e.g. R, G and B) channels. That is why the order of the data can be rearranged so that an AI inference engine can process all the red data at once, if a page is large enough to hold all the red data. If the page size is not large enough to hold these weights for all filters providing the same color, the rest of the same color weights will be stored on the next page in memory.
[0133] When the weight data is stored according to a first storage example 201, a less efficient read process may result. If the data locations can be arranged (or rearranged) and stored in a different order (such as example 202, 203), the weight data for the red, green and blue filters can be read in at once. This will reduce data acquisition time, which will result in reduced processing time during inference when it is necessary to read this data.
[0134] In example 202, 9 weights for a red filter 211, 9 weights for a green filter 212, and 9 weights for a blue filter 213 have been stored together. In this configuration, a read operation can obtain multiple weights to fill filters 221, 222, and 223 in a single read operation.
[0135] In example 203, the multiple weights are arranged so that all the 1's are grouped together, then all the 2's are grouped together, and so on. This is another data reconfiguration to improve access when performing the convolution process. The input image is multiplied by a 3×3 filter to perform the convolution process. The processing in this example is the same as that in example 202. The multiple weights stored in the same location include red, green, and blue stored together. In example 202, all weights from filters 221, 222, and 223 are stored together. In example 203, the weights from all filters 221 (e.g., weights 1, 2, etc.) are stored together. This different configuration produces the same desired effect.
[0136] Of course, although in Figure 2The example shown uses 3×3 filters, but the filters can be constructed to have practically any size, such as but not limited to implementing 5×5, 8×8 filters, in which case each filter would have a total weight value of 25, 64, etc.
[0137] Figure 3 Schematic diagram of a technique for distributing weight data among multiple NVM channels using a high bandwidth NVM according to the techniques described herein. Figure 3 The high bandwidth memory architecture 300 shown incorporates the use of channels 310, 311, 312 to allow data to be read from or stored to different NVM dies hosting a memory array simultaneously. These memory channels are used to transfer data to and from the dies implementing the non-volatile memory array along multiple paths. In some embodiments, a channel controller may be shared by multiple channels, i.e., may control multiple channels, such as Figure 8 As shown in 834 and 844, they control channels 0 to 3 and channels 4 to 7 respectively.
[0138] In an exemplary embodiment, if a storage system has 4 channels, or multi-channel NVM memory, the total weighted data length can be evenly distributed, or otherwise distributed among these memory channels (data length / channel). Of course, by using the above reference Figure 1 to Figure 2 The technology can maximize the utilization of page size. For example: each neural network channel has 288 weights, such as 288 red weights (e.g., 32 filters × 9 weights per filter), which can be distributed among 4 memory channels, resulting in 72 red weights per memory channel, or 72 red weights / 9 weights per filter to produce 8 red filters per memory channel. And so on, there are 8 green filters per memory channel; and 8 blue filters per memory channel.
[0139] Furthermore, different layers of a neural network will use different groups of weights. Figure 3As shown, for example, in a convolutional neural network (CNN), there are different layers 320A, 322A. For each layer, there are different filters 320B, 322B. Here, layer 0 is the first layer 320A in the convolutional neural network, and corresponds to the first layer of filters (weights) 320B stored in page 0. If page 0 is not large enough, these weight data will be stored in the next page. Again, weights can be of different types, and weights can be functions of different layers. For example, the weights associated with layer 0 320B include weights grouped according to red, green, and blue filters. Layer 1 322A includes weights grouped according to certain other paradigms defined by the neural network definition. In some embodiments, these weights corresponding to a first layer of a neural network can be based on a paradigm (e.g. Figure 2 201, 202 or 203) is stored, and the weights corresponding to a second layer of the neural network may be stored according to a different example.
[0140] Figure 4 Schematic diagram showing various approaches according to the techniques described herein for distributing weight data across multiple NVM channels via a high bandwidth NVM. Appropriate storage approaches according to the present techniques can provide for retrieval of weights for more than two weight groups (e.g., filters) without requiring an additional page of memory to be read. For example, weights can be stored so that retrieval of all groups of a layer can be performed without triggering an additional page of memory. Figure 4 In FIG. 1 , weight data belonging to multiple filters (filter 1 to filter 7) 401 to 408 can be read out through multiple memory channels (channel 0 to channel 3) 410 to 413. A memory channel is used to transfer data to and from the NVM die implementing the non-volatile storage array via multiple paths. In some embodiments, the controller can be shared by multiple channels, that is, it can control multiple channels, such as Figure 8 As shown in 834 and 844, they control channels 0 to 3 and channels 4 to 7 respectively.
[0141] In practice 400A, weights grouped according to filters may be assigned to individual memory channels. For example, weights for filter 1 401 and filter 2 402 are stored for retrieval by channel 0 410. Accordingly, weights from filters may be stored to or retrieved from multiple arrays by using multiple NVM channels simultaneously. In this configuration, weights belonging to different filters may be read by using different channels simultaneously. However, if it is desired to read weights from different groups assigned to the same channel (e.g., from Figure 4In the method 400A, filter 1 and filter 2 (both belonging to channel 0 410)) may need to generate multiple page reads.
[0142] In method 400B, the weights of the groups of filters are allocated to storage spaces across different channels. Figure 4 , the weights of filter 1 to filter 6 401 to 406 are distributed between each of the four available channels (channel 0 to channel 3) 410 to 413. In this approach, the weight data distributed between multiple channels can be read from the NVM array simultaneously through each of channel 0 to channel 3 410 to 413. Furthermore, the read operation of the NVM array for each channel has the ability to read the weight data for each filter, and when switching the read operation from one filter to the next filter, a page fetch is not required.
[0143] Figure 5 500 is a flow chart showing an example of the logic of a weight data storage operation that may be performed by an inference system, such as with reference to Figures 1 to 4 As described. Figure 6 This is a simplified functional block diagram of a representative neural network node (neuron) described herein, wherein the neural network node includes weight data stored in a high-bandwidth NVM and read out from the high-bandwidth NVM through AI inference system logic. This logic can be implemented using machine-executable instructions. These machine-executable instructions are stored in a memory (e.g., SRAM on-chip memory 805) or other memory accessible to the processor 810. The processor 810 is coupled to a logic layer die and multiple NVM dies. The logic layer die includes channel logic, which implements connections between multiple channels. These multiple channels transmit data to or from an accelerator core via at least one bus. These multiple NVM dies are stacked vertically on top of each other to form layers of vertically stacked NVM dies. Each NVM die includes at least one memory chip and multiple direct vertical connections that connect to a corresponding channel logic in the logic layer. In regard to Figures 5 to 7 After the discussion of Figure 8 In this example, a collection of weights for artificial intelligence-type neural network calculations downloaded from an external source (e.g., the Internet) is loaded into the high-bandwidth NVM of the inference system.
[0144] Please refer to Figure 5 , 6 7, during operation, an operation captures a neural network definition (including several layers and multiple nodes), each node is associated with a set of weights 602 (e.g., Wb, W1, W2, W3, and Wn) (operation 501). This definition can be stored in a high bandwidth NVM (e.g., Figure 8 802) or an auxiliary memory (e.g. Figure 8 803), or otherwise obtained from an external source off chip. Array weight data is determined for the neural network of this layer and is used to perform calculations (operation 502).
[0145] After the array weights are determined for the layer, these weights are distributed into a plurality of groups (operation 503) for use by one or more nodes of the neural network layer.
[0146] Next, the weights of these groups (e.g., 211, 212, 213) are assigned to multiple channels in the neural network definition (operation 504). For example, in operation 504, the weights for the red filter may be assigned to the red channel of a neural network. The resulting groups of weights for these channels are stored in a high-bandwidth NVM (e.g., memory 802) so that the weights for a particular channel can be stored together, so that the weights of two or more weight groups used to calculate an inference result for a node in a neural network layer are retrieved sequentially without requiring the reading of an additional page of memory (operation 505). This process includes checking whether nodes in further neural network layers are to be processed (operation 506), and if so, restarting operations 501 to 506 for the next batch of neural network nodes to be processed. If there are no further layers to be processed, then all weights of the neural network definition have been successfully stored.
[0147] therefore, Figure 5 The operation includes an operation on a neural network definition data defining a plurality of layers and a plurality of nodes, each node being associated with a set of weights. Also, Figure 5 As shown, after determining the weights to be used to calculate an inference result for multiple nodes in a layer, these weights are assigned to multiple weight groups, and these weight groups are assigned to multiple channels defined by the neural network. These weights are stored together for a specific channel, so that the weights of two or more weight groups used to calculate an inference result for a node in the neural network layer are sequentially retrieved without the need to read an additional page of memory. These operations loop back to operation 501 for processing the next layer of the neural network. As mentioned above Figure 4 As described, operation 505 may optionally include allocating or assigning weights belonging to certain groups of multiple memory channels across the multi-channel HBW storage architecture. If more neural network-like nodes are to be processed, operations 501 to 506 are repeated and may include loading the weights of the nodes of the next neural network-like layer.
[0148] Please refer to Figure 5, it will be appreciated that these steps may be combined, performed in parallel, or performed in a different order without affecting the functionality achieved. In some cases, the reader will appreciate that a reconfiguration of the steps will achieve the same result only if certain other changes are also made. In other cases, as the reader will appreciate, a reconfiguration of the steps will achieve the same result only if certain conditions are met. Furthermore, it will be appreciated that this flowchart only shows steps relevant to understanding the present technology, and it will be appreciated that many additional steps for achieving other functionality may be performed before, after, and between those steps shown.
[0149] Please refer to Figure 8 During the training process, the weights stored in the NVM die (e.g., weight memory 802) are adjusted by the processor chip 801 (e.g., CPU and AIAcc) based on the training data set. As training proceeds, the processor chip 801 will continue to update the values of these weights, and this value will be stored in the NVM. In some embodiments, the weights are fixed during the inference process.
[0150] Figure 8 801 (e.g., CPU and AIAcc), a first memory chip 803 (an excitation memory storing excitation data), and a second memory chip 802 (e.g., a weight memory storing weight data of a type of neural network). The processor chip 801 in this example includes a CPU or processor core 810, an accelerator core 811, an on-chip memory 805 (e.g., SRAM (or other types of memory)), a first I / O interface 813, and a second I / O interface 822. The on-chip memory 805 can be used as a working memory and as a cache. A bus system 820 provides intra-chip communication between multiple components of the processor chip 801.
[0151] The first memory chip 803 in this example includes a high-capacity volatile memory 840, such as DRAM or SRAM (or non-volatile memory, such as 3D NAND or other types of memory implemented by using charge capture storage technology). The first memory chip 803 includes a first memory I / O interface 812 for off-chip communication. Depending on the specific implementation of the memory chip 803 used, the first memory I / O interface 812 may include a high-speed serial interface, such as a Serial Peripheral Interface (SPI) compatible interface, or a parallel interface. In this example, a data path 815 is provided between the first memory I / O interface 812 and the first I / O interface 813 on the processor chip 801. According to an excitation function used to calculate an inference result, the first memory chip 803 can store excitation data. Reference Figure 7 Suitable excitation data may include stored data implementing an excitation function, the excitation function including one or more of a sigmoid function 702, a hyperbolic tangent (tanh) function 704, a linear rectification (ReLU) function 706, a leaky rectified linear unit activation (leakyReLU) function 708, and a maximum output (maxout) function 710.
[0152] Now continue with reference Figure 8 In this example, the second memory chip 802 includes a HBW NVM configured in one or more memory banks 830a, 830b, each of which may include one or more layers of NVM dies arranged in multiple channels. The NVM may be one of a phase change memory (PCM), a three-dimensional cross point memory (3D Xpoint), and a NAND flash memory. In other examples, the second memory chip 802 may include a NOR flash memory using a charge trapping memory technology or other appropriate random access technology, such as a resistive RAM (e.g., a metal oxide memory), a magnetic RAM, a ferroelectric random access memory FeRAM, a conductive bridge random access memory CBRAM, and the like.
[0153] The second memory chip 802 includes a memory I / O interface 814 for off-chip communication via a logic layer 804 to an I / O interface 813 on the processor chip 801. The logic layer 804 includes channel controllers 834, 844 that provide control of multiple channels forming one or more groups of high-speed data paths, and weighted data on the high-speed data paths can flow across interfaces 832a, 832b (exposed on a surface of the logic layer 804) and are complementary to interfaces 831a, 831b on a surface of the memory groups 830a, 830b of the NVM die, wherein the memory groups 830a, 830b are arranged in several layers directly connected by vertical connections 850a, 850b at these surfaces, and these surfaces are arranged between the IO-memory interfaces 832a, 832b and the memory-IO interfaces 831a, 831b. The direct vertical connections 850a, 850b may include multiple very short length copper via-to-via conductors, or other chip-to-chip contact technologies suitable for high speed, low latency and low power communication between chips. In an exemplary embodiment, two stacks are formed by stacking four NVM dies (each die has N / 8 through silicon via (TSV) I / Os) on a logic die; where N is the total number of TSV IOs and 8 is the number of dies; N / 8 is the IO per die. One NVM die has one channel; one channel is N / 8 through silicon via (TSV) I / Os. Each channel is completely independent, so each channel can operate independently. A controller can control multiple channels. An external controller can be provided by a Field Programmable Gate Array (FPGA) or System On A Chip (SoC) die (e.g., implementing processor chip 801).
[0154] If the on-chip SRAM is not large enough, DRAM is an option for bonding to the System in Package (SiP).
[0155] Thermal (heating) management can be used to ensure data retention.
[0156] As used herein, an AI accelerator (e.g., accelerator core 811) is a configurable logic that includes multiple elements designed or adapted to perform some or all of the arithmetic operations of AI inference operations. Configuration of the accelerator core may include loading all or a portion of a set of weights from memory 802 to be used to perform inference operations. In some embodiments, configuration of the accelerator core may include loading some or all of the computational graph of an inference model that defines the order and architecture of the operation of the inference model. The inference model may include a computational graph of a deep learning-like neural network, which in some examples has multiple fully connected and locally connected layers, activation functions, normalization functions, and the like.
[0157] An accelerator core may be implemented using configurable logic such as arrays of configurable cells used in field programmable gate arrays, where compiled computation graphs are configured using bit files. An accelerator core may be implemented using a mix of dataflow configurable logic and sequential processing configurable logic.
[0158] A runtime processor core (e.g., CPU 810) may execute a runtime program to coordinate the operations of the accelerator cores to achieve real-time inference operations, including data input / output operations, loading computational graphs, moving the set of weights to be used in the inference operation into and out of the accelerator cores, transmitting input data to the accelerator cores, and executing portions of multiple computations to obtain inference results.
[0159] Figures 9 to 11 An exemplary configuration of an inference system with high bandwidth NVM as described herein is provided, showing various configurations of the chips and connections between the chips, package interposers and external contacts. Other configurations may be implemented to suit a particular need.
[0160] Fig. 9A multichip module (MCM) 920 is shown, which includes a processor chip 901, a first memory chip 903 (e.g., an excitation memory for storing excitation data) and a second memory chip 902 (e.g., a weight memory for storing weight data of a neural network). The weight memory can be regarded as an HBW memory. In this example, the processor chip 901, the second memory chip 902 and the first memory chip 903 are arranged on an interposer 910 (or substrate), wherein the second memory chip 902 can be a HBW NVM for storing weights (e.g., weight data) used for neural network-like calculations, and the first memory chip 903 can be a dynamic random access memory (DRAM), a static random access memory (SRAM) or a NAND. However, DRAM and SRAM are currently the better choices for storing excitation data of excitation functions used for neural network-like calculations. This element is configured as a multichip module 920 in a single package.
[0161] The processor chip 901 may include a runtime processor core (eg, a CPU) and an accelerator core, such as an artificial intelligence accelerator (eg, AIAcc) or a neural processing unit (NPU).
[0162] In this example, the processor chip 901 includes an input / output interface 913 disposed on a surface of the chip 901. The input / output interface 913 is connected to the interconnection wires 911 on the interposer 910.
[0163] The first memory chip 903 includes an interface 912 for connecting to the interconnection wire 911 on the interposer 910. The second memory chip 902 includes an interface 914 for connecting to the interconnection wire 911 on the interposer 910. Fig. 9 Although depicted as a single entity, the second memory chip 902 may include a multi-layer stack in which memory cells are allocated on different layers and may be connected to vertical connectors, such as through silicon vias (TSVs), to connect to interconnect wiring 911 on the interposer 910.
[0164] Thus, the interconnect wiring 911 provides a portion of a data path between the first memory chip 903 , the second memory chip 902 , and the processor chip 901 .
[0165] exist Fig. 9 In the example shown, the processor chip 901 comprises a further input / output interface 922 for connecting to a plurality of external contact structures 921 of the multi-chip module 920 .
[0166] Fig.10 Another configuration of an inference system described herein is shown. This configuration includes a processor chip 1001, a first memory chip 1003 (e.g., an excitation memory storing excitation data), and a second memory chip 1002 (e.g., a weight memory storing weight data of a type of neural network), and the second memory chip 1002 can be considered as a HBW memory. In this example, the second memory chip 1002 includes individually layered NVM tube chips 1002a to 1002N, and an I / O tube chip 1004 disposed on a connection logic in a logic layer. The processor chip 1001, the I / O tube chip 1004 of the second memory chip 1002, and the first memory chip 1003 are disposed on an interposer 1010 (or substrate). This component is configured as a multichip module (MCM) 1020 in a single package.
[0167] The processor chip 1001 may include a runtime processor core (eg, a CPU) and an accelerator core, such as an artificial intelligence accelerator (eg, an AIAc) or a neural processing unit (NPU).
[0168] The second memory chip 1002 includes a plurality of non-volatile memory cells 1002a to 1002N stacked one on top of the other and stacked on top of the I / O die 1004. One such NVM die 1002a is shown including a chip-to-chip bonding surface on which an interface 1031 is exposed for connection to the I / O die 1004. The I / O die 1004 includes an interface 1032 exposed on a surface of the I / O die 1004 and complementary to the interface 1031 on the NVM die 1002a. In this example, direct vertical connections on these surfaces are provided between the memory interface 1032 and the interface 1031. The direct vertical connections may include very short length copper through-via to through-via conductors, or other chip-to-chip contact technologies suitable for high speed, low latency, and low power communication between chips.
[0169] Continuing to refer to the second memory chip 1002, another NVM die 1002b is described including a chip-to-chip bonding surface on which an interface 1041 (e.g., NVM-NVM interface) is exposed for connecting to the NVM die 1002a of the second memory chip 1002. The NVM die 1002a includes an interface 1042 (e.g., NVM-NVM interface) exposed on a surface of the NVM die 1002a and complementary to the interface 1041 on the NVM die 1002b. In this example, a direct vertical connection between these surfaces is provided between the NVM-NVM interface 1042 and the NVM-NVM interface 1041.
[0170] In some embodiments, an interposer layer provides connections between a plurality of vertically stacked direct vertical connections (e.g., NVM die 1002a to 1002N) to corresponding channel logic in a logic layer (e.g., I / O die 1004). In some embodiments, a plurality of solder bumps deposited onto chip pads of the logic layer (e.g., I / O die 1004) and the plurality of NVM die (e.g., 1002a to 1002N) provide connections to a device immediately below. In some embodiments, a plurality of backside interconnects have been deposited onto chip pads of the logic layer and wafer-to-wafer connections are provided between the plurality of NVM die and a device above. The AI inference storage device may be packaged as any of a 2.5D through silicon via (TSV) integrated circuit, a three-dimensional (3D) through silicon via (TSV) integrated circuit, and a three-dimensional (3D) system on chip (3D SOC) integrated circuit.
[0171] In this example, the processor chip 1001 includes an input / output interface 1013 disposed on the surface of the chip 1001. The input / output interface 1013 is connected to the interconnection wires 1011 on the interposer 1010.
[0172] The first memory chip 1003 includes an interface 1012 for connecting to the interconnection wire 1011 on the interposer 1010 .
[0173] Furthermore, the I / O die 1004 includes an interface 1014 for connecting to the interconnect wires 1011 on the interposer 1010 .
[0174] Therefore, the interconnect wiring 1011 provides a portion of the data path between the first memory chip 1003 and the second memory chip 1002 and the processor chip 1001 .
[0175] exist Fig.10 In the example shown, the processor chip 1001 comprises a further input / output interface 1022 for connecting to a plurality of external contact structures 1021 of the multi-chip module 1020 .
[0176] Fig.11Another configuration of an inference system described herein is shown. This configuration includes a processor chip 1101, a first memory chip 1103 (e.g., an excitation memory storing excitation data), and a second memory chip 1102 (e.g., a weight memory storing weight data of a type of neural network), and the second memory chip 1102 can be considered as an HB memory. In this example, the second memory chip 1102 includes individually layered non-volatile memory (NVM) dies 1102a to 1102N disposed on an I / O die 1104. The processor chip 1101, the I / O die 1104 of the second memory chip 1102, and the first memory chip 1103 are disposed on an interposer 1110 (or substrate). This component is configured as a multi-chip module (MCM) 1120 in a single package.
[0177] Processor chip 1101 may include a runtime processor core (eg, a CPU) and an accelerator core, such as an artificial intelligence accelerator (eg, AIAc) or a neural processing unit.
[0178] The second memory chip 1102 includes a plurality of non-volatile memory cells 1102a to 1102N stacked one on top of the other and stacked on an I / O die 1104. One such NVM die 1102a is depicted including a chip-to-chip bonding surface on which an interface 1131 is exposed for connection to the I / O die 1104. The I / O die 1104 includes an interface 1132 exposed on a surface of the I / O die 1104 and complementary to the interface 1131 on the NVM die 1102a. In this example, a direct vertical connection on the surface is provided between the interface 1132 and the interface 1131. The direct vertical connection may include a very short length copper through-via to through-via conductor, or other chip-to-chip contact technology suitable for high-speed, low-latency, and low-power communication between chips.
[0179] Continuing with reference to the second memory chip 1102, another NVM die 1102b is shown including a chip-to-chip bonding surface on which an interface 1141 (e.g., NVM-NVM interface) is exposed to connect to the NVM die 1102a of the second memory chip 1102. The NVM die 1102a includes an interface 1142 (e.g., NVM-NVM interface) exposed on a surface of the NVM die 1102a and complementary to the interface 1141 on the NVM die 1102b. In this example, a direct vertical connection between these surfaces is provided between the NVM-NVM interface 1142 and the NVM-NVM interface 1141.
[0180] In some embodiments, interposer 1110 provides connections between multiple direct vertical connections (e.g., NVM die 1102a to 1102N) stacked vertically to corresponding channel logic in a logic layer (e.g., I / O die 1104). In some embodiments, multiple solder bumps deposited onto chip pads of the logic layer (e.g., I / O die 1104) and multiple NVM die (e.g., 1102a to 1102N) provide connections to a device immediately below. In some embodiments, multiple backside interconnects have been deposited onto chip pads of this logic layer, and multiple NVM dies provide wafer-to-wafer connections to a device above. The AI inference storage device can be packaged as any of a 2.5D through silicon via (TSV) integrated circuit, a three-dimensional (3D) through silicon via (TSV) integrated circuit, and a three-dimensional (3D) system on chip (3D SOC) integrated circuit.
[0181] In this example, the processor chip 1101 includes an input / output interface 1113 disposed on a surface of the chip 1101. The input / output interface 1113 is connected to the interconnection wires 1111 on the interposer 1110.
[0182] The first memory chip 1103 includes an interface 1112 for connecting to the interconnection wires 1111 on the interposer 1110 .
[0183] Furthermore, the I / O die 1104 includes an interface 1114 for connecting to the interconnect wires 1111 on the interposer 1110 .
[0184] Therefore, the interconnect wiring 1111 provides a portion of the data path between the first memory chip 1103 and the second memory chip 1102 and the processor chip 1101 .
[0185] exist Fig.11 In the example shown, the multi-chip module (MCM) 1120 comprises a further input / output interface 1152 for connecting to a plurality of external contact structures 1151 of the multi-chip module 1120 .
[0186] Other embodiments of the methods described in this paragraph may include a non-transitory computer-readable storage medium storing instructions executable by a processor for performing any of the above methods. Yet another embodiment of the methods described in this paragraph may include a system comprising a memory and one or more processors operable to execute instructions stored in the memory to perform any of the above methods.
[0187] Any data structures and codes described or referenced above are stored on a computer-readable storage medium according to various embodiments. A computer-readable storage medium can be any device or medium that can store code and / or data for use by a computer system. This includes but is not limited to volatile memory, non-volatile memory, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), magnetic and optical storage devices (such as disk drives, tapes, CDs (optical disks), DVDs (digital versatile disks or digital video disks)), or other media capable of storing computer-readable media now known or later developed.
[0188] As used herein, a network node (including a plurality of network nodes represented by client-side nodes and server-side nodes) is an application of a virtual device (which is connected to a network) hosted on an active electronic device or executed in an active electronic device (e.g., a cloud-based platform), and is capable of transmitting, receiving, or forwarding information through a physical medium for a channel on a network with the support of a computer program (e.g., a server and a client), and has support for higher network layers such as media access control addresses and protocol stacks. The network may include a network using Internet Protocol addresses, or other types of network layer addresses. In some embodiments, the network includes the Internet. Examples of electronic devices that can host network nodes include all kinds of computers, workstations, laptops and desktop computers, handheld computers and smart phones, and cloud-based platforms.
[0189] A byte is a basic storage unit used in many integrated circuit logic and memory circuits and is composed of eight bits. The basic storage unit may have other sizes, including, for example, one bit, two bits, four bits, sixteen bits, and so on. Therefore, the description of weight data optimization of high bandwidth (HBW) non-volatile memory using the term byte in the AI inference system described above and in other examples described herein generally applies to circuits using storage units of different sizes, as can be described by replacing the term byte or such group of bytes with a storage unit or group of storage units. Again, in some embodiments, storage units of different sizes may be used in a single command sequence, such as one or more four-bit storage units combined with eight-bit storage units.
[0190] A plurality of flow charts describing the logic executed by the memory controller or by the storage device are described herein. This logic can be implemented using a programmed processor, and the processor is programmed using a computer program stored in a memory accessible by the computer system and executable by the processor. Among them, it is through dedicated logic hardware, including field programmable integrated circuits, and through a combination of dedicated logic hardware and computer programs. Through all the flow charts herein, it will be understood that multiple steps can be combined, multiple steps can be executed in parallel, or multiple steps can be executed in a different order without affecting the functions achieved. In some cases, as the reader will understand, the reconfiguration of steps can achieve the same result only when it is determined that some other changes have been made. In other cases, as the reader will understand, the reconfiguration of steps will achieve the same result only when certain conditions are met. Furthermore, it will be understood that these flow charts herein only show steps related to the understanding of the present technology, and it will be understood that many additional steps for achieving other functions can be performed before, after, and between those steps shown.
[0191] Although the present technology is disclosed with reference to the preferred embodiments and examples described in detail above, it should be understood that these examples are intended to present an illustrative rather than restrictive meaning. Considering that those skilled in the art will easily produce modifications and combinations, these modifications and combinations will fall within the spirit of the present technology and the scope of the following patent applications.
Claims
1. A method for storing weight data for use in calculating node values during an artificial intelligence (AI) inference operation performed by a class of neural networks, the method comprising the steps of: Receiving a neural network definition, the neural network definition defining the neural network having multiple layers, each layer including multiple neural network nodes, each neural network node using one or more weights to compute a result for the neural network node during an inference operation by applying a function to (i) the one or more weights and (ii) an input to the neural network node; For one of the layers defined by the neural network definition, determining a set of weights for computing a neural network inference result for use by each of the neural network nodes in the layer; as well as The set of weights determined for the layer is stored in a page of memory so that for each of the neural network nodes in the layer, any weights of the set of weights used to calculate the neural network inference results are stored together in the paged memory so as to be retrieved together.
2. The method according to claim 1 also includes processing a next layer in the definition of the type of neural network so that a second set of weights used to calculate the inference results of the type of neural network for the next layer are also stored in the paged memory for being retrieved together.
3. A method according to claim 1, wherein multiple weights in the group of weights are assigned to multiple weight groups, and each weight group is assigned to a channel in the definition of the type of neural network, and wherein the storage step also includes storing multiple weights of a specific channel together, so that for each of the type of neural network nodes in the layer, the weights of more than two weight groups used to calculate the inference results of the type of neural network are retrieved sequentially without the need to read an additional page of memory.
4. The method according to claim 3, wherein the step of extracting the weights of the more than two weight groups further comprises extracting all groups of a layer without requiring reading of an additional page of memory.
5. The method according to claim 3, wherein each weight group corresponds to the specific channel of the neural network.
6. The method of claim 5, wherein each channel of the neural network corresponds to a filter populated by the weights of the respective weight group.
7. An artificial intelligence (AI) inference storage device, comprising: a plurality of non-volatile memory (NVM) dies, each of the NVM dies including at least one memory array, and a plurality of channel logics connected to a corresponding one to provide storage in the memory array and retrieval from the memory array; A neural processing unit (NPU) implementing an accelerator core connected via the corresponding channel logic for transferring data to and from the memory arrays is configured to perform the following operations, including: Receiving a neural network definition, the neural network definition defining a neural network having multiple layers, each layer including a plurality of neural network nodes, each neural network node using one or more weights to compute a result for the neural network node during an inference operation by applying a function to (i) the one or more weights and (ii) an input to the neural network node; For one of the layers defined by the neural network definition, determining a set of weights for computing a neural network inference result for use by each of the neural network nodes in the layer; and The set of weights determined for the layer of memory on a page of these storage arrays is stored so that for each of these neural network-like nodes in the layer, any weights of the set of weights used to calculate the neural network inference results are stored together in the memory of the page for being retrieved together.
8. The AI inference storage device according to claim 7, wherein multiple weights in the group of weights are assigned to multiple weight groups, and each weight group is assigned to a channel in the type of neural network definition, and wherein the storage operation also includes storing multiple weights of a specific channel together, so that for each of the type of neural network nodes in the layer, the weights of more than two weight groups used to calculate the type of neural network inference results are sequentially retrieved without the need to read an additional page of memory of these storage arrays.
9. The AI inference storage device of claim 8, wherein the fetching operation of the weights of the two or more weight groups further comprises fetching all groups of a layer without requiring reading of an additional page of memory of the storage arrays.
10. The AI inference storage device of claim 7, wherein the operations further include retrieving each weight in the set of weights from a previous storage location in the memory before storing the set of weights determined in a layer of memory for a page of the memory arrays; for reconfiguring weight data in at least one of the NVM dies.
