Testing method, device, electronic device and storage medium for integrated storage and computing chip
By constructing test cases and target identification tags, the storage and computing integrated chip is tested, which solves the problems of low testing efficiency and lack of pertinence in the existing technology, achieves accurate identification and adjustment, and improves the efficiency and accuracy of chip testing. .
Patent Information
- Application Number
- CN202311866116.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-12-29
AI Technical Summary
The testing method for storage and computing integrated chips in the existing technology is inefficient, cannot accurately detect chip problems, and the verification test lacks pertinence.
By constructing test cases, determine the target identification tag and input it into the storage and computing integrated chip to be tested, obtain the predicted identification tag of the chip, determine whether there is an abnormality in the chip based on the tag, obtain the targeted test method, and conduct targeted testing to Identify unusual issues.
It improves the testing efficiency and accuracy of integrated storage and computing chips, and can accurately determine the specific reasons for the gap between the chip output results and the real results, and achieve targeted adjustments and detection.
Smart Images

Figure CN118193298B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip testing technology, and in particular to a testing method, device, electronic device and storage medium for a storage-computing integrated chip. Background Art
[0002] At present, the application of integrated storage and computing chips is becoming more and more widespread because they integrate storage functions and computing functions of neural network models. Generally, integrated storage and computing chips include memristor arrays, which integrate analog computing of neural network models through memristor arrays, which can greatly improve the computing efficiency of neural network reasoning. Among them, analog computing is generally achieved by migrating the trained neural network model to the memristor array of the integrated storage and computing chip.
[0003] However, when migrating the trained neural network model to the memristor array on the storage and computing integrated chip, the inaccuracy of the relevant programs or quantization methods may cause a large gap in the correlation between the results output by the storage and computing integrated chip and the results output by the neural network model, that is, the storage and computing integrated chip operates poorly and has low accuracy.
[0004] In this regard, in the prior art, when testing the integrated storage and computing chip, verification testing is often performed by manually checking the burning program code, chip problems, etc. when there is a large deviation between the output result of the integrated storage and computing chip and the actual result. Such a verification test method is not targeted and is undoubtedly like looking for a needle in a haystack. The code is very long, the chip problem is difficult to find, and the verification test efficiency is very low. Summary of the invention
[0005] The present application provides a testing method, device, electronic device and storage medium for a storage-computing integrated chip, so as to solve the technical problems in the prior art that the verification and testing methods for the storage-computing integrated chip by manually checking and burning program codes, chip problems, etc. are not targeted, the code is very long, the chip problems are difficult to find, and the verification and testing efficiency is low.
[0006] In a first aspect, the present application provides a test method for a storage-computing integrated chip, characterized in that the method comprises:
[0007] Constructing a test case and determining a target identification tag of the test case;
[0008] Inputting the test case into the storage-computing integrated chip to be tested, and obtaining a predicted identification label output by the storage-computing integrated chip;
[0009] Determining whether the storage-computing integrated chip has an abnormality according to the target identification tag and the prediction identification tag;
[0010] When it is determined that the storage and computing integrated chip has an abnormality, a target test method is obtained; one target test method corresponds to a preset abnormality problem;
[0011] The storage-computing integrated chip is tested according to the target test method, and a preset abnormal problem corresponding to the test result characterizing the test abnormality is determined as the target abnormal problem of the storage-computing integrated chip.
[0012] In a second aspect, an embodiment of the present application provides a test device for a storage-computing integrated chip, the device comprising:
[0013] A construction module, used to construct a test case and determine a target identification tag of the test case;
[0014] An input module, used to input the test case into the storage-computing integrated chip to be tested, and obtain a predicted identification label output by the storage-computing integrated chip;
[0015] A first determination module, used to determine whether the storage and computing integrated chip has an abnormality according to the target identification tag and the prediction identification tag;
[0016] A second determination module is used to obtain a target test method when it is determined that the storage and computing integrated chip has an abnormality; one target test method corresponds to a preset abnormality problem;
[0017] The test module is used to test the storage-computing integrated chip according to the target test method, and determine the preset abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage-computing integrated chip.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the processor is used to execute a test program of a storage and computing integrated chip stored in the memory to implement the test method of the storage and computing integrated chip described in any one of the first aspects.
[0019] In a fourth aspect, an embodiment of the present application provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the test method of the storage and computing integrated chip described in any one of the first aspects.
[0020] The technical solution provided by the embodiment of the present application, by constructing a test case and determining the target identification label of the test case, inputting the test case into the storage-computing integrated chip to be tested, obtaining the predicted identification label output by the storage-computing integrated chip, determining whether the storage-computing integrated chip has an abnormality according to the target identification label and the predicted identification label, and when determining that the storage-computing integrated chip has an abnormality, obtaining the target test method, one target test method corresponds to a preset abnormal problem, testing the storage-computing integrated chip according to the target test method, and determining the preset abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage-computing integrated chip. This technical solution, by constructing a test case, tests the storage-computing integrated chip, and when determining that the storage-computing integrated chip has a problem, tests the preset abnormal problem of the storage-computing integrated chip according to the corresponding target test method, thereby determining the specific abnormal problem direction of the storage-computing integrated chip, and accurately determining the specific cause direction of the large gap between the predicted result and the actual result of the storage-computing integrated chip output, so that the problems in these directions can be adjusted and detected in a targeted manner in the future, thereby improving the test efficiency and accuracy of the storage-computing integrated chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0023] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0024] Figure 1 A flowchart of an embodiment of a test method for a storage-computing integrated chip provided in an embodiment of the present application;
[0025] Figure 2A A spectrum diagram of target audio data provided by an embodiment of the present application;
[0026] Figure 2B A spectrum diagram of target noise data provided in an embodiment of the present application;
[0027] Figure 3AA spectrum diagram of another target audio data provided by an embodiment of the present application;
[0028] Figure 3B A spectrum diagram of another target noise data provided in an embodiment of the present application;
[0029] Figure 4 A schematic diagram of the structure of a memristor array provided in an embodiment of the present application;
[0030] Figure 5 A flowchart of an embodiment of a method for determining target abnormality problems provided in an embodiment of the present application;
[0031] Figure 6 A schematic diagram of a weight splitting curve diagram provided in an embodiment of the present application;
[0032] Figure 7 A flowchart of another method for determining target abnormality problems provided in an embodiment of the present application;
[0033] Figure 8 A schematic diagram of a characteristic curve diagram provided in an embodiment of the present application;
[0034] Fig. 9 A block diagram of an embodiment of a test device for a storage-computing integrated chip provided in an embodiment of the present application;
[0035] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0037] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0038] In order to solve the technical problems that the methods of verifying and testing the storage and computing integrated chip by manually checking and burning program codes, chip problems, etc. in the prior art are not targeted, the code is very long, the chip problems are difficult to find, and the verification test efficiency is low, the present application provides a testing method, device, electronic device and storage medium for a storage and computing integrated chip, and tests the storage and computing integrated chip by constructing test cases, and when it is determined that the storage and computing integrated chip has problems, the preset abnormal problems of the storage and computing integrated chip are tested according to the corresponding target test method, so as to determine the specific abnormal problem direction of the storage and computing integrated chip, and accurately determine the specific cause direction of the large gap between the predicted output result and the actual result of the storage and computing integrated chip, so that the problems in these directions can be adjusted and detected in a targeted manner in the subsequent period, thereby improving the testing efficiency and accuracy of the storage and computing integrated chip.
[0039] The test method for the storage and computing integrated chip provided in the present application is further explained below with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0040] See also Figure 1 , is a flow chart of an embodiment of a test method for a storage-computing integrated chip provided in an embodiment of the present application. Figure 1 As shown, the process may include the following steps:
[0041] Step 101: construct a test case and determine a target identification tag for the test case.
[0042] The above-mentioned test case refers to test data used for testing, which can be a speech recognition test case, a speaker recognition test case, or an image recognition test case.
[0043] The target identification label refers to the standard identification result corresponding to the test case. When the test case is a speech recognition test case, it can be the real speaker of the audio data corresponding to the test case. For example, the constructed test case includes the audio data of speaker A, speaker B, and speaker C, where the goal of the test case is to identify speaker A from the mixed audio of the three, then speaker A is the target identification label corresponding to the test case.
[0044] In one embodiment, when the above-mentioned test case is a speech recognition test case, in order to increase the comprehensiveness of the test case, the execution subject of the embodiment of the present application can obtain a variety of different audio data from a preset corpus, thereby constructing multiple test cases based on the obtained audio data.
[0045] As a possible implementation method, the above-mentioned corpus may include a corpus, a noise library, and a negative sample library and other corpora. Based on this, the execution subject of the embodiment of the present application can obtain audio data and noise data from the above-mentioned preset corpus, and construct a test case for the above-mentioned audio data and noise data. It should be noted that the above-mentioned audio data refers to the audio data of pure speech pre-stored in the corpus, and the above-mentioned noise data refers to the audio data used as noise in the constructed test case, which can be audio data containing other environmental noises, and can also be audio data of other pure speech. The embodiment of the present application does not limit this.
[0046] As an exemplary implementation, since pure speech is often impossible in real life and is generally affected by factors such as environmental noise, white noise, and volume, the volume and echo reverberation of the above audio data and noise data can be adjusted respectively to obtain more standard target audio data and target noise data.
[0047] Afterwards, the above-mentioned target audio data, target noise data, and preset white noise data can be superimposed to obtain a test case. The white noise data here refers to the noise with equal noise power spectrum density contained in each frequency band of equal bandwidth within a wider frequency range. The white noise data is added in the embodiment of the present application to increase the noise diversity of the audio data in the test case, so as to determine the accuracy of speech recognition of the storage and computing integrated chip tested based on the test case.
[0048] As an optional implementation, one or more preset time periods of data to be replaced (hereinafter referred to as first data to be replaced for ease of description) may be selected from the target audio data, that is, at least one segment of audio data may be randomly selected from the target audio data as the first data to be replaced. Figure 2A , is a spectrum diagram of target audio data provided by an embodiment of the present application. Figure 2A As shown, at least one segment of audio data (the audio data corresponding to the two dotted lines in the figure) can be randomly selected from the spectrum diagram corresponding to the target audio data as the first data to be replaced.
[0049] Afterwards, for the above-mentioned first data to be replaced, replacement data of the target time period (for the convenience of description, referred to as the first replacement data below) can be selected from the target noise data or white noise data, that is, at least one section of noise data can be randomly selected from the target noise data or white noise data as the first replacement data.
[0050] As the name implies, the first replacement data is used to replace the first data to be replaced in the target audio data, thereby realizing the superposition of audio data and noise data. Therefore, the target time period corresponding to the first replacement data is the same as the preset time period corresponding to the first data to be replaced. Figure 2B , is a spectrum diagram of target noise data provided by an embodiment of the present application. Figure 2B As shown, at least one noise data segment (the audio data corresponding to the two dashed lines in the figure) can be randomly selected from the spectrum graph corresponding to the target noise data as the first replacement data. It should be noted that the dashed line intervals of the two spectrum graphs in FIG2 are the same.
[0051] Afterwards, the first replacement data may replace the first data to be replaced in the target audio data, thereby obtaining a test case.
[0052] As another optional implementation, one or more data to be replaced in a preset frequency range (hereinafter referred to as second data to be replaced for ease of description) may be selected from the target audio data, that is, at least one segment of audio data in the frequency direction may be randomly selected from the target audio data as the second data to be replaced. Figure 3A , is another spectrum diagram of target audio data provided by an embodiment of the present application. Figure 3A As shown, audio data in at least one preset frequency range (the audio data corresponding to the two dotted lines in the figure) can be randomly selected from the frequency spectrum corresponding to the target audio data as the second data to be replaced.
[0053] Afterwards, for the above-mentioned second data to be replaced, replacement data in the target frequency range (for the sake of ease of description, referred to as the second replacement data below) can be selected from the target noise data or white noise data, that is, at least one section of noise data in the target frequency range can be randomly selected from the target noise data or white noise data as the second replacement data.
[0054] As the name implies, the second replacement data is used to replace the second data to be replaced in the target audio data, thereby realizing the superposition of the audio data and the noise data. Therefore, the target frequency range corresponding to the first replacement data is the same as the preset frequency range corresponding to the second data to be replaced. Figure 3B , is another spectrum diagram of target noise data provided by an embodiment of the present application. Figure 3B As shown, at least one noise data segment (the audio data corresponding to the two dashed lines in the figure) can be randomly selected from the spectrum graph corresponding to the target noise data as the second replacement data. It should be noted that the dashed line intervals of the two spectrum graphs in FIG3 are the same.
[0055] Afterwards, the second replacement data may replace the second data to be replaced in the target audio data, thereby obtaining a test case.
[0056] Further, the target identification tag of the test case can be determined based on the above audio data. Optionally, the identification tag corresponding to the audio data can be directly determined, and the identification tag can be determined as the target identification tag. The identification tag of the above audio data can be the speaker corresponding to the audio data, which can be pre-set or recognized by a speech recognition device. The embodiment of the present application does not limit this.
[0057] For example, in the scenario of speaker recognition, the above target recognition label can represent a specific person, such as identifying the target person speaking in the test case. When there are multiple persons, any one of them can be used as the target person.
[0058] Step 102: Input the above test case into the storage-computing integrated chip to be tested to obtain the predicted identification label output by the storage-computing integrated chip.
[0059] The above-mentioned storage and computing integrated chip is a storage and computing integrated chip with integrated neural network model function to be tested.
[0060] The above-mentioned predicted identification label is the identification label output by the storage and computing integrated chip after performing speech recognition on the input test case.
[0061] In one embodiment, the storage and computing integrated chip to be tested may include a memristor array, for example, Figure 4 , is a schematic diagram of the structure of a memristor array provided in an embodiment of the present application. Figure 4 As shown, the memristor array may include multiple memristors, and the number of rows and columns of memristors corresponding to different scenarios may be different.
[0062] Among them, the resistance value (or conductance value, conductance value and resistance value are opposite numbers) of each memristor component can correspond to the weight values of different levels in the neural network model.
[0063] In practical applications, the neural network model contains multiple different levels (multi-layer convolutional layers, etc.), and the weights corresponding to each level are different. During the training process, the similarity between the output of the neural network model and the real result (i.e., model loss) is iteratively updated. After that, when the similarity between the final output result and the real result reaches the ideal value, the weight corresponding to each level is determined. At this point, the trained neural network model can be migrated to the storage and computing integrated chip, and the weight of each level will be converted into the resistance value of the memristor in the memristor array.
[0064] In the embodiment of the present application, the target neural network model can be integrated in the following manner:
[0065] First, the model weight value of the target neural network model corresponding to the storage and computing integrated chip can be obtained. The target neural network model can be a pre-trained model, and the corresponding model can be different for different scenarios. For example, the target neural network model can be a speech recognition model, a speaker recognition model, and an image recognition model. The above model weight values refer to the weight values corresponding to different convolutional layers in the target neural network model.
[0066] Afterwards, based on the above model weight value, the target resistance value corresponding to each memristor in the memristor array in the storage and computing integrated chip can be determined, and the memristors on the storage and computing integrated chip can be adjusted based on the target resistance value corresponding to each memristor to obtain the target chip.
[0067] In one embodiment, when determining the target resistance value corresponding to each memristor in a memristor array in a storage and computing integrated chip, the preset weight splitting model corresponding to the storage and computing integrated chip can be used to determine the splitting weight corresponding to the memristor array, so as to map the model weight value based on the above splitting weight, thereby determining the target resistance value corresponding to each memristor in the memristor array in the storage and computing integrated chip.
[0068] Among them, the above-mentioned model weight value includes the weight values corresponding to different convolutional layers in the target neural network model. Since the target neural network model is a pre-trained neural network model, the model weight value is the stabilized weight value determined by training in the target neural network model.
[0069] The above-mentioned preset weight splitting model can be a weight splitting program pre-burned for the storage and computing integrated chip, which can split the model weight value of the target neural network model to split the model weight value into the target resistance value of each memristor in the memristor array corresponding to the storage and computing integrated chip.
[0070] The above-mentioned splitting weight is the corresponding ratio parameter between the model weight value of the target neural network model output by the preset weight splitting model and the corresponding target resistance value of the memristor array of the storage and computing integrated chip, wherein the weight corresponding to each convolutional layer of the target neural network model and the resistance value corresponding to a column of memristors in the corresponding memristor array.
[0071] Furthermore, the above-mentioned preset weight splitting model can determine the splitting weight value based on the data type corresponding to the model weight value, the data type corresponding to the memristor, and the model weight value.
[0072] Specifically, the preset weight splitting model, the data type of the model weight value, and the data type of the memristor corresponding to the storage-computing integrated chip can be obtained first, and the model weight value can be split based on the data type of the model weight value and the data type of the memristor through the preset weight splitting model to obtain the split weight. Afterwards, the model weight value can be mapped based on the split weight to obtain the target resistance value corresponding to each memristor in the memristor array in the storage-computing integrated chip.
[0073] For example, the data type of the model weight value (for example, floating point type, and the corresponding precision, such as 32 bits, 16 bits, etc.) can be determined in advance, and then the data type that needs to be split onto the storage and computing integrated chip memristor array can be determined, and the split weight can be determined based on the data type of the memristor, the data type of the model weight value (the hierarchy between the memristor and the model weight value must correspond) and the model weight value.
[0074] Based on this, the above test case can be input into the above target chip for forward propagation to obtain the predicted identification label output by the target chip.
[0075] Step 103: Determine whether the storage and computing integrated chip has an abnormality based on the target identification tag and the predicted identification tag.
[0076] Step 104: When it is determined that the storage and computing integrated chip has an abnormality, a target test method is obtained, where one target test method corresponds to one preset abnormality problem.
[0077] Step 105: Test the storage-computing integrated chip according to the above-mentioned target test method, and determine the preset abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage-computing integrated chip.
[0078] The following is a unified description of steps 103 to 105:
[0079] The above-mentioned preset abnormal problems refer to the abnormal reasons or structural ranges of the pre-divided storage and computing integrated chips that may have abnormalities. For example, there are problems with the storage and computing integrated chip itself, such as problems with the packaging and other hardware processes; for example, there are problems with the program burned into the storage and computing integrated chip; for example, there are weight problems with the neural network model corresponding to the storage and computing integrated chip, which may be due to different weight data types in different network layers.
[0080] The above-mentioned target test method refers to a test method corresponding to a preset abnormal problem, and one target test method may correspond to one preset abnormal problem.
[0081] The above-mentioned target abnormal problem refers to the abnormal cause or structure of the determined abnormality of the storage and computing integrated chip.
[0082] In an embodiment of the present application, when the storage and computing integrated chip is tested, it can be determined whether there is an abnormality in the storage and computing integrated chip based on the predicted identification label output by the storage and computing integrated chip and the target identification label of the test case.
[0083] Optionally, if the predicted identification label output by the storage-computing integrated chip is significantly different from the target identification label of the test case, it means that the storage-computing integrated chip does not accurately identify the test case. Therefore, it can be determined that there is an abnormality in the storage-computing integrated chip.
[0084] As an optional implementation, the similarity between the predicted identification tag and the target identification tag may be determined, and when the similarity is greater than a preset similarity threshold, it is determined that the predicted identification tag and the target identification tag are significantly different.
[0085] Furthermore, when it is determined that the storage-computing integrated chip has an abnormality, in order to prevent the detection efficiency and accuracy from being low due to lack of specificity when detecting the storage-computing integrated chip, the target test method preset by the execution subject of the embodiment of the present application may correspond to a preset abnormal problem. The above-mentioned preset abnormal problem may be one or more, and the embodiment of the present application does not limit this.
[0086] Afterwards, the storage-computing integrated chip can be tested according to the above target test method, and the preset abnormal problem corresponding to the test result that characterizes the test abnormality can be determined as the target abnormal problem of the storage-computing integrated chip, so that specific detection and verification can be performed on the above target abnormal problem in the future, so as to determine the specific abnormal problem of the storage-computing integrated chip. The above subsequent detection and verification method can be a method in the prior art such as manually checking the burning program code and chip problems.
[0087] As for what specific abnormal problems are included in the preset abnormal problems, and how to test the storage and computing integrated chip according to the target test method, you can refer to the following. Figure 5 and Figure 7 The process shown is explained and will not be described in detail here.
[0088] The technical solution provided by the embodiment of the present application, by constructing a test case and determining the target identification label of the test case, inputting the test case into the storage-computing integrated chip to be tested, obtaining the predicted identification label output by the storage-computing integrated chip, determining whether the storage-computing integrated chip has an abnormality according to the above target identification label and the above predicted identification label, and when determining that the storage-computing integrated chip has an abnormality, obtaining a target test method, a target test method can correspond to a preset abnormal problem, testing the storage-computing integrated chip according to the target test method, and determining the preset abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage-computing integrated chip. This technical solution, by constructing a test case, tests the storage-computing integrated chip, and when determining that the storage-computing integrated chip has a problem, tests the preset abnormal problem of the storage-computing integrated chip according to the corresponding target test method, thereby determining the specific abnormal problem direction of the storage-computing integrated chip, and accurately determining the specific cause direction of the large gap between the predicted result and the actual result of the storage-computing integrated chip output, so that the problems in these directions can be adjusted and detected in a targeted manner in the future, thereby improving the test efficiency and accuracy of the storage-computing integrated chip.
[0089] See also Figure 5 , which is a flow chart of an embodiment of a method for determining target abnormal problems provided in an embodiment of the present application. Figure 5 The process shown in Figure 1 Based on the process shown, it describes how to test the storage-computing integrated chip according to the corresponding target test method to determine the target abnormal problem of the storage-computing integrated chip when the preset abnormal problem includes the first type of abnormal problem, and the first type of abnormal problem is used to characterize the abnormality of the model weight value of the target neural network model. Figure 5 As shown, the process may include the following steps:
[0090] Step 501: Obtain a target test method, which corresponds to a first type of abnormal problem. The first type of abnormal problem is used to characterize that a model weight value of a target neural network model is abnormal.
[0091] The above-mentioned first type of abnormal problems are abnormal problems that may occur in the pre-set storage and computing integrated chip. The first type of abnormal problems are used to characterize the existence of abnormalities in the model weight values of the target neural network model.
[0092] The above target test method is a pre-set test method for the first type of abnormal problems.
[0093] In actual applications, when the model weight values of the target neural network model are migrated to the storage and computing integrated chip, there will be a problem of reduced precision or accuracy. Among them, since the data type of the weight value of the target neural network model itself may be different, such as the target neural network model is a 32-bit floating point type, and its own weight value is a 16-bit floating point type or a 4-bit integer type, etc., when the above model weight values are migrated to the storage and computing integrated chip, due to the difference in data type, the weight conversion will be different from the trained weight of the target neural network model itself. In the quantization process, the weights themselves vary greatly, resulting in large differences in the final output results.
[0094] In one embodiment, the execution subject of the embodiment of the present application can obtain the above-mentioned first type of abnormal problems for the storage and computing integrated chip and the target testing method for the first type of abnormal problems from a preset database.
[0095] In another embodiment, the execution entity of the embodiment of the present application can obtain the first type of abnormal problems for the storage and computing integrated chip and the target test method for the first type of abnormal problems input by the user through a visual interface.
[0096] Step 502: Test the storage and computing integrated chip according to the target testing method.
[0097] Step 503: Determine the first type of abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage and computing integrated chip.
[0098] The following is a unified description of step 502 and step 503:
[0099] In one embodiment, after determining the first type of abnormal problem for the storage and computing integrated chip and the target test method corresponding to the first type of abnormal problem, the executing entity of the embodiment of the present application may test the storage and computing integrated chip according to the above-mentioned target test method, and determine the first type of abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage and computing integrated chip.
[0100] As an optional implementation, Figure 1 As can be seen from the process shown, the storage and computing integrated chip can correspond to a preset weight splitting model, and use the preset weight splitting model to generate split weights. Among them, the preset weight splitting model can generate a weight splitting curve corresponding to the split weight when generating the split weight. The weight splitting curve is generated in the process of splitting the model weight value based on the data type of the model weight value and the data type of the memristor by the preset weight splitting model.
[0101] Afterwards, the target weight trend curve corresponding to the split weight can be obtained from the preset weight trend graph library according to the data type corresponding to the model weight value and the data type corresponding to the memristor. The above target weight trend curve is used to characterize the weight splitting rule from the weight splitting of the data type corresponding to the model weight value to the weight of the data type corresponding to the memristor.
[0102] Among them, a plurality of weight trend curve graphs may be pre-stored in the database of the execution entity of the embodiment of the present application, and each weight trend curve graph represents a weight trend graph of the weight split from one data type to another data type.
[0103] Based on this, the above-mentioned weight splitting curve graph can be compared with the above-mentioned target weight trend curve graph to determine whether the weight splitting curve graph satisfies the weight splitting rule corresponding to the target weight trend curve graph.
[0104] Optionally, if it is determined that the above-mentioned weight splitting curve graph satisfies the above-mentioned splitting rule, then the test result is determined to be that there is no abnormality in the model weight value of the target neural network model. Further, it can be determined that the target abnormality problem of the storage and computing integrated chip is not the first type of abnormality problem.
[0105] On the contrary, if it is determined that the above-mentioned weight splitting curve does not satisfy the above-mentioned splitting rule, then the test result is determined to be that there is an abnormality in the model weight value of the target neural network model. Further, it can be determined that the target abnormality problem of the storage and computing integrated chip is the first type of abnormality problem.
[0106] For example, see Figure 6 , is a schematic diagram of a weight splitting curve diagram provided in an embodiment of the present application. Figure 6 As shown, the weight splitting rule can be whether the weight value changes regularly within a preset time period, where the circled part should satisfy the law of continuous change, but it has a flat value (i.e. the same value) at the following moments. It is likely that there is a problem with the quantized weight, that is, the storage and computing integrated chip is abnormal due to the model weight value of the target neural network model.
[0107] Furthermore, in order to more accurately determine whether there is an abnormality in the model weight value of the target neural network model, the executive body of the embodiment of the present application, after determining that the weight splitting curve diagram satisfies the above-mentioned splitting rule, can further determine whether there is an abnormality in the model weight value of the target neural network model based on the distribution corresponding to the target resistance value of each memristor in the memristor array.
[0108] As an exemplary implementation, a weight distribution diagram corresponding to the target resistance value of each memristor in the memristor array may be determined according to the weight splitting curve diagram, and the weight distribution diagram includes the target resistance value of each memristor in the memristor array.
[0109] Afterwards, the resistance distribution detection can be performed on the weight distribution map to determine whether there is a target resistance value that does not belong to the preset range from the above weight distribution map, and the target resistance value that does not belong to the preset range can be determined as a discrete resistance value. The discrete resistance value here refers to a discrete resistance value that deviates greatly from the main distribution. The so-called large deviation here generally means that the size of these weight values will be more concentrated, but there may be some very small or large values, which have a certain impact on the entire storage and computing integrated chip.
[0110] Based on this, when it is determined that there is no discrete resistance value, it can be directly determined that the first target test result is that there is no abnormality in the model weight value of the target neural network model.
[0111] Optionally, when it is determined that the above-mentioned discrete resistance values exist, in order to weaken the impact of these discrete values on the storage and computing integrated chip, the execution subject of the embodiment of the present application may adjust the target resistance value of each memristor in the memristor array based on the above-mentioned discrete resistance values and the target neural network model.
[0112] Specifically, the target resistance value of each memristor included in the memristor array may be adjusted in the following manner:
[0113] First, the total resistance of the target resistance included in the memristor array and the total number of memristors included in the memristor array can be determined, and the total resistance mean can be determined based on the total resistance and the total number of memristors. Specifically, the total resistance can be divided by the total number of memristors to obtain the total resistance mean.
[0114] Afterwards, the total hierarchical resistance of each layer of memristors included in the memristor array and the number of hierarchical memristors corresponding to each layer of memristors can be determined, and the hierarchical resistance mean corresponding to each layer of memristors can be determined based on the total hierarchical resistance and the number of hierarchical memristors. Specifically, the total hierarchical resistance can be divided by the number of hierarchical memristors to obtain the hierarchical resistance mean.
[0115] Afterwards, for each layer of memristors, the layer adjustment coefficient corresponding to the layer of memristors can be determined according to the corresponding layer resistance average and the total resistance average. Specifically, the layer resistance average corresponding to the layer of memristors can be divided by the total resistance average to obtain the layer adjustment system corresponding to the layer of memristors.
[0116] Finally, the loss value of the target neural network model can be adjusted according to the above-mentioned hierarchical adjustment coefficient and the preset adjustment coefficient to obtain a target loss value, and based on the target loss value, the target resistance value of each memristor included in the memristor array can be adjusted.
[0117] As an exemplary implementation, in order to reduce the impact of the weight value with large deviation on the model prediction result and prevent the model from overfitting, the execution subject of the embodiment of the present application can superimpose the above-mentioned discrete resistance value restriction on the original loss value through formula (1) when adjusting the loss value of the target neural network model:
[0118] L=L1+λ1λ2*K Formula (1)
[0119] Among them, L is the target loss value, L1 is the original loss value, λ1 is the above-mentioned hierarchical adjustment coefficient, λ2 is the preset adjustment coefficient, and K is the target resistance distribution density corresponding to the above-mentioned weight distribution diagram.
[0120] Based on this, when adjusting the target resistance, the model weight value of the target neural network model can be updated according to the above-mentioned target loss value, and the target resistance value of each memristor can be re-determined according to the updated model weight value.
[0121] Afterwards, the weight splitting curve graph may be re-determined based on the adjusted target resistance value of each memristor, and it may be determined whether the new weight splitting curve graph satisfies the weight splitting rule corresponding to the above target weight trend curve graph.
[0122] Optionally, when it is determined that the new weight splitting curve does not satisfy the weight splitting rules, it can be determined that the test result is that there is an abnormality in the model weights of the target neural network model. Further, it can be determined that the target abnormality problem of the storage and computing integrated chip is the first type of abnormality problem mentioned above.
[0123] On the contrary, when it is determined that the new weight splitting curve graph satisfies the weight splitting rules, it can be determined that the test result is that there is no abnormality in the model weights of the target neural network model. Further, it can be determined that the target abnormality problem of the storage and computing integrated chip is not the first type of abnormality problem mentioned above.
[0124] The technical solution provided by the embodiment of the present application, by obtaining a target test method, the target test method corresponds to a first type of abnormal problem, the first type of abnormal problem is used to characterize the existence of an abnormality in the model weight value of the target neural network model, and the storage-computing integrated chip is tested according to the target test method, and the first type of abnormal problem corresponding to the test result characterizing the test abnormality is determined as the target abnormal problem of the storage-computing integrated chip. This technical solution, by performing corresponding tests on the model weight value problem of the target neural network model, can rule out whether the storage-computing integrated chip abnormality is caused by the abnormality in the model weight value of the target neural network model, so as to determine the abnormal problem of the storage-computing integrated chip, and accurately determine the specific cause direction of the large gap between the predicted result and the actual result of the output of the storage-computing integrated chip, so that the problems in these directions can be adjusted and detected in a targeted manner in the future, thereby improving the test efficiency and accuracy of the storage-computing integrated chip.
[0125] See also Figure 7 , which is a flow chart of another embodiment of a method for determining target abnormal problems provided in an embodiment of the present application. Figure 7 The process shown in Figure 1 Based on the process shown, it describes how to test the storage-computing integrated chip according to the target test method in the case where the preset abnormal problem includes the second type of abnormal problem, and the second type of abnormal problem is used to characterize the abnormality of the model weight value of the preset weight splitting model or the target neural network model, so as to determine the target abnormal problem of the storage-computing integrated chip. Figure 7 As shown, the process may include the following steps:
[0126] Step 701: obtain a target test method, which corresponds to a second type of abnormal problem. The second type of abnormal problem is used to characterize that there is an abnormality in the model weight value of a preset weight splitting model or a target neural network model.
[0127] Step 702: Test the storage and computing integrated chip according to the above-mentioned target testing method.
[0128] Step 703: Determine the second type of abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage and computing integrated chip.
[0129] The following is a unified description of steps 701 to 703:
[0130] The second type of abnormal problem is a possible abnormal problem that may occur in the pre-set storage and computing integrated chip. The second type of abnormal problem is used to indicate that the model weight value of the preset weight split model or the target neural network model is abnormal. The preset weight split model is the weight split model corresponding to the storage and computing integrated chip, which consists of Figure 1 From the process shown, it can be seen that the weight splitting model is used to determine the splitting weight based on the data type corresponding to the model weight value, the data type corresponding to the memristor, and the model weight value.
[0131] The above target test method is a pre-set test method for the second type of abnormal problems.
[0132] In one embodiment, in order to determine whether there is an abnormality in the weight splitting program (weight splitting model) burned into the storage and computing integrated chip, and whether there is an abnormality in the model weight value of the target neural network model corresponding to the storage and computing integrated chip, the execution subject of the embodiment of the present application may use a target testing method, which corresponds to the above-mentioned second type of abnormal problem.
[0133] Afterwards, the above-mentioned storage and computing integrated chip can be tested according to the above-mentioned target testing method, and the second type of abnormal problem corresponding to the test result characterizing the test abnormality can be determined as the target abnormal problem of the storage and computing integrated chip.
[0134] As an exemplary implementation, the execution subject of the embodiment of the present application may determine the characteristic curve graph generated by the storage and computing integrated chip during the process of processing the above test case.
[0135] Afterwards, the peak value of the characteristic curve can be detected to determine the maximum eigenvalue and the minimum eigenvalue in the characteristic curve, and the characteristic difference value corresponding to the maximum eigenvalue and the minimum eigenvalue can be determined. Figure 8 The characteristic curve diagram shown is shown in Figure 8 , is a schematic diagram of a characteristic curve diagram provided in an embodiment of the present application. Figure 8 As shown, the maximum eigenvalue of the characteristic curve is +32, and the minimum eigenvalue is -16, so the corresponding characteristic difference is 48.
[0136] Finally, it can be determined whether the above-mentioned feature difference is greater than a preset difference threshold. The above-mentioned difference threshold is a preset threshold, which can be 30 or 20, and the embodiment of the present application does not limit this.
[0137] Optionally, if it is determined that the above feature difference is greater than the difference threshold, it means that the feature difference is large and there is an abnormality in the process of the storage and computing integrated chip processing the test case. Therefore, it can be determined that the test result is that there is an abnormality in the model weight value of the preset weight splitting model or the target neural network model.
[0138] Furthermore, the test results can indicate that the abnormality of the storage and computing integrated chip is caused by the abnormality of the preset weight splitting model or the model weight value of the target neural network model. Therefore, it can be determined that the target abnormality problem of the storage and computing integrated chip is the second type of abnormality problem mentioned above.
[0139] On the contrary, if it is determined that the above-mentioned feature difference is less than or equal to the above-mentioned difference threshold, it means that during the process of the storage and computing integrated chip processing the test case, the feature difference is small and within the normal range. Therefore, it can be determined that the test results are that there is no abnormality in the model weight values of the preset weight splitting model and the target neural network model.
[0140] Furthermore, the test results show that the abnormality of the storage and computing integrated chip is not caused by the model weight values of the preset weight splitting model and the target neural network model. Therefore, it can be determined that the target abnormality problem of the storage and computing integrated chip is a third-type abnormality problem, which can be used to characterize the existence of abnormalities in the structure or circuit of the storage and computing integrated chip.
[0141] In addition, the target testing method for the first type of abnormal problems and the target testing method for the second type of abnormal problems provided in the embodiment of the present application can be run in parallel, or the storage and computing integrated chip can be tested according to the target testing method for the first type of abnormal problems, and then the storage and computing integrated chip can be tested according to the target testing method for the second type of abnormal problems. The embodiment of the present application does not impose any restrictions on this.
[0142] The technical solution provided by the embodiment of the present application, by obtaining a target test method, the target test method corresponds to the second type of abnormal problem, the above-mentioned second type of abnormal problem is used to characterize the presence of abnormalities in the model weight values of the preset weight splitting model or the target neural network model, and the storage and computing integrated chip is tested according to the above-mentioned target test method, and the second type of abnormal problem corresponding to the test result characterizing the test abnormality is determined as the target abnormal problem of the storage and computing integrated chip. This technical solution, by performing corresponding tests on the model weight value problem of the target neural network model and the burned weight splitting program, can rule out whether the storage and computing integrated chip abnormality is caused by the weight splitting program or the model weight value abnormality of the target neural network model, so as to determine the abnormal problem of the storage and computing integrated chip, and realize the accurate determination of the specific cause direction of the large gap between the predicted result and the actual result of the output of the storage and computing integrated chip, so that the problems in these directions can be adjusted and detected in a targeted manner in the future, thereby realizing the improvement of the test efficiency and accuracy of the storage and computing integrated chip.
[0143] See also Fig. 9 , is a block diagram of an embodiment of a test device for a storage-computing integrated chip provided in an embodiment of the present application. Fig. 9 As shown, the device may include:
[0144] A construction module 91 is used to construct a test case and determine a target identification tag of the test case;
[0145] An input module 92, used to input the test case into the storage-computing integrated chip to be tested, and obtain a predicted identification label output by the storage-computing integrated chip;
[0146] A first determination module 93, configured to determine whether the storage and computing integrated chip has an abnormality according to the target identification tag and the prediction identification tag;
[0147] The second determination module 94 is used to obtain a target test method when it is determined that the storage and computing integrated chip has an abnormality; one target test method corresponds to one preset abnormality problem;
[0148] The testing module 95 is used to test the storage-computing integrated chip according to the target testing method, and determine the preset abnormal problem corresponding to the test result characterizing the test abnormality as the target abnormal problem of the storage-computing integrated chip.
[0149] like Fig.10 As shown, it is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, including a processor 101, a communication interface 102, a memory 103 and a communication bus 104, wherein the processor 101, the communication interface 102, and the memory 103 communicate with each other through the communication bus 104.
[0150] Memory 103, used for storing computer programs;
[0151] In one embodiment of the present application, the processor 101 is used to execute the program stored in the memory 103 to implement the question-answer pair generation method provided by any of the aforementioned method embodiments, including:
[0152] Constructing a test case and determining a target identification tag of the test case;
[0153] Inputting the test case into the storage-computing integrated chip to be tested, and obtaining a predicted identification label output by the storage-computing integrated chip;
[0154] Determining whether the storage-computing integrated chip has an abnormality according to the target identification tag and the prediction identification tag;
[0155] When it is determined that the storage and computing integrated chip has an abnormality, a target test method is obtained; one target test method corresponds to a preset abnormality problem;
[0156] The storage-computing integrated chip is tested according to the target test method, and a preset abnormal problem corresponding to the test result characterizing the test abnormality is determined as the target abnormal problem of the storage-computing integrated chip.
[0157] An embodiment of the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the test method for the storage and computing integrated chip provided in any of the aforementioned method embodiments are implemented.
[0158] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0160] It should be understood that the terms used in the text are only for the purpose of describing specific example embodiments, and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0161] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A test method for a storage-computing integrated chip, characterized in that: The method comprises: Constructing a test case and determining a target identification tag of the test case; Inputting the test case into the storage-computing integrated chip to be tested, and obtaining a predicted identification label output by the storage-computing integrated chip; Determining whether the storage-computing integrated chip has an abnormality according to the target identification tag and the prediction identification tag; When it is determined that the storage and computing integrated chip has an abnormality, a target test method is obtained; one target test method corresponds to a preset abnormality problem; Testing the storage-computing integrated chip according to the target testing method, and determining a preset abnormal problem corresponding to a test result characterizing a test abnormality as a target abnormal problem of the storage-computing integrated chip; Wherein, the storage-computing integrated chip includes a memristor array, and the step of inputting the test case into the storage-computing integrated chip to be tested to obtain a predicted identification label output by the storage-computing integrated chip includes: obtaining a model weight value of a target neural network model corresponding to the storage-computing integrated chip; determining a target resistance value corresponding to each memristor in the memristor array in the storage-computing integrated chip based on the model weight value; adjusting the memristor on the storage-computing integrated chip based on the target resistance value corresponding to each memristor to obtain a target chip; inputting the test case into the target chip, and obtaining a predicted identification label output by the target chip; Among them, the model weight value includes the weight values corresponding to different convolutional layers in the target neural network model; the target resistance value corresponding to each memristor in the memristor array in the storage and computing integrated chip is determined based on the model weight value, including: obtaining a preset weight splitting model corresponding to the storage and computing integrated chip, the data type of the model weight value, and the data type of the memristor, and splitting the model weight value based on the data type of the model weight value and the data type of the memristor through the preset weight splitting model to obtain the split weight; mapping the model weight value based on the split weight to determine the target resistance value corresponding to each memristor in the memristor array in the storage and computing integrated chip.
2. The method according to claim 1, characterized in that: The preset abnormal problem includes a first type of abnormal problem, and the first type of abnormal problem is used to characterize that the model weight value of the target neural network model is abnormal; The step of testing the storage-computing integrated chip according to the target test method and determining a preset abnormal problem corresponding to a test result characterizing a test abnormality as a target abnormal problem of the storage-computing integrated chip includes: Obtain a weight splitting curve graph; the weight splitting curve graph is generated in the process of splitting the model weight value based on the data type of the model weight value and the data type of the memristor by the preset weight splitting model; According to the data type corresponding to the model weight value and the data type corresponding to the memristor, obtaining a target weight trend curve graph corresponding to the split weight from a weight trend graph library; Comparing the weight splitting curve graph with the target weight trend curve graph to determine whether the weight splitting curve graph satisfies the weight splitting rule corresponding to the target weight trend curve graph; When it is determined that the weight splitting curve diagram does not satisfy the weight splitting rule, it is determined that the target abnormal problem of the storage and computing integrated chip is the first type of abnormal problem.
3. The method according to claim 2, characterized in that The method further comprises: In the case where it is determined that the weight splitting curve graph satisfies the weight splitting rule, a weight distribution graph is determined according to the weight splitting curve graph; the weight distribution graph includes a target resistance value of each memristor in the memristor array; Performing resistance distribution detection on the weight distribution map to determine whether there is a target resistance value that does not belong to a preset range in the weight distribution map; Determining a target resistance value that does not fall within a preset range as a discrete resistance value, and adjusting the target resistance value of each of the memristors in the memristor array based on the discrete resistance value and the target neural network model; Based on the adjusted target resistance value of each of the memristors, re-determine the weight splitting curve graph, and determine whether the new weight splitting curve graph satisfies the weight splitting rule corresponding to the target weight trend curve graph; When it is determined that the new weight splitting curve does not satisfy the weight splitting rule, it is determined that the target abnormal problem of the storage and computing integrated chip is the first type of abnormal problem.
4. The method according to claim 3, characterized in that The step of adjusting the target resistance value of each memristor in the memristor array based on the discrete resistance value and the target neural network model includes: Determining a total resistance value of a target resistance value included in the memristor array and a total number of memristors included in the memristor array; Determining a total resistance mean value according to the total resistance value and the total number of memristors; Determine the total hierarchical resistance of each layer of memristors included in the memristor array, and the number of hierarchical memristors corresponding to each layer of memristors; Determine the average level resistance value corresponding to each level of memristors according to the total level resistance value and the number of level memristors; For each layer of memristors, determining a layer adjustment coefficient corresponding to the layer of memristors according to a corresponding layer resistance average and the total resistance average; According to the layer adjustment coefficient and the preset adjustment coefficient, the loss value of the target neural network model is adjusted to obtain a target loss value; Based on the target loss value, a target resistance value of each of the memristors included in the memristor array is adjusted.
5. The method according to claim 1, characterized in that The preset abnormal problem includes a second type of abnormal problem, and the second type of abnormal problem is used to characterize that the model weight value of the preset weight split model or the target neural network model is abnormal; The step of testing the storage-computing integrated chip according to the target test method and determining a preset abnormal problem corresponding to a test result characterizing a test abnormality as a target abnormal problem of the storage-computing integrated chip includes: Determine a characteristic curve graph generated by the storage-computing integrated chip in the process of processing the test case; Performing peak detection on the characteristic curve graph to determine the maximum eigenvalue and the minimum eigenvalue; Determine a characteristic difference value corresponding to the maximum eigenvalue and the minimum eigenvalue; Determining whether the feature difference is greater than a preset difference threshold; In the case where it is determined that the characteristic difference is greater than the difference threshold, determining that the target abnormal problem of the storage and computing integrated chip is the second type of abnormal problem; When it is determined that the characteristic difference is less than or equal to the difference threshold, the target abnormal problem of the storage and computing integrated chip is determined to be a preset third type of abnormal problem, and the third type of abnormal problem is used to characterize the existence of abnormality in the structure or circuit of the storage and computing integrated chip.
6. A test device for a storage and computing integrated chip, characterized in that: The device comprises: A construction module, used to construct a test case and determine a target identification tag of the test case; An input module, used to input the test case into the storage-computing integrated chip to be tested, and obtain a predicted identification label output by the storage-computing integrated chip; A first determination module, used to determine whether the storage and computing integrated chip has an abnormality according to the target identification tag and the prediction identification tag; A second determination module is used to obtain a target test method when it is determined that the storage and computing integrated chip has an abnormality; one target test method corresponds to a preset abnormality problem; A testing module, used to test the storage-computing integrated chip according to the target testing method, and determine a preset abnormal problem corresponding to a test result characterizing a test abnormality as a target abnormal problem of the storage-computing integrated chip; Wherein, the storage-computing integrated chip includes a memristor array, and the step of inputting the test case into the storage-computing integrated chip to be tested to obtain a predicted identification label output by the storage-computing integrated chip includes: obtaining a model weight value of a target neural network model corresponding to the storage-computing integrated chip; determining a target resistance value corresponding to each memristor in the memristor array in the storage-computing integrated chip based on the model weight value; adjusting the memristor on the storage-computing integrated chip based on the target resistance value corresponding to each memristor to obtain a target chip; inputting the test case into the target chip, and obtaining a predicted identification label output by the target chip; Among them, the model weight value includes the weight values corresponding to different convolutional layers in the target neural network model; the target resistance value corresponding to each memristor in the memristor array in the storage and computing integrated chip is determined based on the model weight value, including: obtaining a preset weight splitting model corresponding to the storage and computing integrated chip, the data type of the model weight value, and the data type of the memristor, and splitting the model weight value based on the data type of the model weight value and the data type of the memristor through the preset weight splitting model to obtain the split weight; mapping the model weight value based on the split weight to determine the target resistance value corresponding to each memristor in the memristor array in the storage and computing integrated chip.
7. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a test program of a storage-computing integrated chip stored in the memory, so as to implement the test method of the storage-computing integrated chip according to any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the test method of the storage and computing integrated chip described in any one of claims 1 to 5.
Citation Information
Patent Citations
Artificial neural network integrity verification
CN111788586A
Fault detection method for neural network processor
CN112115009A
Testing method and device, electronic equipment and computer readable storage medium
CN112965903A
Construction and optimization method of memristor array neural network based on circuit simulation
CN113570048A
Variational inference method and device for bayesian neural network based on memristor array
WO2023217017A1
