Storage and calculation integrated device and calibration method thereof
By introducing a redundant calibration unit into the integrated storage and computing technology to calibrate the intermediate components, the problem of loss of accuracy of calculation results in the integrated storage and computing technology of memristor is solved, achieving high reliability and low-cost error calibration, and advancing the Practical application of technology.
Patent Information
- Application Number
- CN202110823220.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-21
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-07-21
AI Technical Summary
Memristor-based integrated storage and calculation technology has difficulty in achieving highly reliable and low-cost error calibration due to the randomness and environmental deviations in analog domain calculations at the device and system levels, resulting in loss of accuracy and errors in calculation results.
A mid-level and medium-granularity calibration method is proposed. By introducing redundant calibration units to calibrate the simulation domain calculation results of the intermediate-level components, the weight value of the memristor array is adjusted to ensure the accuracy of the system calculation results and flexibly configure it. Hardware overhead to enable on-demand design.
It achieves high reliability and versatility of the integrated storage and computing system, reduces additional hardware overhead, solves the key bottleneck in the practical application of integrated storage and computing technology, and ensures the normal operation of the system.
Smart Images

Figure CN113553293B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to a storage and computing integrated device and a calibration method thereof. Background Art
[0002] The memristor-based integrated storage and computing device can directly perform in-situ multiplication and accumulation operations at the storage location, realizing the device-level integration of computing and storage, breaking the computing power and energy efficiency limitations of traditional hardware platforms, and is one of the most promising next-generation hardware chip technologies. Domestic and foreign companies and scientific research institutions have invested a lot of manpower and material resources. After nearly ten years of development, the memristor-based integrated storage and computing technology has gradually entered the prototype demonstration stage of actual chips and systems from the theoretical simulation stage. Summary of the invention
[0003] At least one embodiment of the present disclosure provides a calibration method for a storage-computing integrated device, wherein the storage-computing integrated device includes a first processing unit, the first processing unit includes a first computing memristor array and a first calibration memristor array, the first computing memristor array is configured to receive first computing input data, and calculate the first computing input data to obtain first output data; the first calibration memristor array is configured to receive first calibration input data, and calibrate the first output data according to the first calibration input data to obtain first calibration output data; the first processing unit is configured to output the first calibration output data, and the calibration method includes: determining a first computing weight matrix corresponding to the first computing memristor array through off-chip training, and writing the first computing weight matrix into the first computing memristor array; based on the first computing memristor array and the first computing weight matrix written with the first computing weight matrix, performing on-chip training on the first calibration memristor array to adjust the weight value of the first calibration memristor array.
[0004] For example, in the calibration method provided in at least one embodiment of the present disclosure, the first computational memristor array includes M rows*N columns of memristor units, the first calibration memristor array includes K rows*N columns of memristor units, the i-th column of the first calibration memristor array is connected in series with the i-th column of the first computational memristor array, the i-th column of the memristor unit of the first calibration memristor array is configured to calibrate the first output data of the i-th column of the first computational memristor array according to the first calibration input data to obtain the first calibration output data of the i-th column, M, N, K, i are all positive integers, and 1≤i≤N, based on the first computational memristor array in which the first computational weight array is written and the first computational weight matrix, performing on-chip training on the first calibration memristor array to adjust the weight value of the first calibration memristor array, including: determining first training target output data according to first training computational input data and the first computational weight matrix; inputting the first training computational input data into the first computational memristor array, and inputting first training calibration input data into the first calibration memristor array to obtain first training calibration output data; and adjusting the weight value of the memristor unit in the first calibration memristor array corresponding to the column to be calibrated in the first computational memristor array according to the deviation between the first training calibration output data and the first training target output data.
[0005] For example, in the calibration method provided in at least one embodiment of the present disclosure, the first calibration memristor array includes a fixed deviation calibration subarray, the first training calibration input data includes fixed training calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, and inputting the first training calibration input data into the first calibration memristor array includes: inputting the fixed training calibration input data into the fixed deviation calibration subarray.
[0006] For example, in the calibration method provided in at least one embodiment of the present disclosure, the first calibration memristor array includes a dynamic deviation calibration subarray, the first training calibration input data includes dynamic training calibration input data, the dynamic deviation calibration subarray includes at least 1 row * N columns of memristor units, and the first training calibration input data is input into the first calibration memristor array, including: determining the dynamic training calibration input data based on the first training calculation input data; and inputting the dynamic training calibration input data into the dynamic deviation calibration subarray.
[0007] For example, in the calibration method provided in at least one embodiment of the present disclosure, the first calibration memristor array includes a fixed bias calibration subarray and a dynamic bias calibration subarray, the first training calibration input data includes fixed training calibration input data and dynamic training calibration input data, the fixed bias calibration subarray includes 1 row*N columns of memristor units, the dynamic bias calibration subarray includes at least 1 row*N columns of memristor units, and inputting the first training calibration input data into the first calibration memristor array includes: inputting the fixed training calibration input data into the fixed bias calibration subarray; determining the dynamic training calibration input data based on the first training calculation input data; and inputting the dynamic training calibration input data into the dynamic bias calibration subarray.
[0008] For example, in the calibration method provided in at least one embodiment of the present disclosure, inputting the fixed training calibration input data into the fixed deviation calibration subarray includes: inputting 5%-20% of the maximum value of the first training calculation input data into the fixed deviation calibration subarray as the fixed training calibration input data.
[0009] For example, in the calibration method provided in at least one embodiment of the present disclosure, before performing on-chip training on the first calibration memristor array based on the first computational memristor array in which the first computational weight matrix is written and the first computational weight matrix to adjust the weight value of the first calibration memristor array, the calibration method also includes: determining at least one memristor cell in a critical weight position in the i-th column of the first computational memristor array, and setting the input of at least one memristor cell in the i-th column of the dynamic deviation calibration subarray to be the same as the input of at least one memristor cell in the i-th column of the first computational memristor array at a critical weight position, and determining the dynamic training calibration input data based on the first training computational input data, including: using the first training computational input data of the at least one memristor cell in the critical weight position in the i-th column of the first computational memristor array as the dynamic training calibration input data of at least one memristor cell in the i-th column of the dynamic deviation calibration subarray.
[0010] For example, in the calibration method provided in at least one embodiment of the present disclosure, before performing on-chip training on the first calibration memristor array based on the first computational memristor array in which the first computational weight matrix is written and the first computational weight matrix to adjust the weight value of the first calibration memristor array, the calibration method also includes: determining at least one row of memristor cells in the first computational memristor array that are at a critical weight position, and setting the input of at least one row of memristor cells of the dynamic deviation calibration subarray to be the same as the input of at least one row of memristor cells in the first computational memristor array that are at a critical weight position, and determining the dynamic training calibration input data based on the first training computational input data, including: using the first training computational input data of the at least one row of memristor cells in the first computational memristor array that are at a critical weight position as the dynamic training calibration input data of at least one row of memristor cells of the dynamic deviation calibration subarray.
[0011] For example, in the calibration method provided in at least one embodiment of the present disclosure, based on the first computational memristor array in which the first computational weight matrix is written and the first computational weight matrix, on-chip training is performed on the first calibration memristor array to adjust the weight value of the first calibration memristor array, and also includes: before inputting the first training computational input data into the first computational memristor array and inputting the first training calibration input data into the first calibration memristor array to obtain the first training calibration output data, inputting the first training computational input data into the first computational memristor array to obtain the first training output data; determining the columns that need to be calibrated in the first computational memristor array based on the deviation between the first training output data and the first training target output data, and connecting the memristor units in the first calibration memristor array corresponding to the columns that need to be calibrated in the first computational memristor array in series with the columns that need to be calibrated in the first computational memristor array.
[0012] For example, in the calibration method provided in at least one embodiment of the present disclosure, the storage and computing integrated device also includes a second processing unit, the second processing unit includes a second computing memristor array and a second calibration memristor array, the second computing memristor array is configured to receive second computing input data determined according to the first calibration output data, and calculate the second computing input data to obtain second output data; the second calibration memristor array is configured to receive second calibration input data, and calibrate the second output data according to the second calibration input data to obtain second calibration output data; the second processing unit is configured to output the second calibration output data, and the calibration method also includes: determining the second computing weight matrix corresponding to the second computing memristor array through off-chip training, and writing the second computing weight matrix into the second computing memristor array; based on the computing output of the second computing memristor array with the second computing weight matrix written and the second computing weight matrix, on-chip training the second calibration memristor array to adjust the weight value of the second calibration memristor array.
[0013] For example, in the calibration method provided in at least one embodiment of the present disclosure, the second processing unit is coupled to the first processing unit, and in the process of performing on-chip training on the second calibration memristor array based on the second computational memristor array in which the second computational weight matrix is written and the second computational weight matrix to adjust the weight value of the second calibration memristor array, first training target output data is determined according to first training computational input data and the first computational weight matrix, and the first training target output data is used as second training input data for the second computational memristor array, or, when the first calibration memristor array is trained, the first training computational input data is input into the first computational memristor array, and the first training calibration input data is input into the first calibration memristor array to obtain first training calibration output data, and the first training calibration output data is used as second training input data for the second computational memristor array.
[0014] For example, in the calibration method provided by at least one embodiment of the present disclosure, each memristor unit in the first calibration memristor array is configured to be able to achieve both positive weight and negative weight.
[0015] At least one embodiment of the present disclosure also provides a storage and computing integrated device, including a first processing unit, the first processing unit including a first computing memristor array and a first calibration memristor array, the first computing memristor array is configured to receive first computing input data, and calculate the first computing input data to obtain first output data; the first calibration memristor array is configured to receive first calibration input data, and calibrate the first output data according to the first calibration input data to obtain first calibration output data; the first processing unit is configured to output the first calibration output data.
[0016] For example, in the storage and computing integrated device provided by at least one embodiment of the present disclosure, the first computing memristor array includes M rows and N columns of memristor units, the first calibration memristor array includes K rows and N columns of memristor units, the i-th column of the first calibration memristor array is connected in series with the i-th column of the first computing memristor array, and the memristor units in the i-th column of the first calibration memristor array are configured to calibrate the first output data of the i-th column of the first computing memristor array according to the first calibration input data to obtain the first calibration output data of the i-th column, where M, N, K, and i are all positive integers, and 1≤i≤N.
[0017] For example, in the storage and computing integrated device provided by at least one embodiment of the present disclosure, the first calibration memristor array includes a fixed deviation calibration subarray, the first calibration input data includes fixed calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, the i-th column of the fixed deviation calibration subarray is connected in series with the i-th column of the first computing memristor array, and the memristor units of the i-th column of the fixed deviation calibration subarray are configured to calibrate the first output data of the i-th column of the first computing memristor array according to the fixed calibration input data to obtain the first calibration output data of the i-th column.
[0018] For example, in the storage-computing integrated device provided by at least one embodiment of the present disclosure, the first calibration memristor array includes a dynamic deviation calibration subarray, the first calibration input data includes dynamic calibration input data, the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units, the i-th column of the dynamic deviation calibration subarray is connected in series with the i-th column of the first computing memristor array, the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is determined based on the first computing input data corresponding to the M memristor units in the i-th column of the first computing memristor array, and the at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is configured to calibrate the first output data of the i-th column of the first computing memristor array based on the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray to obtain the first calibration output data of the i-th column.
[0019] For example, in the storage-computing integrated device provided in at least one embodiment of the present disclosure, the first calibration memristor array includes a fixed deviation calibration subarray and a dynamic deviation calibration subarray, the first calibration input data includes fixed calibration input data and dynamic calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units, the i-th column of the fixed deviation calibration subarray and the i-th column of the dynamic deviation calibration subarray are connected in series with the i-th column of the first computing memristor array, and the i-th column of the dynamic deviation calibration subarray is connected to the i-th column of the dynamic deviation calibration subarray. The dynamic calibration input data corresponding to at least one memristor unit is determined based on the first computing input data corresponding to the M memristor units in the i-th column of the first computing memristor array, and the memristor units in the i-th column of the fixed deviation calibration subarray and at least one memristor unit in the i-th column of the dynamic deviation calibration subarray are configured to calibrate the first output data of the i-th column of the first computing memristor array based on the fixed calibration input data and the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray, respectively, to obtain the first calibration output data of the i-th column.
[0020] For example, in the storage and computing integrated device provided in at least one embodiment of the present disclosure, the fixed calibration input data is 5%-20% of the maximum value of the first calculation input data.
[0021] For example, in the storage and computing integrated device provided by at least one embodiment of the present disclosure, the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is the same as the first computing input data corresponding to at least one memristor unit in the i-th column of the first computing memristor array at a critical weight position.
[0022] For example, in the storage and computing integrated device provided by at least one embodiment of the present disclosure, the dynamic calibration input data corresponding to at least one row of memristor units of the dynamic deviation calibration subarray is the same as the first computing input data corresponding to at least one row of memristor units at the key weight position of the first computing memristor array. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure.
[0024] Figure 1 A schematic diagram of a memristor crossbar array structure is shown;
[0025] Figure 2 A schematic diagram of a processing unit of a storage-computing integrated device is shown;
[0026] Figure 3 The figure shows a schematic diagram of a storage and computing system based on a memristor;
[0027] Figure 4A illustrates a schematic diagram of a low-level, fine-grained component-level calibration approach;
[0028] Figure 4B illustrates a schematic diagram of a high-level, coarse-grained system-level calibration approach;
[0029] Figure 4C A schematic diagram of a medium-level, medium-granularity calibration method for an intermediate-level component provided by an embodiment of the present disclosure;
[0030] Figure 5 A schematic diagram of a processing unit of a storage-computing integrated device provided in one embodiment of the present disclosure;
[0031] Figure 6 A flowchart of a calibration method for a storage and computing integrated device provided in one embodiment of the present disclosure;
[0032] Figure 7 A schematic diagram of an example of a first processing unit provided in an embodiment of the present disclosure;
[0033] Figure 8 A schematic diagram of an example of dynamically determining dynamic training calibration input data provided by an embodiment of the present disclosure;
[0034] Fig. 9A A flowchart of an example of a calibration method provided by at least one embodiment of the present disclosure;
[0035] Fig. 9BA flowchart of another example of a calibration method provided by at least one embodiment of the present disclosure;
[0036] Fig. 10A A schematic diagram of an independent parallel calibration method provided by at least one embodiment of the present disclosure;
[0037] Fig. 10B A schematic diagram of a step-by-step calibration method provided for at least one embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0039] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not indicate quantity restrictions, but indicate that there is at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0040] The present disclosure is described below by several specific embodiments. In order to keep the following description of the embodiments of the present invention clear and concise, the detailed description of known functions and known components may be omitted. When any component of the embodiments of the present invention appears in more than one accompanying drawings, the component is represented by the same reference numeral in each of the accompanying drawings.
[0041] The memristor crossbar array structure is the analog domain computing core of the memristor storage and computing device. For example, Figure 1 FIG. 1 is a schematic diagram of a memristor crossbar array structure 100. Figure 1As shown, the memristor crossbar array structure 100 may include a plurality of memristors arranged in a crossbar array, by arranging input data into an input vector X (for example, including Figure 1 The x1, x2, ..., x shown n , and the input vector can be a voltage with encoded amplitude, width or number of pulses), the weight matrix is encoded as the memristor conductance value G (for example, including Figure 1 The g shown 11 , g 21 ,……,g 1n ,as well as Figure 1 g not shown m1 , g m1 ,……,g mn ), using a highly parallel, low-power array read operation to obtain an output current I (e.g., including Figure 1 The I1, I2, ..., I m ), can realize the common multiplication and accumulation calculation in deep learning, and then accelerate the matrix-vector multiplication. For example, according to Kirchhoff's law, the output current of the memristor cross array structure can be obtained according to the following formula: I = G × V. The above multiplication and accumulation calculation process is implemented in the analog domain using physical laws. Unlike the digital circuit implementation of Boolean logic, it does not require frequent memory access to move weight data, which solves the von Neumann bottleneck of the classical computing system and can achieve high-computing power and high-efficiency intelligent computing tasks.
[0042] Memristor crossbar arrays can be used to construct the basic processing element (PE) of a storage-computing device. For example, Figure 2 FIG. 2 is a schematic diagram of a processing unit 200 of a storage and computing integrated device. Figure 2 As shown, the processing unit 200 may include an analog domain part and a digital domain part. The analog domain part implements analog calculation based on analog signals, and the input, control, and output of the analog domain are all digital signals; the digital domain part controls and cooperates with the functions of the analog domain part and interacts with the outside. For example, Figure 2 As shown, the analog domain part includes an input module 210, a memristor array 220, an output module 230 and a power supply module 240. The input module 210 is a related analog circuit for implementing the input vector function; the memristor array 220 is a memristor cross array (e.g. Figure 1 The memristor crossbar array structure 100 shown in FIG. 1 can be written into a weight matrix and perform multiplication and accumulation calculations; the output module 230 is used to implement the output vector (eg Figure 1 The power supply module 240 is a basic analog power supply circuit. For example, the digital domain part may include a controller, an input buffer, an output buffer, a digital post-processing module, and an interface module, etc. ( Figure 1 (not shown in the figure). It should be noted that Figure 1 The processing unit 200 shown is only exemplary and not a limitation of the present disclosure. The processing unit may increase, decrease or deform modules according to actual conditions.
[0043] Figure 3 FIG. 3 is a schematic diagram of a memory-computing integrated system 300 based on a memristor. For example, the memory-computing integrated system 300 may be a memory-computing integrated chip. Figure 3 As shown, the storage and computing integrated system 300 includes a plurality of processing unit modules 310 and a plurality of functional units 320. Figure 3 As shown, each processing unit module 310 includes multiple processing units 311 and multiple functional modules 312. For example, the processing unit 311 can be Figure 2 In the processing unit 200 shown, the multiple functional modules 312 are implemented by digital circuits and may include one or more of the following: an interconnection module, an interface module, a control module, etc. For example, the multiple functional units 320 are implemented by digital circuits and may include one or more of the following: an interconnection unit, a main control unit, an on-chip storage unit, a routing unit, an interface unit, a clock unit, a power supply unit, etc. It should be noted that Figure 3 The storage and computing integrated system 300 shown is only exemplary and not a limitation of the present disclosure. The storage and computing integrated system can increase, decrease and transform units or modules according to actual conditions. In the storage and computing integrated system based on memristors, all signal processing and control implemented in the digital domain are very stable, but the analog calculations implemented in the analog domain may be affected by the natural randomness, non-ideal characteristics, array parasitic parameters of the memristor, or by environmental deviations and fluctuations such as process, power supply, and temperature, thereby deviating from the ideal function and output when working at the device level (memristor), circuit level (analog circuit module), array level, and system level. These errors, noise, etc. will cause loss of precision and errors in the calculation results, making the hardware system unable to work correctly. For example, in Figure 3 Each processing unit 311 is shown as Figure 2 In the case of the processing unit 200 shown in FIG. 1 , the input module, memristor array, output module and power supply module in each processing unit 311 may have errors and disturbances. Figure 3 The memristor-based storage and computing integrated system shown includes multiple processing units 311. Errors and disturbances will continue to accumulate, thus seriously affecting the normal operation of the system, and calibration is required at this time.
[0044] For example, Figures 4A-4CThe diagram shows a schematic diagram of the calibration method. Traditional calibration methods can be divided into two categories. The first type of calibration method is a low-level, fine-grained component-level calibration, which ensures that each component works reliably and accurately by calibrating all potential sources of errors and fluctuations, thereby ensuring that the system including multiple components can work reliably and accurately. For example, multiple memristors are used to jointly characterize a weight unit, and the average effect is used to offset the influence of randomness; a new unit array structure is designed to alleviate the parasitic parameters of the array; the circuit design size is increased proportionally to alleviate process deviations; a calibration circuit unit is introduced to compensate and calibrate the accuracy of the analog circuit, etc. For example, Figure 4A A schematic diagram of a low-level, fine-grained component-level calibration method is shown, where black circles indicate calibration locations. Figure 4A In the first step, each module in the analog domain of the processing unit is calibrated to ensure that the processing unit works reliably and accurately, thereby ensuring that the system including multiple processing units can work reliably and accurately. The second type of calibration method is a high-level, coarse-grained system-level calibration. In the second type of solution, the focus is not on the specific source of errors and fluctuations, but on the overall performance of the system, emphasizing the correct operation and output of the system functional level. For example, the algorithm and the system are combined for joint optimization, the key layer weights or all weights are trained on-chip, the integrated learning method is used, and more hardware resources are used to implement the same algorithm. For example, Figure 4B A schematic diagram of a high-level, coarse-grained system-level calibration approach is shown, where black circles indicate calibration locations. Figure 4B In the paper, the memristor-based storage and computing system is calibrated through algorithm optimization and process improvement. However, the first type of calibration method has high overhead, high cost, and high design and implementation complexity; the second type of calibration method usually has high requirements on device characteristics, and the calibration reliability is difficult to guarantee. It can only be proved to work in a limited network structure and cannot be extended to a wider and more complex network model. In addition, some specific second type of calibration methods can only be compatible with device-level errors. If integrated learning methods are used, the hardware overhead will be doubled.
[0045] In order to realize a highly reliable and low-cost universal storage-computing integrated analog computing error calibration, the present disclosure proposes a medium-level and medium-granularity calibration method for intermediate-level components. In the medium-level and medium-granularity calibration method for intermediate-level components proposed in the present disclosure, the analog domain calculation results of the intermediate-level components are calibrated by introducing redundant calibration units, thereby ensuring that the system can work reliably and accurately, and because only the introduced redundant calibration units are adjusted without changing the weight matrix implemented by the existing memristor array, the hardware overhead can be flexibly configured according to the requirements of calibration accuracy to achieve on-demand design. For example, Figure 4CA schematic diagram of a medium-level, medium-granularity calibration method for an intermediate-level component provided by an embodiment of the present disclosure, wherein a black circle indicates a calibration position, Figure 4C In the process, the analog domain calculation results of each processing unit are calibrated. Since the errors of various underlying analog components will eventually be reflected in the simulation calculation results, calibrating the analog domain calculation results is equivalent to calibrating each underlying analog component at the same time, which can ensure the accuracy of each calculation result at the processing unit level, thereby ensuring the normal operation of the system.
[0046] The medium-level, medium-granularity calibration method for intermediate-level components proposed in the present disclosure and its embodiments and corresponding examples are described in detail below in conjunction with the accompanying drawings.
[0047] Figure 5 A schematic diagram of a processing unit of a storage-computing integrated device provided in one embodiment of the present disclosure. Figure 6 This is a flow chart of a calibration method for a storage and computing integrated device provided by an embodiment of the present disclosure. Figure 5 As an example, the storage and computing device shown in FIG. Figure 6 The calibration method shown is described in detail.
[0048] For example, Figure 5 As shown, the storage and computing integrated device includes a first processing unit 500, and the first processing unit 500 includes a first computing memristor array 510 and a first calibration memristor array 520. The first computing memristor array 510 is configured to receive first computing input data, and calculate the first computing input data to obtain first output data; the first calibration memristor array 520 is configured to receive first calibration input data, and calibrate the first output data according to the first calibration input data to obtain first calibration output data; the first processing unit 500 is configured to output first calibration output data.
[0049] For example, the first computational memristor array 510 may be Figure 2 The memristor array 220 shown. The first calculation input data may be an encoded voltage, and the first calculation memristor array 510 performs multiplication and accumulation calculations to obtain first output data, and the first output data is a current value.
[0050] For example, the first calibration memristor array 520 may be a memristor crossbar array, the first calibration input data may be an encoded voltage, and the first calibration memristor array 520 may calibrate a fixed bias deviation and a dynamic deviation of the first output data.
[0051] It should be noted that, for the sake of clarity, Figure 5The first processing unit 500 of the storage-computing integrated device is only schematically shown, and only some components of the first processing unit 500 are shown. In fact, the storage-computing integrated device may include multiple basic processing units similar to the first processing unit 500 and other possible components (for example, Figure 3 The first processing unit 500 may also include other possible components (e.g., Figure 2 various analog circuits shown).
[0052] In this case, for example, Figure 6 As shown, the calibration method 600 includes step S610 and step S620.
[0053] Step S610 : determining a first computational weight matrix corresponding to the first computational memristor array 510 through off-chip training, and writing the first computational weight matrix into the first computational memristor array 510 .
[0054] Step S620 : Based on the first computational memristor array 510 written with the first computational weight matrix and the first computational weight matrix, on-chip training is performed on the first calibration memristor array 520 to adjust the weight values of the first calibration memristor array 520 .
[0055] For step S610, the first calculation weight matrix may be encoded as the conductance value of the first calculation memristor array.
[0056] For step S620, the calculation output of the first calculation memristor array 510 written with the first calculation weight matrix can be regarded as the actual first output data. The ideal target output data can be determined using the first calculation weight matrix. There is a deviation between the actual first output data and the ideal target output data. The first calibration memristor array 520 is trained on-chip. The deviation can be reduced by adaptively adjusting the weight value of the first calibration memristor array 520 until the deviation reaches a suitable range, thereby achieving the purpose of calibration.
[0057] For example, the calibration method 600 can be integrated into a tool chain such as a compiler of a system to achieve full process automation. In this case, the additional hardware overhead introduced is only the first calibration memristor array 520 and a simple digital control circuit ( Figure 5 not shown).
[0058] For example, the on-chip training may adopt a linear regression method or other algorithms to adjust the weight value of the first calibration memristor array 520 so that the actual first output data approaches the ideal target output data to achieve a calibration effect.
[0059] For example, the order of adjusting the weight value of the first calibration memristor array 520 may be in parallel or in series, or in other possible order, and the embodiments of the present disclosure do not limit this. For example, the operation of adjusting the weight value of the first calibration memristor array 520 may be a precise quantitative update with a read check, or a qualitative sign update, or other operation modes that can ensure that the weight increases or decreases as required, and the embodiments of the present disclosure do not limit this.
[0060] In the embodiment of the present disclosure, calibrating the first output data of the first computational memristor array is actually calibrating the analog domain calculation result in the first processing unit. The first output data already includes the first computational memristor array in the first processing unit and other possible analog circuits (for example, Figure 2 The above calibration is a calibration at the processing unit level, which can ensure that the analog domain calculation results of each processing unit are accurate, thereby ensuring the normal operation of the system including multiple processing units, and has good reliability and versatility. In addition, since there is no need to calibrate the underlying components, the additional overhead introduced is low, and it has the advantages of high efficiency and low cost; since only the weight value of the first calibration memristor array introduced is calibrated, the hardware overhead can be flexibly configured according to the requirements of calibration accuracy to achieve on-demand design. Therefore, the calibration method proposed in the present disclosure solves the key bottleneck in the development of the storage and computing integrated system, and is a core breakthrough for the memristor storage and computing integrated technology to move towards the practical application stage.
[0061] For example, in the calibration method provided in at least one embodiment of the present disclosure, the first computational memristor array 510 includes M rows and N columns of memristor cells, the first calibration memristor array 520 includes K rows and N columns of memristor cells, the i-th column of the first calibration memristor array 520 is connected in series with the i-th column of the first computational memristor array 510, the memristor cells in the i-th column of the first calibration memristor array 520 are configured to calibrate the first output data of the i-th column of the first computational memristor array 510 according to the first calibration input data to obtain the first calibration output data of the i-th column, M, N, K, i are all positive integers, and 1≤i≤N.
[0062] It should be noted that the size of the first calibration memristor array 520 is determined by the calibration accuracy requirement. The more accurate the expected simulation calculation results and the larger the calibration range, the more redundant weights are required, that is, a larger first calibration memristor array 520 is required. In extreme cases, the size of the first calibration memristor array 520 can be larger than the size of the first computing memristor array 510.
[0063] It should also be noted that the “rows” and “columns” used to describe the sizes of the first computing memristor array 510 and the first calibration memristor array 520 are only intended to distinguish the two dimensions of the memristor array, rather than limiting the memristor array.
[0064] For example, in the calibration method provided in at least one embodiment of the present disclosure, step S620 includes steps S621 to S623.
[0065] Step S621: Determine first training target output data according to first training calculation input data and a first calculation weight matrix.
[0066] Step S622: inputting first training calculation input data into the first calculation memristor array 510 and inputting first training calibration input data into the first calibration memristor array 520 to obtain first training calibration output data.
[0067] Step S623: adjusting the weight values of the memristor units in the first calibration memristor array corresponding to the columns to be calibrated in the first calculation memristor array according to the deviation between the first training calibration output data and the first training target output data.
[0068] In step S621 , the first training input data is input to the first computational memristor array 510 , and the first computational memristor array 510 may calculate and obtain the first training target output data according to the first computational weight matrix.
[0069] For example, the first training input data may be randomly generated, or generated by sampling the input distribution of a training set predetermined by a tool chain such as a compiler, or directly be a part of a training set predetermined by a tool chain such as a compiler, and the embodiments of the present disclosure are not limited to this.
[0070] For step S622, when the first computational memristor array 510 inputs the first training computational input data and the first calibration memristor array 520 inputs the first training calibration input data, the first computational memristor array 510 and the first calibration memristor array 520 as a whole can calculate the first training calibration output data.
[0071] For step S623, according to the deviation between the first training calibration output data and the first training target output data, only the weight values of the memristor units in the first calibration memristor array 520 corresponding to the columns that need to be calibrated in the first computational memristor array 510 are adjusted, without adjusting the weight values of the memristor units in the columns that need to be calibrated in the first computational memristor array 510, thereby achieving calibration of the deviation.
[0072] For example, each memristor cell in the first calibration memristor array 510 is configured to be able to implement both positive weight and negative weight.
[0073] It should be noted that the above embodiment schematically illustrates one iteration process of on-chip training of the first calibration memristor array. In actual situations, multiple iteration processes are usually required to make the calibration result meet the requirements. Since each iteration process in the multiple iteration processes is the same as steps S621 to S623, they will not be repeated here.
[0074] It should also be noted that in order to prevent an excessive number of iterations, a maximum number of iterations may be set to save resources.
[0075] For example, Figure 7 FIG. 1 is a schematic diagram of an example of a first processing unit provided in an embodiment of the present disclosure. Figure 7 As shown, the first processing unit 700 includes a first calculation memristor array 710 and a first calibration memristor array 720. Figure 7 In, the first calibration memristor array 720 includes a fixed bias calibration subarray 720a and a dynamic bias calibration subarray 720b. The fixed bias calibration subarray 720a is configured to calibrate a fixed bias bias, and the dynamic bias calibration subarray 720b is configured to calibrate a dynamic bias bias. It should be noted that in an embodiment of the present disclosure, the first calibration memristor array 720 may include either or both of the fixed bias calibration subarray 720a and the dynamic bias calibration subarray 720b, and in the case where the first calibration memristor array 720 includes both the fixed bias calibration subarray 720a and the dynamic bias calibration subarray 720b, either or both of the fixed bias calibration subarray 720a and the dynamic bias calibration subarray 720b may be used. For example, the fixed bias calibration subarray 720a may be used to calibrate the fixed bias calibration subarray 720a and the dynamic bias calibration subarray 720b. Figure 7 A control method (not shown) is used to select either or both of the fixed bias calibration sub-array 720a and the dynamic bias calibration sub-array 720b to flexibly control the first calibration memristor array as needed.
[0076] It should also be noted that Figure 7 The memristor in the embodiment adopts 1R (i.e., one resistor element) type is only exemplary and not a limitation of the present disclosure, and the memristor may adopt different types according to actual conditions. For example, the memristor may also adopt 1T1R (i.e., one resistor element plus one transistor) type.
[0077] It should also be noted that Figure 7 The size of the first calibration memristor array 720 is only exemplary and not a limitation of the present disclosure. The size of the first calibration memristor array 720 can be determined according to the specific intelligent computing scenario and task and its accuracy requirements. Figure 7In the figure, the fixed bias calibration subarray 720a adopts an array expansion mode, and the dynamic bias calibration subarray 720b adopts an independent multi-column mode. This is also exemplary rather than a limitation of the present disclosure. The modes of the fixed bias calibration subarray 720a and the dynamic bias calibration subarray 720b can be determined according to specific circumstances.
[0078] For example, in one example of an embodiment of the present disclosure, the first calibration memristor array includes a fixed bias calibration sub-array (eg, Figure 7 The fixed deviation calibration subarray 720a shown in the figure), the first training calibration input data includes fixed training calibration input data, and the fixed deviation calibration subarray includes 1 row*N columns of memristor units. In this case, inputting the first training calibration input data to the first calibration memristor array in step S622 includes: inputting the fixed training calibration input data to the fixed deviation calibration subarray.
[0079] For example, in another example of the embodiment of the present disclosure, the first calibration memristor array includes a dynamic deviation calibration sub-array (eg, Figure 7 The first training calibration input data includes dynamic training calibration input data, and the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units. In this case, inputting the first training calibration input data to the first calibration memristor array in step S622 includes: determining the dynamic training calibration input data according to the first training calculation input data; and inputting the dynamic training calibration input data to the dynamic deviation calibration subarray.
[0080] For example, in another example of the embodiment of the present disclosure, the first calibration memristor array includes a fixed bias calibration subarray and a dynamic bias calibration subarray ( Figure 7 The fixed bias calibration subarray 720a and the dynamic bias calibration subarray 720b shown in the figure), the first training calibration input data includes fixed training calibration input data and dynamic training calibration input data, the fixed bias calibration subarray includes 1 row*N columns of memristor units, and the dynamic bias calibration subarray includes at least 1 row*N columns of memristor units. In this case, inputting the first training calibration input data to the first calibration memristor array in step S622 includes: inputting the fixed training calibration input data to the fixed bias calibration subarray; determining the dynamic training calibration input data according to the first training calculation input data; and inputting the dynamic training calibration input data to the dynamic bias calibration subarray.
[0081] In an embodiment of the present disclosure, the fixed training calibration input data is the same for each of the N columns of the fixed bias calibration subarray.
[0082] For example, the fixed training calibration input data is a voltage pulse with a fixed bias.
[0083] For example, when the first training calculation input data of each row of the first calculation memristor array is 0 or 1, the fixed training calibration input data may be fixedly set to 1 and does not change with the change of the first training calculation input data.
[0084] For example, considering that the deviation between the actual first output data and the ideal target output data is often relatively small, the fixed training calibration input data can be set to 5%-20% of the maximum value of the first training calculation input data. In this case, inputting the fixed training calibration input data to the fixed deviation calibration subarray includes: inputting 5%-20% of the maximum value of the first training calculation input data to the fixed deviation calibration subarray as the fixed training calibration input data.
[0085] In an embodiment of the present disclosure, the dynamic training calibration input data is dynamically determined and may be different for each of the N columns of the dynamic deviation calibration subarray.
[0086] For example, in one example of the embodiment of the present disclosure, before the first calibration memristor array is trained on-chip based on the first computational memristor array and the first computational weight matrix written therein to adjust the weight value of the first calibration memristor array, the calibration method further includes step S630a: determining at least one memristor unit in the i-th column of the first computational memristor array that is in a critical weight position, and setting the input of at least one memristor unit in the i-th column of the dynamic deviation calibration subarray to be the same as the input of at least one memristor unit in the i-th column of the first computational memristor array that is in a critical weight position. In this case, determining the dynamic training calibration input data based on the first training computational input data includes: using the first training computational input data of at least one memristor unit in the i-th column of the first computational memristor array that is in a critical weight position as the dynamic training calibration input data of at least one memristor unit in the i-th column of the dynamic deviation calibration subarray.
[0087] For example, the ratio of the key weight positions of each column in the first computational memristor array can be determined according to actual conditions, and the key weight position of each column can be defined in the first computational memristor array according to the determined ratio. For example, the weights of each column can be sorted according to the degree of fluctuation and the degree of influence of the fluctuation on the result, and the corresponding position of the memristor with the highest influence degree is selected as the key weight position of the column according to the determined ratio. The key weight positions of each column of the first computational memristor array may be different; at the same time, the number of key weight positions of each column of the first computational memristor array is the same as the number of weight units connected to each column of the dynamic deviation calibration subarray. If the i-th column of the first computational memristor array corresponds to the i-th column of the dynamic deviation calibration subarray one-to-one, the input of the key weight of the i-th column of the first computational memristor array is shared with the input of each row of the i-th column of the dynamic deviation calibration subarray, thereby determining the dynamic input of the i-th column of the dynamic deviation calibration subarray, that is, the i-th column of the dynamic deviation calibration subarray shares the first training computation input data of the key weight position of the i-th column of the first computational memristor array.
[0088] For example, Figure 8 A schematic diagram of an example of dynamically determining dynamic training calibration input data provided by an embodiment of the present disclosure. Figure 8 In the example shown, the number of key weight positions of each column of the first computational memristor array 810 is determined to be 2, and correspondingly, the size of the dynamic bias calibration subarray 820b is 2 rows. Figure 8 In the embodiment, the memristor cells in the 1st row, the 1st column and the jth row of the first computational memristor array 810 are determined to be memristor cells in key weight positions, and the inputs of the 1st row, the 1st column and the 2nd row of the dynamic deviation calibration subarray 820b are respectively set to be the same as the inputs of the memristor cells in the 1st row, the 1st column and the jth row of the first computational memristor array 810; the memristor cells in the 1st row, the 2nd column and the 2nd row of the first computational memristor array 810 are determined to be memristor cells in key weight positions, and the inputs of the 1st row, the 1st column and the 2nd row of the dynamic deviation calibration subarray 820b are respectively set to be the same as the inputs of the memristor cells in the 1st row, the 1st column and the jth row of the first computational memristor array 810. The inputs of the 1st row and the 2nd row of the 2nd column are respectively set to be the same as the inputs of the memristor units of the 1st row and the 2nd row of the 2nd column of the first computational memristor array 810; the memristor units of the 2nd row and the jth row of the 3rd column of the first computational memristor array 810 are determined to be the memristor units at the key weight position, and the inputs of the 1st row and the 2nd row of the 3rd column of the dynamic deviation calibration subarray 820b are respectively set to be the same as the inputs of the memristor units of the 2nd row and the jth row of the 3rd column of the first computational memristor array 810, where j is a positive integer greater than or equal to 2. In this way, the dynamic inputs of each column of the dynamic deviation calibration subarray 820b can be determined, and the inputs of each column of the dynamic deviation calibration subarray 820b share the inputs of the key weight position of the corresponding column of the first computational memristor array 810.
[0089] In the implementation of the present disclosure, the dynamic deviation calibration subarray may also adopt an array expansion mode. For example, when the dynamic deviation calibration subarray adopts the array expansion mode, the key weight position of the first calibration memristor array may be determined in units of rows.
[0090] For example, in another example of the embodiment of the present disclosure, before the first calibration memristor array is trained on-chip based on the first computational memristor array and the first computational weight matrix written therein to adjust the weight value of the first calibration memristor array, the calibration method further includes step S630b: determining at least one row of memristor cells in the first computational memristor array that are in a critical weight position, and setting the input of at least one row of memristor cells in the dynamic deviation calibration subarray to be the same as the input of at least one row of memristor cells in the first computational memristor array that are in a critical weight position. In this case, determining the dynamic training calibration input data based on the first training computational input data includes: using the first training computational input data of at least one row of memristor cells in the first computational memristor array that are in a critical weight position as the dynamic training calibration input data of at least one row of memristor cells in the dynamic deviation calibration subarray.
[0091] In the implementation of the present disclosure, all columns in the first computational memristor array may be calibrated, or the columns in the first computational memristor array that need to be calibrated may be determined and only the columns in the first computational memristor array that need to be calibrated may be calibrated to save the computational effort of calibration.
[0092] For example, in an embodiment of the present disclosure, based on the first computational memristor array and the first computational weight matrix written therein, on-chip training is performed on the first calibration memristor array to adjust the weight value of the first calibration memristor array (step S620), and also includes step S624: before inputting the first training computational input data into the first computational memristor array and inputting the first training calibration input data into the first calibration memristor array to obtain the first training calibration output data (step S622), the first training computational input data is input into the first computational memristor array to obtain the first training output data; according to the deviation between the first training output data and the first training target output data, the columns that need to be calibrated in the first computational memristor array are determined, and the memristor units in the first calibration memristor array corresponding to the columns that need to be calibrated in the first computational memristor array are connected in series with the columns that need to be calibrated in the first computational memristor array.
[0093] For example, Fig. 9A FIG. 9 is a flowchart of an example of a calibration method provided by at least one embodiment of the present disclosure, wherein the calibration method 900a includes steps S910a to S950a. Fig. 9AAs shown, at step S910a, the structure and size of the first calibration memristor array are determined, and determining the structure of the first calibration memristor array refers to determining that the first calibration memristor array includes or selects one or both of a solid-state bias calibration subarray and a dynamic bias calibration subarray, and determining the size of the first calibration memristor array refers to determining the number of rows and columns of the first calibration memristor array according to the correction accuracy requirement; at step S920a, the first weight calculation matrix is mapped, for example, the first weight calculation matrix is deployed and mapped to the first computational memristor array of each processing unit by a tool chain such as a compiler; at step S930a, the key weight positions of each column of the first computational memristor array are determined, for example, each column is selected and located according to the determined ratio. The key weight position corresponding to the column; at step S940a, determine the first training calibration input data, for example, the fixed training calibration input data is 5%-20% of the maximum value of the first training calculation input data, and the inputs of different rows of each column of the dynamic deviation standard subarray and the inputs of the key weight position of the corresponding column of the first calculation memristor array are shared in real time; at step S950a, perform on-chip training on all columns of the first calibration memristor array to achieve calibration, for example, using a linear regression method, on-chip training, adjusting the weight values of the fixed deviation calibration subarray and the dynamic deviation calibration subarray, until the deviation between the actual first output data and the ideal target output data reaches a suitable interval or the on-chip training reaches the maximum number of iterations. In this example, the columns that need to be calibrated in the first calculation memristor array are not predetermined, and all columns in the first calculation memristor array are calibrated.
[0094] For example, Fig. 9B This is a flowchart of another example of a calibration method provided by at least one embodiment of the present disclosure, wherein the calibration method 900b includes steps S910b to S960b. Fig. 9BAs shown, at step S910b, the structure and size of the first calibration memristor array are determined, and determining the structure of the first calibration memristor array refers to determining that the first calibration memristor array includes or selects one or both of a solid-state bias calibration subarray and a dynamic bias calibration subarray, and determining the size of the first calibration memristor array refers to determining the number of rows and columns of the first calibration memristor array according to the correction accuracy requirement; at step S920b, the first weight calculation matrix is mapped, for example, the first weight calculation matrix is deployed and mapped to the first computational memristor array of each processing unit by a tool chain such as a compiler; at step S930b, the key weight position of each column of the first computational memristor array is determined, for example, the key weight position corresponding to each column is selected and located according to the determined ratio; at step S940b, the first training calibration input data is determined, for example For example, the fixed training calibration input data is 5%-20% of the maximum value of the first training calculation input data, and the inputs of different rows of each column of the dynamic deviation standard subarray and the inputs of the key weight positions of the corresponding columns of the first calculation memristor array are shared in real time; at step S950b, the columns that need to be calibrated in the first calculation memristor array are determined and connected, for example, the columns that need to be calibrated in the first calculation memristor array are determined and connected as described in step S624; at step S960b, the columns that need to be calibrated in the first calibration memristor array are trained on-chip to achieve calibration, for example, using a linear regression method, on-chip training, adjusting the weight values of the fixed deviation calibration subarray and the dynamic deviation calibration subarray, until the deviation between the actual first output data and the ideal target output data reaches a suitable interval or the on-chip training reaches the maximum number of iterations. In this example, the columns that need to be calibrated in the first calculation memristor array are predetermined, and only the columns that need to be calibrated in the first calculation memristor array are calibrated.
[0095] In an embodiment of the present disclosure, the storage-computing integrated device includes a plurality of processing units. For example, the storage-computing integrated device also includes a second processing unit, the second processing unit includes a second computational memristor array and a second calibration memristor array, the second computational memristor array is configured to receive second computational input data determined according to the first calibration output data, and to compute the second computational input data to obtain second output data; the second calibration memristor array is configured to receive second calibration input data, and to calibrate the second output data according to the second calibration input data to obtain second calibration output data; the second processing unit is configured to output second calibration output data; the calibration method also includes: determining the second computational weight matrix corresponding to the second computational memristor array through off-chip training, and writing the second computational weight matrix into the second computational memristor array; based on the computational output of the second computational memristor array into which the second computational weight matrix is written and the second computational weight matrix, on-chip training is performed on the second calibration memristor array to adjust the weight value of the second calibration memristor array.
[0096] It should be noted that for the multiple processing units included in the storage-computing integrated device, multiple calibration sequences can be adopted, and the embodiments of the present disclosure are not limited to this. For example, multiple processing units can be calibrated independently and in parallel. For example, multiple processing units can also be calibrated step by step.
[0097] For example, in an embodiment of the present disclosure, the second processing unit is coupled to the first processing unit, and in the process of performing on-chip training on the second calibration memristor array based on the second computational memristor array and the second computational weight matrix written therein to adjust the weight value of the second calibration memristor array, the first training target output data is determined according to the first training computational input data and the first computational weight matrix, and the first training target output data is used as the second training input data of the second computational memristor array, or, when the first calibration memristor array is trained, the first training computational input data is input into the first computational memristor array, and the first training calibration input data is input into the first calibration memristor array to obtain the first training calibration output data, and the first training calibration output data is used as the second training input data of the second computational memristor array.
[0098] For example, Fig. 10A A schematic diagram of an independent parallel calibration method provided by at least one embodiment of the present disclosure. Fig. 10A As shown, when each processing unit is divided and deployed to calculate the weight matrix during the compilation phase, the ideal computing input data of each processing unit is determined, and the training computing input data of each processing unit is constructed using the ideal computing input data of each processing unit, so that each processing unit can be calibrated independently and in parallel.
[0099] For example, Fig. 10B A schematic diagram of a step-by-step calibration method provided by at least one embodiment of the present disclosure. Fig. 10B As shown, the levels of each processing unit in the multiple processing units are divided according to the layers to which the weights belong during deep learning. The first-level processing unit is first calibrated, and the corresponding input is the training calculation input data constructed using the ideal calculation input data of the first-level processing unit; the output of the calibrated first-level processing unit under the training calculation input data constructed using the ideal calculation input data is used as the input of the next-level processing unit, and the next-level processing unit is calibrated, and so on.
[0100] exist Fig. 10A In the example shown, the calibration inputs of each processing unit are based on the ideal calculation input data confirmed in the compilation stage. Fig. 10BIn the example shown, the calibration input of each processing unit (except the first level) is based on the actual output of the previous processing unit after calibration (which may deviate from the ideal calculation input data in the compilation stage). Fig. 10B The scheme shown is more complex, but has better error resilience and higher system calibration accuracy.
[0101] In summary, the present disclosure proposes a medium-level, medium-granularity calibration method for analog domain calculation results, and designs a supporting architecture and operation process. According to the various embodiments and examples described above, the calibration method proposed in the present disclosure can realize unit-level calibration, ensure that the analog domain calculation results of each processing unit are accurate, thereby ensuring the normal operation of the system including multiple processing units, and has good reliability and versatility. In addition, since there is no need to calibrate the various underlying components, the additional overhead introduced is low, and it has the advantages of high efficiency and low cost; since only the weight value of the first calibration memristor array introduced is calibrated, the hardware overhead can be flexibly configured according to the requirements of calibration accuracy to achieve on-demand design. Therefore, the calibration method proposed in the present disclosure solves the key bottleneck in the development of the storage and computing integrated system, and is the core breakthrough for the memristor storage and computing integrated technology to move towards the practical application stage.
[0102] At least one embodiment of the present disclosure provides a storage-computation integrated device, including a first processing unit, the first processing unit including a first computing memristor array and a first calibration memristor array, the first computing memristor array is configured to receive first computing input data, and calculate the first computing input data to obtain first output data; the first calibration memristor array is configured to receive first calibration input data, and calibrate the first output data according to the first calibration input data to obtain first calibration output data; the first processing unit is configured to output the first calibration output data. For example, the first processing unit can refer to the relevant description of the first processing unit 500, which will not be repeated here.
[0103] For example, in the storage-computation integrated device provided in at least one embodiment of the present disclosure, the first computational memristor array includes M rows*N columns of memristor units, the first calibration memristor array includes K rows*N columns of memristor units, the i-th column of the first calibration memristor array is connected in series with the i-th column of the first computational memristor array, the memristor units of the i-th column of the first calibration memristor array are configured to calibrate the first output data of the i-th column of the first computational memristor array according to the first calibration input data to obtain the first calibration output data of the i-th column, M, N, K, i are all positive integers, and 1≤i≤N. For example, the first processing unit can refer to the relevant description of the first processing unit 500, which will not be repeated here.
[0104] For example, in the storage-computing integrated device provided by at least one embodiment of the present disclosure, the first calibration memristor array includes a fixed deviation calibration subarray, the first calibration input data includes fixed calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, the i-th column of the fixed deviation calibration subarray is connected in series with the i-th column of the first computing memristor array, and the memristor units of the i-th column of the fixed deviation calibration subarray are configured to calibrate the first output data of the i-th column of the first computing memristor array according to the fixed calibration input data to obtain the first calibration output data of the i-th column. For example, the fixed deviation calibration subarray can refer to the relevant description of the fixed deviation calibration subarray 720a, which will not be repeated here.
[0105] For example, in the storage-computing integrated device provided by at least one embodiment of the present disclosure, the first calibration memristor array includes a dynamic deviation calibration subarray, the first calibration input data includes dynamic calibration input data, the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units, the i-th column of the dynamic deviation calibration subarray is connected in series with the i-th column of the first computing memristor array, the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is determined according to the first computing input data corresponding to the M memristor units in the i-th column of the first computing memristor array, and at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is configured to calibrate the first output data of the i-th column of the first computing memristor array according to the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray, so as to obtain the first calibration output data of the i-th column. For example, the dynamic deviation calibration subarray can refer to the relevant description of the dynamic deviation calibration subarray 720b, which will not be repeated here.
[0106] For example, in the storage-computing integrated device provided by at least one embodiment of the present disclosure, the first calibration memristor array includes a fixed deviation calibration subarray and a dynamic deviation calibration subarray, the first calibration input data includes fixed calibration input data and dynamic calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units, the i-th column of the fixed deviation calibration subarray and the i-th column of the dynamic deviation calibration subarray are connected in series with the i-th column of the first computing memristor array, the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is determined based on the first computing input data corresponding to the M memristor units in the i-th column of the first computing memristor array, the memristor units in the i-th column of the fixed deviation calibration subarray and at least one memristor unit in the i-th column of the dynamic deviation calibration subarray are configured to calibrate the first output data of the i-th column of the first computing memristor array according to the fixed calibration input data and the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray, respectively, to obtain the first calibration output data of the i-th column. For example, the fixed deviation calibration subarray may refer to the related description of the fixed deviation calibration subarray 720a, and the dynamic deviation calibration subarray may refer to the related description of the dynamic deviation calibration subarray 720b, which will not be repeated here.
[0107] For example, in the storage and computing integrated device provided in at least one embodiment of the present disclosure, the fixed calibration input data is 5%-20% of the maximum value of the first calculation input data.
[0108] For example, in the storage-computation integrated device provided by at least one embodiment of the present disclosure, the dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is the same as the first computing input data corresponding to at least one memristor unit in the i-th column of the first computing memristor array at a key weight position. For example, the dynamic deviation calibration subarray can refer to the relevant description of the dynamic deviation calibration subarray 820b, and the configuration of the dynamic calibration input data can refer to the relevant description of step S630a, which will not be repeated here.
[0109] For example, in the storage-computation integrated device provided by at least one embodiment of the present disclosure, the dynamic calibration input data corresponding to at least one row of memristor units of the dynamic deviation calibration subarray is the same as the first computing input data corresponding to at least one row of memristor units at the key weight position of the first computing memristor array. For example, the configuration of the dynamic calibration input data can refer to the relevant description of step S630b, which will not be repeated here.
[0110] It should be noted that, for the sake of clarity and brevity, the embodiments of the present disclosure do not provide all the components of the storage-computing-in-one device, nor all the components of the processing units included in the storage-computing-in-one device. To realize the necessary functions of the storage-computing-in-one device and the processing units included therein, those skilled in the art may provide and set other components not shown according to specific needs, and the embodiments of the present disclosure do not limit this.
[0111] Regarding the technical effects of the storage-computing integrated device and the processing units included therein in different embodiments, reference can be made to the technical effects of the calibration method of the storage-computing integrated device provided in the embodiments of the present disclosure, which will not be repeated here.
[0112] There are a few points to note:
[0113] (1) The drawings of the embodiments of the present disclosure only relate to the structures related to the embodiments of the present disclosure, and other structures may refer to the general design.
[0114] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to obtain new embodiments.
[0115] The above description is merely an exemplary embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure. The protection scope of the present disclosure is determined by the appended claims.
Claims
1. A calibration method for a storage and computing device, wherein: The storage-computing integrated device comprises a first processing unit, the first processing unit comprises a first computing memristor array and a first calibration memristor array, the first computing memristor array is configured to receive first computing input data, and calculate the first computing input data to obtain first output data; The first calibration memristor array is configured to receive first calibration input data, and calibrate the first output data according to the first calibration input data to obtain first calibration output data; The first processing unit is configured to output the first calibration output data, The calibration method comprises: Determine a first computing weight matrix corresponding to the first computing memristor array through off-chip training, and write the first computing weight matrix into the first computing memristor array; Based on the first computational memristor array in which the first computational weight matrix is written and the first computational weight matrix, performing on-chip training on the first calibration memristor array to adjust weight values of the first calibration memristor array; Wherein, the first calibration memristor array comprises a fixed bias calibration subarray and / or a dynamic bias calibration subarray, the fixed bias calibration subarray is configured to calibrate a fixed bias deviation of the first output data, and the dynamic bias calibration subarray is configured to calibrate a dynamic bias deviation of the first output data; The performing on-chip training on the first calibration memristor array to adjust the weight value of the first calibration memristor array includes: Determining first training target output data according to first training calculation input data and the first calculation weight matrix, inputting the first training computing input data into the first computing memristor array and inputting the first training calibration input data into the first calibration memristor array to obtain first training calibration output data, and According to the deviation between the first training calibration output data and the first training target output data, the weight values of the memristor units in the first calibration memristor array corresponding to the columns to be calibrated in the first computing memristor array are adjusted.
2. The calibration method according to claim 1, wherein: The first computational memristor array includes M rows and N columns of memristor cells, the first calibration memristor array includes K rows and N columns of memristor cells, the i-th column of the first calibration memristor array is connected in series with the i-th column of the first computational memristor array, and the memristor cells in the i-th column of the first calibration memristor array are configured to calibrate the first output data of the i-th column of the first computational memristor array according to the first calibration input data to obtain the first calibration output data of the i-th column, wherein M, N, K, and i are all positive integers, and 1≤i≤N.
3. The calibration method according to claim 2, wherein: The first calibration memristor array includes the fixed bias calibration subarray, the first training calibration input data includes fixed training calibration input data, and the fixed bias calibration subarray includes 1 row*N columns of memristor units, Inputting the first training calibration input data into the first calibration memristor array includes: inputting the fixed training calibration input data into the fixed deviation calibration subarray.
4. The calibration method according to claim 2, wherein: The first calibration memristor array includes the dynamic deviation calibration subarray, the first training calibration input data includes dynamic training calibration input data, and the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor cells, Inputting the first training calibration input data into the first calibration memristor array includes: determining the dynamic training calibration input data according to the first training calculation input data; and inputting the dynamic training calibration input data into the dynamic deviation calibration subarray.
5. The calibration method according to claim 2, wherein: The first calibration memristor array includes the fixed deviation calibration subarray and the dynamic deviation calibration subarray, the first training calibration input data includes fixed training calibration input data and dynamic training calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, and the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units, Inputting the first training calibration input data into the first calibration memristor array comprises: Inputting the fixed training calibration input data into the fixed deviation calibration subarray; Determining the dynamic training calibration input data according to the first training calculation input data; and The dynamic training calibration input data is input into the dynamic deviation calibration subarray.
6. The calibration method according to claim 3 or 5, wherein: Inputting the fixed training calibration input data into the fixed deviation calibration subarray includes: inputting 5%-20% of the maximum value of the first training calculation input data into the fixed deviation calibration subarray as the fixed training calibration input data.
7. The calibration method according to claim 4 or 5, wherein: Before performing on-chip training on the first calibration memristor array based on the first computational memristor array having the first computational weight matrix written therein and the first computational weight matrix to adjust the weight value of the first calibration memristor array, the calibration method further includes: determining at least one memristor cell in the i-th column of the first computational memristor array that is in a critical weight position, and setting the input of at least one memristor cell in the i-th column of the dynamic bias calibration subarray to be the same as the input of the at least one memristor cell in the i-th column of the first computational memristor array that is in a critical weight position, Wherein, determining the dynamic training calibration input data according to the first training calculation input data includes: The first training calculation input data of the at least one memristor unit at the key weight position in the i-th column of the first computing memristor array is used as the dynamic training calibration input data of at least one memristor unit in the i-th column of the dynamic deviation calibration subarray.
8. The calibration method according to claim 4 or 5, wherein: Before performing on-chip training on the first calibration memristor array based on the first computational memristor array having the first computational weight matrix written therein and the first computational weight matrix to adjust the weight value of the first calibration memristor array, the calibration method further includes: determining at least one row of memristor cells in the first computational memristor array at a critical weight position, and setting the input of at least one row of memristor cells in the dynamic bias calibration subarray to be the same as the input of the at least one row of memristor cells in the first computational memristor array at the critical weight position, Wherein, determining the dynamic training calibration input data according to the first training calculation input data includes: The first training calculation input data of the at least one row of memristor units at the key weight position of the first calculation memristor array is used as the dynamic training calibration input data of the at least one row of memristor units of the dynamic deviation calibration subarray.
9. The calibration method according to any one of claims 2 to 5, wherein: Based on the first computational memristor array having the first computational weight matrix written therein and the first computational weight matrix, on-chip training is performed on the first calibration memristor array to adjust the weight value of the first calibration memristor array, further comprising: Before inputting the first training computing input data into the first computing memristor array and inputting the first training calibration input data into the first calibration memristor array to obtain the first training calibration output data, Inputting the first training computing input data into the first computing memristor array to obtain first training output data; According to the deviation between the first training output data and the first training target output data, the columns in the first computational memristor array that need to be calibrated are determined, and the memristor units in the first calibration memristor array corresponding to the columns in the first computational memristor array that need to be calibrated are connected in series with the columns in the first computational memristor array that need to be calibrated.
10. The calibration method according to claim 1, wherein: The storage-computing integrated device further includes a second processing unit, the second processing unit including a second computing memristor array and a second calibration memristor array, the second computing memristor array being configured to receive second computing input data determined according to the first calibration output data, and to calculate the second computing input data to obtain second output data; The second calibration memristor array is configured to receive second calibration input data, and calibrate the second output data according to the second calibration input data to obtain second calibration output data; The second processing unit is configured to output the second calibration output data, The calibration method further comprises: Determine a second computing weight matrix corresponding to the second computing memristor array through off-chip training, and write the second computing weight matrix into the second computing memristor array; Based on the second computational memristor array in which the second computational weight matrix is written and the second computational weight matrix, on-chip training is performed on the second calibration memristor array to adjust the weight values of the second calibration memristor array.
11. The calibration method according to claim 10, wherein: The second processing unit is coupled to the first processing unit, In the process of performing on-chip training on the second calibration memristor array based on the second computational memristor array having the second computational weight matrix written therein and the second computational weight matrix to adjust the weight value of the second calibration memristor array, Determine first training target output data according to first training calculation input data and the first calculation weight matrix, and use the first training target output data as second training input data of the second calculation memristor array, or, When the first calibration memristor array is trained, the first training computation input data is input into the first computational memristor array, and the first training calibration input data is input into the first calibration memristor array to obtain first training calibration output data, and the first training calibration output data is used as second training input data for the second computational memristor array.
12. The calibration method according to claim 1, wherein: Each memristor cell in the first calibration memristor array is configured to be capable of realizing both positive weight and negative weight.
13. A storage and computing integrated device, comprising a first processing unit, wherein: The first processing unit includes a first computing memristor array and a first calibration memristor array, The first computational memristor array is configured to receive first computational input data and to compute the first computational input data to obtain first output data; The first calibration memristor array is configured to receive first calibration input data, and calibrate the first output data according to the first calibration input data to obtain first calibration output data; The first processing unit is configured to output the first calibration output data; Wherein, the first calibration memristor array includes a fixed bias calibration subarray and / or a dynamic bias calibration subarray, the fixed bias calibration subarray is configured to calibrate the fixed bias deviation of the first output data, and the dynamic bias calibration subarray is configured to calibrate the dynamic bias deviation of the first output data.
14. The device according to claim 13, wherein: The first computing memristor array includes M rows*N columns of memristor cells, the first calibration memristor array includes K rows*N columns of memristor cells, the i-th column of the first calibration memristor array is connected in series with the i-th column of the first computing memristor array, The memristor units in the i-th column of the first calibration memristor array are configured to calibrate the first output data in the i-th column of the first computational memristor array according to the first calibration input data to obtain the first calibration output data in the i-th column, Among them, M, N, K, and i are all positive integers, and 1≤i≤N.
15. The device according to claim 14, wherein: The first calibration memristor array includes the fixed deviation calibration subarray, the first calibration input data includes fixed calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, the i-th column of the fixed deviation calibration subarray is connected in series with the i-th column of the first computational memristor array, The memristor units in the i-th column of the fixed deviation calibration subarray are configured to calibrate the fixed bias deviation of the first output data in the i-th column of the first computational memristor array according to the fixed calibration input data to obtain the first calibration output data in the i-th column.
16. The device according to claim 14, wherein: The first calibration memristor array includes the dynamic deviation calibration subarray, the first calibration input data includes dynamic calibration input data, the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units, the i-th column of the dynamic deviation calibration subarray is connected in series with the i-th column of the first computational memristor array, The dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is determined according to the first calculation input data corresponding to the M memristor units in the i-th column of the first calculation memristor array, At least one memristor unit in the i-th column of the dynamic deviation calibration subarray is configured to calibrate the dynamic bias deviation of the first output data of the i-th column of the first computing memristor array according to the dynamic calibration input data corresponding to the at least one memristor unit in the i-th column of the dynamic deviation calibration subarray, so as to obtain the first calibrated output data of the i-th column.
17. The device according to claim 14, wherein: The first calibration memristor array includes the fixed deviation calibration subarray and the dynamic deviation calibration subarray, the first calibration input data includes fixed calibration input data and dynamic calibration input data, the fixed deviation calibration subarray includes 1 row*N columns of memristor units, the dynamic deviation calibration subarray includes at least 1 row*N columns of memristor units, the i-th column of the fixed deviation calibration subarray and the i-th column of the dynamic deviation calibration subarray are connected in series with the i-th column of the first computational memristor array, The dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is determined according to the first calculation input data corresponding to the M memristor units in the i-th column of the first calculation memristor array, The memristor cells in the i-th column of the fixed bias calibration subarray and at least one memristor cell in the i-th column of the dynamic bias calibration subarray are configured to calibrate the fixed bias deviation and the dynamic bias deviation of the first output data of the i-th column of the first computational memristor array according to the fixed calibration input data and the dynamic calibration input data corresponding to the at least one memristor cell in the i-th column of the dynamic bias calibration subarray, respectively, so as to obtain the first calibrated output data of the i-th column.
18. The device according to claim 15 or 17, wherein: The fixed calibration input data is 5%-20% of the maximum value of the first calculation input data.
19. The device according to claim 16 or 17, wherein: The dynamic calibration input data corresponding to at least one memristor unit in the i-th column of the dynamic deviation calibration subarray is the same as the first calculation input data corresponding to at least one memristor unit in the i-th column of the first calculation memristor array at a critical weight position.
20. The device according to claim 16 or 17, wherein: The dynamic calibration input data corresponding to at least one row of memristor units of the dynamic deviation calibration subarray is the same as the first calculation input data corresponding to at least one row of memristor units at key weight positions of the first calculation memristor array.
