CN118672859A - Test method and device of computing unit, electronic equipment and storage medium - Google Patents
Test method and device of computing unit, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN118672859A CN118672859A CN202410937488.4A CN202410937488A CN118672859A CN 118672859 A CN118672859 A CN 118672859A CN 202410937488 A CN202410937488 A CN 202410937488A CN 118672859 A CN118672859 A CN 118672859A
- Authority
- CN
- China
- Prior art keywords
- trigonometric function
- matrix
- value sequence
- function value
- vector
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010998 test method Methods 0.000 title description 2
- 239000011159 matrix material Substances 0.000 claims abstract description 340
- 230000006870 function Effects 0.000 claims abstract description 322
- 239000013598 vector Substances 0.000 claims abstract description 133
- 238000012360 testing method Methods 0.000 claims abstract description 94
- 238000000034 method Methods 0.000 claims abstract description 46
- 238000000819 phase cycle Methods 0.000 claims description 27
- 238000004364 calculation method Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 12
- 230000015654 memory Effects 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 8
- 238000013473 artificial intelligence Methods 0.000 abstract description 12
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000013135 deep learning Methods 0.000 abstract description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 17
- 238000010586 diagram Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 238000009825 accumulation Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000033228 biological regulation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000017105 transposition Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Biomedical Technology (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Complex Calculations (AREA)
Abstract
本公开提供了一种计算单元的测试方法,涉及人工智能技术领域,尤其涉及芯片、深度学习和测试技术领域。具体实现方案为:根据第一三角函数值序列、第二三角函数值序列和第三三角函数值序列,利用目标计算单元分别得到第一矩阵、第二矩阵和基准矩阵,其中,第一矩阵的第一向量是通过将第一三角函数值序列沿第一方向循环移动第一移动位数得到的,第二矩阵的第二向量是通过将第二三角函数值序列沿第二方向循环移动第二移动位数得到的;利用待测计算单元将第一矩阵和第二矩阵相乘,得到待测结果矩阵;以及根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的精度测试结果。本公开还提供了一种计算单元的测试装置、电子设备和存储介质。
The present disclosure provides a method for testing a computing unit, which relates to the field of artificial intelligence technology, and in particular to the field of chips, deep learning and testing technology. The specific implementation scheme is: according to the first trigonometric function value sequence, the second trigonometric function value sequence and the third trigonometric function value sequence, the target computing unit is used to obtain the first matrix, the second matrix and the reference matrix respectively, wherein the first vector of the first matrix is obtained by circularly moving the first trigonometric function value sequence along the first direction by the first number of movement bits, and the second vector of the second matrix is obtained by circularly moving the second trigonometric function value sequence along the second direction by the second number of movement bits; the computing unit to be tested is used to multiply the first matrix and the second matrix to obtain the result matrix to be tested; and according to the difference between the result matrix to be tested and the reference matrix, the accuracy test result of the computing unit to be tested is determined. The present disclosure also provides a testing device, an electronic device and a storage medium for a computing unit.
Description
技术领域Technical Field
本公开涉及人工智能技术领域,尤其涉及芯片、深度学习和测试技术领域。更具体地,本公开提供了一种计算单元的测试方法、装置、电子设备和存储介质。The present disclosure relates to the field of artificial intelligence technology, and in particular to the field of chips, deep learning and testing technology. More specifically, the present disclosure provides a testing method, device, electronic device and storage medium for a computing unit.
背景技术Background Art
随着人工智能技术的发展,人工智能芯片的应用不断增加。With the development of artificial intelligence technology, the application of artificial intelligence chips continues to increase.
发明内容Summary of the invention
本公开提供了一种计算单元的测试方法、装置、设备以及存储介质。The present disclosure provides a computing unit testing method, apparatus, device and storage medium.
根据本公开的一方面,提供了一种计算单元的测试方法,该方法包括:根据第一三角函数值序列、第二三角函数值序列和第三三角函数值序列,利用目标计算单元分别得到第一矩阵、第二矩阵和基准矩阵,其中,第一矩阵包括至少一个第一向量,第一向量是通过将第一三角函数值序列沿第一方向循环移动第一移动位数得到的,第二矩阵包括至少一个第二向量,第二向量是通过将第二三角函数值序列沿第二方向循环移动第二移动位数得到的,第三三角函数值序列的相位值是根据第一三角函数值序列的相位值与第二三角函数值序列的相位值之差得到的;利用待测计算单元将第一矩阵和第二矩阵相乘,得到待测结果矩阵;以及根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的精度测试结果。According to one aspect of the present disclosure, a testing method for a computing unit is provided, the method comprising: obtaining a first matrix, a second matrix and a reference matrix respectively using a target computing unit according to a first trigonometric function value sequence, a second trigonometric function value sequence and a third trigonometric function value sequence, wherein the first matrix includes at least one first vector, the first vector is obtained by circularly shifting the first trigonometric function value sequence along a first direction by a first shifting bit number, the second matrix includes at least one second vector, the second vector is obtained by circularly shifting the second trigonometric function value sequence along a second direction by a second shifting bit number, and a phase value of the third trigonometric function value sequence is obtained according to a difference between a phase value of the first trigonometric function value sequence and a phase value of the second trigonometric function value sequence; multiplying the first matrix and the second matrix by the computing unit to be tested to obtain a result matrix to be tested; and determining the accuracy test result of the computing unit to be tested according to the difference between the result matrix to be tested and the reference matrix.
根据本公开的另一方面,提供了一种计算单元的测试装置,该装置包括:目标计算单元,配置为:根据第一三角函数值序列、第二三角函数值序列和第三三角函数值序列,分别得到第一矩阵、第二矩阵和基准矩阵,其中,第一矩阵包括至少一个第一向量,第一向量是通过将第一三角函数值序列沿第一方向循环移动第一移动位数得到的,第二矩阵包括至少一个第二向量,第二向量是通过将第二三角函数值序列沿第二方向循环移动第二移动位数得到的,第三三角函数值序列的相位值是根据第一三角函数值序列的相位值与第二三角函数值序列的相位值之差得到的;待测计算单元,配置为将第一矩阵和第二矩阵相乘,得到待测结果矩阵;以及目标计算单元还配置为:根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的精度测试结果。According to another aspect of the present disclosure, a testing device for a computing unit is provided, the device comprising: a target computing unit, configured to obtain a first matrix, a second matrix and a reference matrix according to a first trigonometric function value sequence, a second trigonometric function value sequence and a third trigonometric function value sequence, respectively, wherein the first matrix comprises at least one first vector, the first vector is obtained by circularly shifting the first trigonometric function value sequence along a first direction by a first shifting bit number, the second matrix comprises at least one second vector, the second vector is obtained by circularly shifting the second trigonometric function value sequence along a second direction by a second shifting bit number, and a phase value of the third trigonometric function value sequence is obtained according to a difference between a phase value of the first trigonometric function value sequence and a phase value of the second trigonometric function value sequence; a computing unit to be tested, configured to multiply the first matrix and the second matrix to obtain a result matrix to be tested; and the target computing unit is further configured to determine an accuracy test result of the computing unit to be tested according to the difference between the result matrix to be tested and the reference matrix.
根据本公开的另一方面,提供了一种电子设备,包括本公开提供的装置。According to another aspect of the present disclosure, an electronic device is provided, comprising the device provided by the present disclosure.
根据本公开的另一方面,提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行根据本公开提供的方法。According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,该计算机指令用于使计算机执行根据本公开提供的方法。According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现根据本公开提供的方法。According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided according to the present disclosure is implemented.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
图1是根据本公开的一个实施例的计算单元的测试方法的流程图;FIG1 is a flow chart of a method for testing a computing unit according to an embodiment of the present disclosure;
图2是根据本公开的一个实施例的第一矩阵、第二矩阵和基准矩阵的示意图;FIG2 is a schematic diagram of a first matrix, a second matrix, and a reference matrix according to an embodiment of the present disclosure;
图3是根据本公开的一个实施例的计算单元的测试装置的框图;FIG3 is a block diagram of a test device for a computing unit according to an embodiment of the present disclosure;
图4是根据本公开的一个实施例的电子设备的框图;以及FIG4 is a block diagram of an electronic device according to an embodiment of the present disclosure; and
图5是根据本公开的一个实施例的可以应用计算单元的测试方法的电子设备的框图。FIG. 5 is a block diagram of an electronic device to which a method for testing a computing unit may be applied according to an embodiment of the present disclosure.
具体实施方式DETAILED DESCRIPTION
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
在科学计算、深度学习等领域,模型可以包括多个涉及线性计算的操作。这些操作包括通用矩阵乘(General Matrix to Matrix Multiplication,GEMM)操作和卷积(convolution,conv)操作等。人工智能芯片的存储资源在不断增加。这些操作涉及的数据的规模(shape)也越来越大。以通用矩阵乘操作为例,该操作涉及第一矩阵和第二矩阵。第一矩阵可以为M×K的矩阵,第二矩阵可以为K×N的矩阵。通用矩阵乘操作的计算量可以是O(n3)的,相应的计算时间也是O(n3)的。In the fields of scientific computing and deep learning, models can include multiple operations involving linear calculations. These operations include general matrix to matrix multiplication (GEMM) operations and convolution (conv) operations. The storage resources of artificial intelligence chips are constantly increasing. The size (shape) of the data involved in these operations is also getting bigger and bigger. Taking the general matrix multiplication operation as an example, the operation involves a first matrix and a second matrix. The first matrix can be an M×K matrix, and the second matrix can be a K×N matrix. The computational complexity of the general matrix multiplication operation can be O(n3), and the corresponding computational time is also O(n3).
在软件或硬件开发过程中,可以对线性计算操作进行大量的精度测试,以确定人工智能芯片或算子的精度。During the software or hardware development process, a large number of accuracy tests can be performed on linear computing operations to determine the accuracy of the AI chip or operator.
在一些实施例中,测试数据(例如第一矩阵和第二矩阵)可以由中央计算单元(CPU)生成,并由中央计算单元计算出基准(golden)结果。接下来,利用人工智能芯片根据测试数据计算出的计算结果。将计算结果与基准结果比较,以确定操作执行的正确性。人工智能芯片的计算时间一般较短,但中央计算单元的数据生成时间和计算时间均较长。In some embodiments, the test data (e.g., the first matrix and the second matrix) can be generated by a central computing unit (CPU), and the central computing unit calculates a benchmark (golden) result. Next, the calculation result calculated by the artificial intelligence chip based on the test data is used. The calculation result is compared with the benchmark result to determine the correctness of the operation execution. The calculation time of the artificial intelligence chip is generally short, but the data generation time and calculation time of the central computing unit are both long.
例如,中央计算单元可以生成一组数量为M×K的、数值范围为(-1.0f, 1.0f)的随机数作为第一矩阵,也可以生成一组数量为N×K、数值范围为(-1.0f, 1.0f)的随机数作为第二矩阵。中央计算单元根据第一矩阵和转置的第二矩阵执行矩阵乘操作,得到基准结果。基准结果可以为M×N的矩阵。人工智能芯片根据第一矩阵和第二矩阵执行矩阵乘操作,得到待测结果矩阵。待测结果矩阵也可以为M×N的矩阵。可以计算待测结果矩阵中每个值与基准结果中相应值之间的绝对误差和/或相对误差。将该绝对误差和/或相对误差,与误差阈值进行比较,可以得到比较结果。可以理解,误差阈值与第一矩阵的列数目或第二矩阵的行数目(K)相关,若K不同,需要重新配置误差阈值。此外,在生成第一矩阵和第二矩阵的过程中,需要执行大量的随机数生成操作,并将大量的随机数分别写入存储,会耗费大量时间。此外,在执行矩阵乘操作的过程中,需要中央计算单元执行大量的计算和访存操作,且随着计算规模增长,耗时也会增加。For example, the central computing unit can generate a set of M×K random numbers with a numerical range of (-1.0f, 1.0f) as the first matrix, or a set of N×K random numbers with a numerical range of (-1.0f, 1.0f) as the second matrix. The central computing unit performs a matrix multiplication operation based on the first matrix and the transposed second matrix to obtain a benchmark result. The benchmark result can be an M×N matrix. The artificial intelligence chip performs a matrix multiplication operation based on the first matrix and the second matrix to obtain a matrix of the test result. The matrix of the test result can also be an M×N matrix. The absolute error and/or relative error between each value in the matrix of the test result and the corresponding value in the benchmark result can be calculated. The absolute error and/or relative error is compared with the error threshold to obtain a comparison result. It can be understood that the error threshold is related to the number of columns of the first matrix or the number of rows of the second matrix (K). If K is different, the error threshold needs to be reconfigured. In addition, in the process of generating the first matrix and the second matrix, a large number of random number generation operations need to be performed, and a large number of random numbers need to be written into storage separately, which will take a lot of time. In addition, in the process of performing matrix multiplication operations, the central computing unit is required to perform a large number of calculations and memory access operations, and as the calculation scale grows, the time consumption will also increase.
例如,可以使用中央计算单元预先生成好第一矩阵和第二矩阵,并提前计算基准结果矩阵,并将第一矩阵、第二矩阵和基准结果矩阵都存储至相应存储单元。在测试时,可以加载(load)这些已经储存好的矩阵数据,并利用人工智能芯片计算出待测结果矩阵。也可以计算待测结果矩阵中每个值与基准结果中相应值之间的绝对误差和/或相对误差。将该绝对误差和/或相对误差,与误差阈值进行比较,可以得到比较结果。可以理解,误差阈值仍与第一矩阵的列数目或第二矩阵的行数目(K)相关,若K不同,需要重新配置误差阈值。此外,存储第一矩阵、第二矩阵和基准矩阵需要耗费大量的存储资源。若矩阵规模增大或测试用例(case)增多,存储资源的开销会进一步增加。此外,在预先生成第一矩阵和第二矩阵的情况下,难以实现随机测试,只能使用一些固定规模的矩阵进行测试,导致测试覆盖率较低。For example, the first matrix and the second matrix can be generated in advance using a central computing unit, and the benchmark result matrix can be calculated in advance, and the first matrix, the second matrix and the benchmark result matrix can be stored in the corresponding storage unit. During the test, these stored matrix data can be loaded, and the test result matrix can be calculated using an artificial intelligence chip. The absolute error and/or relative error between each value in the test result matrix and the corresponding value in the benchmark result can also be calculated. The absolute error and/or relative error can be compared with the error threshold to obtain a comparison result. It can be understood that the error threshold is still related to the number of columns of the first matrix or the number of rows (K) of the second matrix. If K is different, the error threshold needs to be reconfigured. In addition, storing the first matrix, the second matrix and the benchmark matrix requires a large amount of storage resources. If the matrix size increases or the number of test cases increases, the storage resource overhead will increase further. In addition, when the first matrix and the second matrix are generated in advance, it is difficult to implement random testing, and only some fixed-size matrices can be used for testing, resulting in low test coverage.
由此,为了有效地提高测试效率,本公开提供了一种计算单元的测试方法,下面将进行说明。Therefore, in order to effectively improve the testing efficiency, the present disclosure provides a testing method for a computing unit, which will be described below.
图1是根据本公开一个实施例的计算单元的测试方法的示意流程图。FIG. 1 is a schematic flowchart of a method for testing a computing unit according to an embodiment of the present disclosure.
如图1所示,该方法100可以包括操作S110至操作S130。As shown in FIG. 1 , the method 100 may include operations S110 to S130 .
在操作S110,根据第一三角函数值序列、第二三角函数值序列和第三三角函数值序列,利用目标计算单元分别得到第一矩阵、第二矩阵和基准矩阵。In operation S110, a first matrix, a second matrix, and a reference matrix are obtained respectively using a target computing unit according to the first trigonometric function value sequence, the second trigonometric function value sequence, and the third trigonometric function value sequence.
在本公开实施例中,目标计算单元可以为上述中央计算单元,也可以是主机端(host)的计算单元。In the embodiment of the present disclosure, the target computing unit may be the above-mentioned central computing unit, or may be a computing unit of a host.
在本公开实施例中,第一矩阵可以包括至少一个第一向量。第一向量可以是通过将第一三角函数值序列沿第一方向循环移动第一移动位数得到的。例如,第一三角函数值可以为第一正弦值。第一移动位数可以为大于或等于0的值。In an embodiment of the present disclosure, the first matrix may include at least one first vector. The first vector may be obtained by cyclically shifting a first trigonometric function value sequence along a first direction by a first shifting bit number. For example, the first trigonometric function value may be a first sine value. The first shifting bit number may be a value greater than or equal to 0.
在本公开实施例中,第二矩阵可以包括至少一个第二向量。第二向量可以是通过将第二三角函数值序列沿第二方向循环移动第二移动位数得到的。例如,第二三角函数值可以为第二正弦值。第二移动位数可以为大于或等于0的值。In the disclosed embodiment, the second matrix may include at least one second vector. The second vector may be obtained by cyclically shifting the second trigonometric function value sequence along the second direction by a second shifting number of bits. For example, the second trigonometric function value may be a second sine value. The second shifting number of bits may be a value greater than or equal to 0.
在本公开实施例中,第一方向可以与第二方向相同,也可以与第二方向不同。In the embodiment of the present disclosure, the first direction may be the same as the second direction, or may be different from the second direction.
在本公开实施例中,循环移动可以为改变序列中两个子序列的顺序。例如,以序列“1,2,3,4”为例,若向右移动2位,可以得到序列“3,4,1,2”。子序列“1,2”和子序列“3,4”之间的顺序被调整。仍以序列“1,2,3,4”为例,若向左移动1位,可以得到序列“2,3,4,1”。子序列“2,3,4”和子序列“1”之间的顺序被调整。In the disclosed embodiment, the circular shift may be to change the order of two subsequences in the sequence. For example, taking the sequence "1,2,3,4" as an example, if it is shifted to the right by 2 bits, the sequence "3,4,1,2" can be obtained. The order between the subsequence "1,2" and the subsequence "3,4" is adjusted. Still taking the sequence "1,2,3,4" as an example, if it is shifted to the left by 1 bit, the sequence "2,3,4,1" can be obtained. The order between the subsequence "2,3,4" and the subsequence "1" is adjusted.
在本公开实施例中,第三三角函数值序列的相位值是根据第一三角函数值序列的相位值与第二三角函数值的相位值之差得到的。例如,第一三角函数值序列可以包括K个第一三角函数值。第二三角函数值序列可以包括K个第二三角函数值。第三三角函数值序列可以包括K个第三三角函数值。每个三角函数值可以是利用三角函数处理一相位值得到的。可以确定第一三角函数值的相位值与对应第二三角函数值之间的相位值之差。根据该相位值之差,可以确定K个相位值。可以理解,两个三角函数值的乘积,可以利用积化和差公式,转化为相位差的三角函数值。In the disclosed embodiment, the phase value of the third trigonometric function value sequence is obtained based on the difference between the phase value of the first trigonometric function value sequence and the phase value of the second trigonometric function value. For example, the first trigonometric function value sequence may include K first trigonometric function values. The second trigonometric function value sequence may include K second trigonometric function values. The third trigonometric function value sequence may include K third trigonometric function values. Each trigonometric function value may be obtained by processing a phase value using a trigonometric function. The difference between the phase value of the first trigonometric function value and the phase value of the corresponding second trigonometric function value may be determined. Based on the difference in the phase values, K phase values may be determined. It can be understood that the product of two trigonometric function values can be converted into a trigonometric function value of a phase difference using a product-to-sum formula.
在操作S120,利用待测计算单元将第一矩阵和第二矩阵相乘,得到待测结果矩阵。In operation S120, the first matrix and the second matrix are multiplied by the computing unit to be tested to obtain a result matrix to be tested.
在本公开实施例中,待测计算单元可以为上述人工智能芯片中的矩阵计算单元或向量计算单元。In the embodiment of the present disclosure, the computing unit to be tested may be a matrix computing unit or a vector computing unit in the above-mentioned artificial intelligence chip.
在操作S130,根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的精度测试结果。In operation S130, the accuracy test result of the computing unit to be tested is determined according to the difference between the result matrix to be tested and the reference matrix.
在本公开实施例中,可以利用目标计算单元和待测计算单元中至少之一确定精度测试结果。例如,可以利用目标计算单元确定精度测试结果。In the embodiment of the present disclosure, the accuracy test result can be determined by using at least one of the target computing unit and the computing unit to be tested. For example, the accuracy test result can be determined by using the target computing unit.
在本公开实施例中,可以计算待测结果矩阵中每个值与基准结果中相应值之间的绝对误差和/或相对误差。将该绝对误差和/或相对误差,与误差阈值进行比较,可以得到精度测试结果。In the disclosed embodiment, the absolute error and/or relative error between each value in the test result matrix and the corresponding value in the reference result can be calculated. The absolute error and/or relative error is compared with the error threshold to obtain the accuracy test result.
在本公开实施例中,精度测试结果可以指示待测计算单元的精度是否满足需求。In the embodiment of the present disclosure, the accuracy test result may indicate whether the accuracy of the computing unit to be tested meets the requirements.
通过本公开实施例,第一矩阵和第二矩阵均包括多个三角函数值。三角函数值之间的乘积运算,可以由积化和差公式转换为相应的三角函数运算。目标计算单元涉及的矩阵运算被转换为求三角函数值的运算。由此,目标计算单元的计算负载大幅降低,可以高效地实现随机测试,提高测试覆盖率。According to the disclosed embodiment, the first matrix and the second matrix each include a plurality of trigonometric function values. The product operation between the trigonometric function values can be converted into the corresponding trigonometric function operation by the product-to-difference formula. The matrix operation involved in the target computing unit is converted into the operation of finding the trigonometric function value. As a result, the computational load of the target computing unit is greatly reduced, random testing can be efficiently implemented, and the test coverage rate is improved.
可以理解,上文对本公开的方法进行了说明,下面将对本公开的原理进行说明。It can be understood that the method of the present disclosure is described above, and the principle of the present disclosure will be described below.
可以理解,积化和差公式可以包括以下公式一:It can be understood that the product-to-sum-difference formula may include the following formula 1:
(公式一) (Formula 1)
为一个相位值。为另一个相位值。下面将结合公式一对本公开的原理进行说 明。 is a phase value. is another phase value. The principle of the present disclosure will be described below in conjunction with Formula 1.
在一些实施例中,上述方法还可以包括:利用目标计算单元分别生成第一初始相位值、第二初始相位值和规模参数。例如,可以随机生成两个相位值,分别作为第一初始相位值φ0和第二初始相位值φ1。也可以生成规模参数K。K可以为大于或等于1的值。In some embodiments, the method may further include: using the target calculation unit to generate a first initial phase value, a second initial phase value, and a scale parameter. For example, two phase values may be randomly generated as the first initial phase value φ 0 and the second initial phase value φ 1 . A scale parameter K may also be generated. K may be a value greater than or equal to 1.
在一些实施例中,上述方法还可以包括:根据预设弧度、规模参数和第一初始相位值,生成第一相位序列。例如,预设弧度可以为2π。利用预设弧度和规模参数,可以确定角速度参数2π/K。基于该角速度参数和第一初始相位值,可以确定第一相位序列的K个第一相位值。可以确定第一相位序列中每个第一相位值的正弦值,得到第一三角函数值序列。第一三角函数值序列可以表示为:In some embodiments, the method may further include: generating a first phase sequence according to a preset radian, a scale parameter, and a first initial phase value. For example, the preset radian may be 2π. Using the preset radian and the scale parameter, an angular velocity parameter 2π/K may be determined. Based on the angular velocity parameter and the first initial phase value, K first phase values of the first phase sequence may be determined. The sine value of each first phase value in the first phase sequence may be determined to obtain a first trigonometric function value sequence . The first trigonometric function value sequence It can be expressed as:
(公式二) (Formula 2)
在一些实施例中,上述方法还可以包括:根据预设弧度、规模参数和第二初始相位值,生成第二相位序列。例如,预设弧度可以为2π。利用预设弧度和规模参数,可以确定角速度参数2π/K。基于该角速度参数和第二初始相位值,可以确定第二相位序列的K个第二相位值。可以确定第二相位序列中每个第二相位值的正弦值,得到第二三角函数值序列。第二三角函数值序列可以表示为:In some embodiments, the method may further include: generating a second phase sequence according to a preset radian, a scale parameter, and a second initial phase value. For example, the preset radian may be 2π. Using the preset radian and the scale parameter, an angular velocity parameter 2π/K may be determined. Based on the angular velocity parameter and the second initial phase value, K second phase values of the second phase sequence may be determined. The sine value of each second phase value in the second phase sequence may be determined to obtain a second trigonometric function value sequence . The second trigonometric function value sequence It can be expressed as:
(公式三) (Formula 3)
例如,若将第一相位序列作为第一矩阵的第一行,将第二相位序列作为第二矩阵的第二行。将第一矩阵的第一行与第二矩阵的第二行相乘,可以得到基准矩阵第一行第一例的基准值X:For example, if the first phase sequence is used as the first row of the first matrix and the second phase sequence is used as the second row of the second matrix, the first row of the first matrix and the second row of the second matrix are multiplied to obtain the reference value X of the first row of the reference matrix:
(公式四) (Formula 4)
利用积化和差公式,可以将公式四转换为:Using the product-to-difference formula, formula 4 can be converted to:
(公式五) (Formula 5)
令φ0+φ1=φ,并令,可以得到:Let φ0+φ1=φ, and let , we can get:
(公式六) (Formula 6)
根据欧拉公式以及等比数列求和公式,可以对公式五进行变换:According to Euler's formula and the geometric series summation formula, Formula 5 can be transformed:
(公式七) (Formula 7)
由此,根据公式四和公式六,可以确定基准值X为:Therefore, according to Formula 4 and Formula 6, the reference value X can be determined as:
(公式八) (Formula 8)
可以理解,K可以为大于或等于3的整数。It can be understood that K can be an integer greater than or equal to 3.
可以理解,上文以第一三角函数值序列是第一正弦值序列、第二三角函数值序列是第二正弦值序列且第三三角函数值序列是第三余弦值序列为示例,对本公开的原理进行了说明,下面将对本公开的方法进行进一步说明。It can be understood that the above uses the example that the first trigonometric function value sequence is a first sine value sequence, the second trigonometric function value sequence is a second sine value sequence, and the third trigonometric function value sequence is a third cosine value sequence to illustrate the principle of the present disclosure. The method of the present disclosure will be further illustrated below.
图2是根据本公开的一个实施例的第一矩阵、第二矩阵和基准矩阵的示意图。FIG. 2 is a schematic diagram of a first matrix, a second matrix, and a reference matrix according to an embodiment of the present disclosure.
如图2所示,可以利用目标计算单元生成第一三角函数值序列tri201和第二三角函数值序列tri202。第一三角函数值序列tri201可以为第一正弦值序列。第二三角函数值序列tri202可以为第二正弦值序列。第一三角函数值序列tri201可以包括第1个第一三角函数值至第K个第一三角函数值。第二三角函数值序列tri202可以包括第1个第二三角函数值至第K个第二三角函数值。K可以为大于1的整数。如图2所示,K可以为10。可以理解,第一三角函数值序列tri201可以为上述第一三角函数值序列。第二三角函数值序列tri202可以为上述第一三角函数值序列。即,第一三角函数值序列tri201的K个第一相位值依次增大。第二三角函数值序列tri202的K个第二相位值依次增大。As shown in Figure 2, the target computing unit can be used to generate a first trigonometric function value sequence tri201 and a second trigonometric function value sequence tri202. The first trigonometric function value sequence tri201 can be a first sine value sequence. The second trigonometric function value sequence tri202 can be a second sine value sequence. The first trigonometric function value sequence tri201 can include the 1st first trigonometric function value to the Kth first trigonometric function value. The second trigonometric function value sequence tri202 can include the 1st second trigonometric function value to the Kth second trigonometric function value. K can be an integer greater than 1. As shown in Figure 2, K can be 10. It can be understood that the first trigonometric function value sequence tri201 can be the above-mentioned first trigonometric function value sequence. The second trigonometric function value sequence tri202 may be the first trigonometric function value sequence That is, the K first phase values of the first trigonometric function value sequence tri201 increase sequentially. The K second phase values of the second trigonometric function value sequence tri202 increase sequentially.
在本公开实施例中,根据规模参数、第一三角函数值序列的相位值与第二三角函数值序列的相位值之差,可以利用目标计算单元生成第三三角函数值序列。例如,根据相位值之差以及上述角速度参数(2π/K),可以得到第三相位序列的K个第三相位值。第三三角函数值序列可以利用上述公式八处理K个第三相位值得到。如图2所示,可以利用目标计算单元生成第三三角函数值序列tri203。第三三角函数值序列tri203可以为第三余弦值序列。第三三角函数值序列tri203可以包括第1个第三三角函数值至第K个第三三角函数值。通过本公开实施例,第三三角函数值序列可以是基于第一相位值和第二相位值之差确定的,为了简化计算提供了可能,有助于准确、低成本地生成基准矩阵。In an embodiment of the present disclosure, a third trigonometric function value sequence can be generated using a target computing unit according to a scale parameter, a phase value of a first trigonometric function value sequence, and a phase value difference of a second trigonometric function value sequence. For example, according to the difference in phase values and the above-mentioned angular velocity parameter (2π/K), K third phase values of a third phase sequence can be obtained. The third trigonometric function value sequence can be obtained by processing K third phase values using the above-mentioned formula eight. As shown in FIG2 , a third trigonometric function value sequence tri203 can be generated using a target computing unit. The third trigonometric function value sequence tri203 can be a third cosine value sequence. The third trigonometric function value sequence tri203 can include the first third trigonometric function value to the Kth third trigonometric function value. Through an embodiment of the present disclosure, the third trigonometric function value sequence can be determined based on the difference between the first phase value and the second phase value, which provides a possibility for simplifying calculations and helps to accurately and cost-effectively generate a reference matrix.
在一些实施例中,在上述操作S110的一些实施方式中,可以根据第一三角函数值序列,利用目标计算单元得到第一矩阵。第一矩阵可以包括至少一个第一向量。第一向量可以是通过将第一三角函数值序列沿第一方向循环移动第一移动位数得到的。In some embodiments, in some implementations of the above operation S110, a first matrix may be obtained using a target computing unit according to the first trigonometric function value sequence. The first matrix may include at least one first vector. The first vector may be obtained by cyclically shifting the first trigonometric function value sequence along a first direction by a first shifting bit number.
在本公开实施例中,第一矩阵可以是M×K的矩阵。M可以为小于或等于K的整数。如图2所示,第一矩阵A200包括M%K行。每一行可以为一第一向量。可以理解,在M=K的情况下,第一矩阵可以包括K行。In the embodiment of the present disclosure, the first matrix may be an M×K matrix. M may be an integer less than or equal to K. As shown in FIG2 , the first matrix A200 includes M%K rows. Each row may be a first vector. It is understood that in the case of M=K, the first matrix may include K rows.
在本公开实施例中,第一移动位数为i。i可以为大于或等于0且小于K的整数。i可以为0。即,第一三角函数值序列tri201可以作为一个第一向量。第一方向可以是沿第一相位值依次减小的方向。如图2所示,第一方向可以是从第K个第一三角函数值至第1个第一三角函数值的方向。i也可以为1,沿第一方向将第一三角函数值序列tri201循环移动1位,可以得到一第一向量,作为第一矩阵A200的第2行。i也可以为2,沿第一方向将第一三角函数值序列tri201循环移动2位,可以得到一第一向量,作为第一矩阵A200的第3行。i也可以为3,沿第一方向将第一三角函数值序列tri201循环移动3位,可以得到一第一向量,作为第一矩阵A200的第4行。In the embodiment of the present disclosure, the first shift bit number is i. i may be an integer greater than or equal to 0 and less than K. i may be 0. That is, the first trigonometric function value sequence tri201 may be used as a first vector. The first direction may be a direction that decreases successively along the first phase value. As shown in FIG2 , the first direction may be a direction from the Kth first trigonometric function value to the 1st first trigonometric function value. i may also be 1, and the first trigonometric function value sequence tri201 is circularly shifted by 1 bit along the first direction to obtain a first vector as the 2nd row of the first matrix A200. i may also be 2, and the first trigonometric function value sequence tri201 is circularly shifted by 2 bits along the first direction to obtain a first vector as the 3rd row of the first matrix A200. i may also be 3, and the first trigonometric function value sequence tri201 is circularly shifted by 3 bits along the first direction to obtain a first vector as the 4th row of the first matrix A200.
在本公开实施例中,M=i+1。如图2所示,第一矩阵A200的第2行对应的第一移动位数为1。In the embodiment of the present disclosure, M=i+1. As shown in FIG2 , the first shift bit number corresponding to the second row of the first matrix A200 is 1.
在本公开实施例中,在i大于或等于1的情况下,第一向量依次包括第一在前子向量和第一在后子向量,第一在前子向量包括第i+1个至第K个第一三角函数值,第一在后子向量包括第1个至第i个第一三角函数值。如图2所示,与i=1对应的第一向量作为了第一矩阵的第2行。与i=1对应的第一向量包括第一在前子向量和第一在后子向量。第一在前子向量包括第2个第一三角函数值至第K个第一三角函数值。第一在后子向量包括第1个三角函数值。如图2所示,与i=2对应的第一向量作为了第一矩阵的第3行。与i=2对应的第一向量包括第一在前子向量和第一在后子向量。第一在前子向量包括第3个第一三角函数值至第K个第一三角函数值。第一在后子向量包括第1个第一三角函数值至第2个第一三角函数值。In the embodiment of the present disclosure, when i is greater than or equal to 1, the first vector includes the first preceding subvector and the first succeeding subvector in sequence, the first preceding subvector includes the i+1th to the Kth first trigonometric function values, and the first succeeding subvector includes the 1st to the ith first trigonometric function values. As shown in FIG2 , the first vector corresponding to i=1 serves as the 2nd row of the first matrix. The first vector corresponding to i=1 includes the first preceding subvector and the first succeeding subvector. The first preceding subvector includes the 2nd to the Kth first trigonometric function values. The first succeeding subvector includes the 1st trigonometric function value. As shown in FIG2 , the first vector corresponding to i=2 serves as the 3rd row of the first matrix. The first vector corresponding to i=2 includes the first preceding subvector and the first succeeding subvector. The first preceding subvector includes the 3rd to the Kth first trigonometric function values. The first succeeding subvector includes the 1st to the 2nd first trigonometric function values.
可以理解,上文对本公开的第一矩阵进行了说明,下面将对本公开的第二矩阵进行说明。It can be understood that the first matrix of the present disclosure is described above, and the second matrix of the present disclosure will be described below.
在一些实施例中,在上述操作S110的一些实施方式中,可以根据第二三角函数值序列,利用目标计算单元得到第二矩阵。第二矩阵可以包括至少一个第二向量。第二向量可以是通过将第二三角函数值序列沿第二方向循环移动第二移动位数得到的。In some embodiments, in some implementations of the above operation S110, a second matrix may be obtained using a target computing unit according to the second trigonometric function value sequence. The second matrix may include at least one second vector. The second vector may be obtained by cyclically shifting the second trigonometric function value sequence along the second direction by a second shifting bit number.
在本公开实施例中,第二矩阵可以是N×K的矩阵。如图2所示,第二矩阵B200包括N行。每一行可以为一第二向量。N可以为小于或等于K的整数。In the embodiment of the present disclosure, the second matrix may be an N×K matrix. As shown in FIG2 , the second matrix B200 includes N rows. Each row may be a second vector. N may be an integer less than or equal to K.
在本公开实施例中,第二移动位数为j。j为大于或等于0且小于K的整数。j可以为0。即,第二三角函数值序列tri202可以作为一个第二向量。第二方向可以是沿第二相位值依次增大的方向。如图2所示,第二方向可以是从第1个第二三角函数值至第K个第二三角函数值的方向。j也可以为1,沿第二方向将第二三角函数值序列tri202循环移动1位,可以得到一第二向量,作为第二矩阵B200的第2行。j也可以为2,沿第二方向将第二三角函数值序列tri202循环移动2位,可以得到一第二向量,作为第二矩阵B200的第3行。i也可以为3,沿第二方向将第二三角函数值序列tri202循环移动3位,可以得到一第二向量,作为第二矩阵B200的第4行。通过本公开实施例,沿第一方向和第二方向分别循环移动三角函数值序列,可以确定出待相乘的两个矩阵的不同的行或列,可以生成与实际应用场景相同规模的矩阵,有助于进一步提高测试的准确性。In the embodiment of the present disclosure, the second shift bit number is j. j is an integer greater than or equal to 0 and less than K. j can be 0. That is, the second trigonometric function value sequence tri202 can be used as a second vector. The second direction can be a direction in which the second phase value increases successively. As shown in FIG2 , the second direction can be a direction from the 1st second trigonometric function value to the Kth second trigonometric function value. j can also be 1, and the second trigonometric function value sequence tri202 is circularly shifted by 1 bit along the second direction to obtain a second vector as the 2nd row of the second matrix B200. j can also be 2, and the second trigonometric function value sequence tri202 is circularly shifted by 2 bits along the second direction to obtain a second vector as the 3rd row of the second matrix B200. i can also be 3, and the second trigonometric function value sequence tri202 is circularly shifted by 3 bits along the second direction to obtain a second vector as the 4th row of the second matrix B200. Through the embodiments of the present disclosure, by cyclically moving the trigonometric function value sequence along the first direction and the second direction respectively, different rows or columns of the two matrices to be multiplied can be determined, and a matrix of the same scale as the actual application scenario can be generated, which helps to further improve the accuracy of the test.
在本公开实施例中,N=j+1。如图2所示,第二矩阵B200的第2行对应的第二移动位数为1。In the embodiment of the present disclosure, N=j+1. As shown in FIG2 , the second shift bit number corresponding to the second row of the second matrix B200 is 1.
在本公开实施例中,在j大于或等于1的情况下,第二向量依次包括第二在前子向量和第二在后子向量,第二在前子向量包括第K-j+1个至第K个第二三角函数值,第一在后子向量包括第1个至第K-j个第二三角函数。如图2所示,与j=1对应的第二向量作为了第二矩阵的第2行。与j=1对应的第二向量包括第二在前子向量和第二在后子向量。第二在前子向量包括第K个第二三角函数值。第二在后子向量包括第1个第二三角函数值至第K-1个第二三角函数值。如图2所示,与j=2对应的第二向量作为了第二矩阵的第3行。与j=2对应的第二向量包括第二在前子向量和第二在后子向量。第一在前子向量包括第K-1个第一三角函数值至第K个第一三角函数值。第一在后子向量包括第1个第一三角函数值至第K-2个第一三角函数值。In the embodiment of the present disclosure, when j is greater than or equal to 1, the second vector includes the second preceding subvector and the second succeeding subvector in sequence, the second preceding subvector includes the K-j+1th to the Kth second trigonometric function values, and the first succeeding subvector includes the 1st to the K-jth second trigonometric function values. As shown in FIG2 , the second vector corresponding to j=1 serves as the 2nd row of the second matrix. The second vector corresponding to j=1 includes the second preceding subvector and the second succeeding subvector. The second preceding subvector includes the Kth second trigonometric function value. The second succeeding subvector includes the 1st second trigonometric function value to the K-1th second trigonometric function value. As shown in FIG2 , the second vector corresponding to j=2 serves as the 3rd row of the second matrix. The second vector corresponding to j=2 includes the second preceding subvector and the second succeeding subvector. The first preceding subvector includes the K-1th first trigonometric function value to the Kth first trigonometric function value. The first succeeding subvector includes the 1st first trigonometric function value to the K-2th first trigonometric function value.
可以理解,上文对本公开的第二矩阵进行了说明,下面将对本公开的基准矩阵进行说明。It can be understood that the second matrix of the present disclosure is described above, and the reference matrix of the present disclosure will be described below.
在一些实施例中,在上述操作S110的一些实施方式中,根据第三三角函数值序列,还可以利用目标计算单元生成基准矩阵。In some embodiments, in some implementations of the above operation S110, a reference matrix may also be generated by using a target computing unit according to the third trigonometric function value sequence.
在本公开实施例中,基准矩阵可以是M×N的矩阵。如图2所示,基准矩阵C200包括M%K行,也包括N%K列。In the embodiment of the present disclosure, the reference matrix may be an M×N matrix. As shown in FIG2 , the reference matrix C200 includes M%K rows and N%K columns.
在本公开实施例中,基准矩阵包括多个基准值,与第一向量和第二向量对应的基准值是第三三角函数值序列中与移动参数对应的第三三角函数值,移动参数是根据第一移动位数和第二移动位数得到的。如图2所示,基准矩阵C200可以包括M*N个基准值。通过本公开实施例,利用第一移动位数和第二移动位数得到的移动参数,可以准确地确定第一向量和第二向量乘积累加的基准值,可以有效提高基准矩阵的正确率,提高测试精度。In the embodiment of the present disclosure, the reference matrix includes a plurality of reference values, and the reference values corresponding to the first vector and the second vector are third trigonometric function values corresponding to the shift parameters in the third trigonometric function value sequence, and the shift parameters are obtained according to the first shift bit number and the second shift bit number. As shown in FIG2 , the reference matrix C200 may include M*N reference values. Through the embodiment of the present disclosure, the shift parameters obtained by using the first shift bit number and the second shift bit number can accurately determine the reference value of the product accumulation of the first vector and the second vector, which can effectively improve the accuracy of the reference matrix and improve the test accuracy.
在本公开实施例中,移动参数是根据第一移动位数、第二移动位数和预设值得到的。例如,可以通过以下公式确定移动参数z:In the embodiment of the present disclosure, the movement parameter is obtained according to the first movement number, the second movement number and the preset value. For example, the movement parameter z can be determined by the following formula:
(公式九) (Formula 9)
g为大于或等于1的整数。g is an integer greater than or equal to 1.
在本公开实施例中,基准值为第三三角函数值序列中第z个第三三角函数值。如图2所示,与第一矩阵A200的第1行对应的第一移动位数为0,与第二矩阵B200的第1行对应的第二移动位数为0。第一矩阵A200的第1行和第二矩阵B200的第1行之间的乘累加结果可以为第三三角函数值序列tri203中第1个第三三角函数值。与第一矩阵A200的第1行对应的第一移动位数为0,与第二矩阵B200的第2行对应的第二移动位数为1。第一矩阵A200的第1行和第二矩阵B200的第2行之间的乘累加结果可以为第三三角函数值序列tri203中第2个第三三角函数值。In the embodiment of the present disclosure, the reference value is the zth third trigonometric function value in the third trigonometric function value sequence. As shown in FIG2 , the first number of shift bits corresponding to the first row of the first matrix A200 is 0, and the second number of shift bits corresponding to the first row of the second matrix B200 is 0. The multiplication and accumulation result between the first row of the first matrix A200 and the first row of the second matrix B200 can be the first third trigonometric function value in the third trigonometric function value sequence tri203. The first number of shift bits corresponding to the first row of the first matrix A200 is 0, and the second number of shift bits corresponding to the second row of the second matrix B200 is 1. The multiplication and accumulation result between the first row of the first matrix A200 and the second row of the second matrix B200 can be the second third trigonometric function value in the third trigonometric function value sequence tri203.
可以理解,第一矩阵的行数目可以为任意值,第二矩阵的行数目也可以为任意值。下面将以M=N=K为示例,对本公开的基准矩阵进行进一步说明。It can be understood that the number of rows of the first matrix can be any value, and the number of rows of the second matrix can also be any value. The following will take M=N=K as an example to further illustrate the reference matrix of the present disclosure.
在本公开实施例中,在第一矩阵的规模、第二矩阵的规模以及基准矩阵的规模一致的情况下,基准矩阵的基准向量是通过将第三三角函数值序列沿第一方向循环移动第一移动位数得到的。如图2所示,若M=N=K,第一移动位数为i。i可以为大于或等于0且小于K的整数。i可以为0。即,第三三角函数值序列tri203可以作为一个基准向量。第一方向可以是沿第一相位值依次减小的方向。如图2所示,第一方向可以是从第K个第三三角函数值至第1个第三三角函数值的方向。i也可以为1,沿第一方向将第三三角函数值序列tri203循环移动1位,可以得到一基准向量,作为基准矩阵A200的第2行。i也可以为2,沿第一方向将第三三角函数值序列tri203循环移动2位,可以得到一基准向量,作为基准矩阵C200的第3行。i也可以为3,沿第一方向将第三三角函数值序列tri203循环移动3位,可以得到一基准向量,作为基准矩阵C200的第4行。通过本公开实施例,可以高效、快速地生成测试数据,提高测试效率。In the embodiment of the present disclosure, when the scale of the first matrix, the scale of the second matrix and the scale of the reference matrix are consistent, the reference vector of the reference matrix is obtained by circularly shifting the third trigonometric function value sequence along the first direction by the number of first shift bits. As shown in FIG2, if M=N=K, the first number of shift bits is i. i can be an integer greater than or equal to 0 and less than K. i can be 0. That is, the third trigonometric function value sequence tri203 can be used as a reference vector. The first direction can be a direction in which the first phase value decreases successively. As shown in FIG2, the first direction can be a direction from the Kth third trigonometric function value to the 1st third trigonometric function value. i can also be 1, and the third trigonometric function value sequence tri203 is circularly shifted by 1 bit along the first direction, and a reference vector can be obtained as the second row of the reference matrix A200. i can also be 2, and the third trigonometric function value sequence tri203 is circularly shifted by 2 bits along the first direction, and a reference vector can be obtained as the third row of the reference matrix C200. i can also be 3, and the third trigonometric function value sequence tri203 is circularly shifted by 3 bits along the first direction to obtain a reference vector as the fourth row of the reference matrix C200. Through the embodiments of the present disclosure, test data can be generated efficiently and quickly, thereby improving test efficiency.
可以理解,上文结合图2对本公开的第一矩阵、第二矩阵和基准矩阵进行了说明,下面将结合具体的矩阵示例对本公开的第一矩阵、第二矩阵和基准矩阵进行进一步说明。It can be understood that the first matrix, the second matrix and the reference matrix of the present disclosure are described above in conjunction with FIG. 2 , and the first matrix, the second matrix and the reference matrix of the present disclosure will be further described below in conjunction with specific matrix examples.
在一些实施例中,第一三角函数值对应的第一相位序列为等差数列,第一相位序列的第一公差是根据预设弧度和规模参数确定的。例如,预设弧度可以为2π。规模参数可以为K。以K=4为示例,第一公差可以为π/2。第一相位序列可以为“0,π/2,π,3π/2”。第一三角函数值序列可以为第一正弦值序列<0,1,0,-1>。In some embodiments, the first phase sequence corresponding to the first trigonometric function value is an arithmetic progression, and the first tolerance of the first phase sequence is determined according to a preset radian and a scale parameter. For example, the preset radian may be 2π. The scale parameter may be K. Taking K=4 as an example, the first tolerance may be π/2. The first phase sequence may be “0, π/2, π, 3π/2”. The first trigonometric function value sequence may be a first sine value sequence <0, 1, 0, -1>.
在一些实施例中,第二三角函数值对应的第二相位序列为等差数列,第二相位序列的第二公差是根据预设弧度和规模参数确定的。例如,预设弧度可以为2π。规模参数可以为K。以K=4为示例,第二公差可以为π/2。第二相位序列可以为“0,π/2,π,3π/2”。第二三角函数值序列可以为第二正弦值序列<0,1,0,-1>。In some embodiments, the second phase sequence corresponding to the second trigonometric function value is an arithmetic progression, and the second tolerance of the second phase sequence is determined according to a preset radian and a scale parameter. For example, the preset radian may be 2π. The scale parameter may be K. Taking K=4 as an example, the second tolerance may be π/2. The second phase sequence may be “0, π/2, π, 3π/2”. The second trigonometric function value sequence may be a second sine value sequence <0, 1, 0, -1>.
在一些实施例中,第三三角函数值对应的第三相位序列为等差数列,第三相位序列的第三公差是根据预设弧度和规模参数确定的。第三相位序列的第三初始相位值可以是根据第一初始相位值和第二初始相位值之差得到的。例如,预设弧度可以为2π。规模参数可以为K。第一初始相位值可以为0。第二初始相位值可以为0。由此,第三初始相位值为0。以K=4为示例,第三公差可以为π/2。第三相位序列可以为“0,π/2,π,3π/2”。第三三角函数值序列可以第三余弦值序列。基于上述公式七,第三三角函数值序列可以为<2,0,-2,0>。In some embodiments, the third phase sequence corresponding to the third trigonometric function value is an arithmetic progression, and the third tolerance of the third phase sequence is determined according to a preset radian and a scale parameter. The third initial phase value of the third phase sequence may be obtained according to the difference between the first initial phase value and the second initial phase value. For example, the preset radian may be 2π. The scale parameter may be K. The first initial phase value may be 0. The second initial phase value may be 0. Thus, the third initial phase value is 0. Taking K=4 as an example, the third tolerance may be π/2. The third phase sequence may be "0,π/2,π,3π/2". The third trigonometric function value sequence may be a third cosine value sequence. Based on the above formula seven, the third trigonometric function value sequence may be <2,0,-2,0>.
接下来,可以根据第一三角函数值序列、第二三角函数值序列和第三三角函数值序列,利用目标计算单元分别得到第一矩阵、第二矩阵和基准矩阵。如上述,在获得第一矩阵、第二矩阵和基准矩阵的过程中,可以对三角函数值序列进行循环移位。可以理解,可以利用各种方式实现循环移位。例如,可以通过存储复制(memcpy)相应值的方式,实现循环移位。Next, the first matrix, the second matrix, and the reference matrix can be obtained respectively using the target computing unit according to the first trigonometric function value sequence, the second trigonometric function value sequence, and the third trigonometric function value sequence. As described above, in the process of obtaining the first matrix, the second matrix, and the reference matrix, the trigonometric function value sequence can be cyclically shifted. It can be understood that the cyclic shift can be implemented in various ways. For example, the cyclic shift can be implemented by storing and copying (memcpy) the corresponding values.
在一些实施例中,在上述操作S110的另一些实施方式中,利用目标计算单元分别确定第一矩阵、第二矩阵和基准矩阵包括:利用目标计算单元分别复制第i+1个至第K个第一三角函数值以及第1个至第i个第一三角函数值,得到第一矩阵的第一向量。例如,在i=0的情况下,可以复制第1个至第K个第一三角函数值<0,1,0,-1>,作为第一矩阵的第1行。在i=1的情况下,可以复制第2个至第4个第一三角函数值<1,0,-1>和第1个第一三角函数值<0>,作为第一矩阵的第2行<1,0,-1,0>。在i=2的情况下,可以复制第3个至第4个第一三角函数值<0,-1>和第1个至第2个第一三角函数值<0,1>,作为第一矩阵的第3行<0,-1,0,1>。在i=3的情况下,可以复制第4个第一三角函数值<-1>和第1个至第3个第一三角函数值<0,1,0>,作为第一矩阵的第4行<-1,0,1,0>。由此,第一矩阵可以为:In some embodiments, in other implementations of the above operation S110, using the target computing unit to respectively determine the first matrix, the second matrix, and the reference matrix includes: using the target computing unit to respectively copy the i+1th to Kth first trigonometric function values and the 1st to ith first trigonometric function values to obtain the first vector of the first matrix. For example, in the case of i=0, the 1st to Kth first trigonometric function values <0,1,0,-1> can be copied as the 1st row of the first matrix. In the case of i=1, the 2nd to 4th first trigonometric function values <1,0,-1> and the 1st first trigonometric function value <0> can be copied as the 2nd row <1,0,-1,0> of the first matrix. In the case of i=2, the 3rd to 4th first trigonometric function values <0,-1> and the 1st to 2nd first trigonometric function values <0,1> can be copied as the 3rd row <0,-1,0,1> of the first matrix. In the case of i=3, the 4th first trigonometric function value <-1> and the 1st to 3rd first trigonometric function values <0,1,0> can be copied as the 4th row <-1,0,1,0> of the first matrix. Thus, the first matrix can be:
(公式十) (Formula 10)
在一些实施例中,在上述操作S110的另一些实施方式中,利用目标计算单元分别确定第一矩阵、第二矩阵和基准矩阵包括:利用目标计算单元分别复制第K-j+1个至第K个第二三角函数值以及第1个至第K-j个第二三角函数值,得到第二矩阵的第二向量。例如,在j=0的情况下,可以复制第1个至第K个第二三角函数值<0,1,0,-1>,作为第二矩阵的第1行。在j=1的情况下,可以复制第4个第二三角函数值<-1>和第1个至第3个第一三角函数值<1,0,-1>,作为第二矩阵的第2行<-1,0,1,0>。在j=2的情况下,可以复制第3个至第4个第二三角函数值<0,-1>和第1个至第2个第一三角函数值<0,1>,作为第二矩阵的第3行<0,-1,0,1>。在i=3的情况下,可以复制第2个至第4个第二三角函数值<1,0,-1>和第1个第二三角函数值<0>,作为第二矩阵的第4行<1,0,-1,0>。由此,第二矩阵可以为:In some embodiments, in other implementations of the above operation S110, using the target computing unit to respectively determine the first matrix, the second matrix, and the reference matrix includes: using the target computing unit to respectively copy the K-j+1th to Kth second trigonometric function values and the 1st to K-jth second trigonometric function values to obtain a second vector of the second matrix. For example, in the case of j=0, the 1st to Kth second trigonometric function values <0,1,0,-1> can be copied as the 1st row of the second matrix. In the case of j=1, the 4th second trigonometric function value <-1> and the 1st to 3rd first trigonometric function values <1,0,-1> can be copied as the 2nd row <-1,0,1,0> of the second matrix. In the case of j=2, the 3rd to 4th second trigonometric function values <0,-1> and the 1st to 2nd first trigonometric function values <0,1> can be copied as the 3rd row <0,-1,0,1> of the second matrix. When i=3, the second to fourth second trigonometric function values <1,0,-1> and the first second trigonometric function value <0> can be copied as the fourth row <1,0,-1,0> of the second matrix. Thus, the second matrix can be:
(公式十一) (Formula 11)
在一些实施例中,在上述操作S110的另一些实施方式中,利用目标计算单元分别确定第一矩阵、第二矩阵和基准矩阵包括:利用目标计算单元复制与移动参数对应的第三三角函数值,得到与第一向量和第二向量对应的基准矩阵的基准值。例如,对于第一矩阵的第1行和第二矩阵的第1行,可以复制第三三角函数序列的第1个三角函数值<2>,作为基准矩阵的第1行第1列的基准值。对于第一矩阵的第2行和第二矩阵的第3行,可以复制第4个第三三角函数值<0>,作为基准矩阵第2行第3列的基准值。对于第一矩阵的第3行和第二矩阵的第4行,可以复制第2个第三三角函数值<0>,作为基准矩阵第2行第3列的基准值。基准矩阵可以为:In some embodiments, in other implementations of the above operation S110, using the target computing unit to respectively determine the first matrix, the second matrix, and the reference matrix includes: using the target computing unit to copy the third trigonometric function value corresponding to the movement parameter to obtain the reference value of the reference matrix corresponding to the first vector and the second vector. For example, for the 1st row of the first matrix and the 1st row of the second matrix, the 1st trigonometric function value <2> of the third trigonometric function sequence can be copied as the reference value of the 1st row and the 1st column of the reference matrix. For the 2nd row of the first matrix and the 3rd row of the second matrix, the 4th third trigonometric function value <0> can be copied as the reference value of the 2nd row and the 3rd column of the reference matrix. For the 3rd row of the first matrix and the 4th row of the second matrix, the 2nd third trigonometric function value <0> can be copied as the reference value of the 2nd row and the 3rd column of the reference matrix. The reference matrix can be:
(公式十二) (Formula 12)
可以理解,多个第一向量包括M个第一移动位数彼此不同的第一向量。多个第二向量包括N个第二移动位数彼此不同的第二向量。也可以理解,为了实现测试,可以将第一向量复制一个或多个。与该第一向量对应的基准值,也可以利用上述公式九确定。通过本公开实施例,对不同三角函数值序列进行了多次复制,实现了循环移位,进一步降低了目标计算单元的计算资源和存储资源开销,可以进一步提高测试效率。It can be understood that the multiple first vectors include M first vectors whose first shift bit numbers are different from each other. The multiple second vectors include N second vectors whose second shift bit numbers are different from each other. It can also be understood that in order to implement the test, one or more first vectors can be copied. The reference value corresponding to the first vector can also be determined using the above formula nine. Through the embodiments of the present disclosure, different trigonometric function value sequences are copied multiple times to implement circular shift, further reducing the computing resource and storage resource overhead of the target computing unit, and further improving the test efficiency.
可以理解,上文以M=N=K为示例,对本公开进行了说明。但本公开不限于此,M、N可以小于K。例如,可以从公式十所示的第一矩阵中随机选出2个行向量,也可以从公式十一所示的第二矩阵中随机选出3个行向量。相应的基准矩阵的多个基准值,也可以利用上述公式九确定。It can be understood that the above description uses M=N=K as an example to explain the present disclosure. However, the present disclosure is not limited to this, and M and N may be less than K. For example, two row vectors may be randomly selected from the first matrix shown in Formula 10, or three row vectors may be randomly selected from the second matrix shown in Formula 11. Multiple reference values of the corresponding reference matrix may also be determined using Formula 9 above.
可以理解,基准值的移动参数可以指示该基准值在基准矩阵中的位置。例如,根据第一移动位数i和第二移动位数j确定的基准值,可以为基准矩阵中第i+1行第j+1列的基准值。It can be understood that the shift parameter of the reference value can indicate the position of the reference value in the reference matrix. For example, the reference value determined according to the first shift bit number i and the second shift bit number j can be the reference value of the i+1th row and j+1th column in the reference matrix.
可以理解,上文结合公式一所示的积化和差公式,对本公开进行了说明。但本公开不限于此,利用各种积化和差公式,均可以实现上述操作所S110,下面将进行说明。It can be understood that the present disclosure is described above in conjunction with the product-to-sum-difference formula shown in Formula 1. However, the present disclosure is not limited thereto, and the above operation S110 can be implemented by using various product-to-sum-difference formulas, which will be described below.
在一些实施例中,积化和差公式还可以包括:In some embodiments, the product-to-sum-difference formula may further include:
(公式十三) (Formula 13)
(公式十四) (Formula 14)
(公式十五) (Formula 15)
在一些实施例中,第一三角函数值序列为第一余弦值序列,第二三角函数值序列为第二余弦值序列,第三三角函数值序列为第三余弦值序列。例如,基于上述公式十三,可以确定第一矩阵、第二矩阵和基准矩阵。In some embodiments, the first trigonometric function value sequence is a first cosine value sequence, the second trigonometric function value sequence is a second cosine value sequence, and the third trigonometric function value sequence is a third cosine value sequence. For example, based on the above formula 13, the first matrix, the second matrix and the reference matrix can be determined.
在一些实施例中,第一三角函数值序列为第一正弦值序列,第二三角函数值序列为第二余弦值序列,第三三角函数值序列为第三正弦值序列。例如,基于上述公式十四,可以确定第一矩阵、第二矩阵和基准矩阵。In some embodiments, the first trigonometric function value sequence is a first sine value sequence, the second trigonometric function value sequence is a second cosine value sequence, and the third trigonometric function value sequence is a third sine value sequence. For example, based on the above formula 14, the first matrix, the second matrix and the reference matrix can be determined.
在一些实施例中,第一三角函数值序列为第一余弦值序列,第二三角函数值序列为第二正弦值序列,第三三角函数值序列为第三正弦值序列。例如,基于上述公式十五,可以确定第一矩阵、第二矩阵和基准矩阵。In some embodiments, the first trigonometric function value sequence is a first cosine value sequence, the second trigonometric function value sequence is a second sine value sequence, and the third trigonometric function value sequence is a third sine value sequence. For example, based on the above formula 15, the first matrix, the second matrix and the reference matrix can be determined.
可以理解,上文对本公开目标计算单元执行的操作进行了说明,下面将对待测计算单元执行的操作进行说明。It can be understood that the above description describes the operations performed by the target computing unit of the present disclosure, and the following description will describe the operations performed by the computing unit to be tested.
在一些实施例中,利用待测计算单元将第一矩阵和第二矩阵相乘,得到待测结果矩阵包括:利用待测计算单元将第一矩阵和转置的第二矩阵相乘,得到待测结果矩阵。例如,可以将如图2所示的第二矩阵B200转置。并将第一矩阵A200与转置后的第二矩阵B200相乘,可以得到待测结果矩阵。In some embodiments, using the computing unit to be tested to multiply the first matrix and the second matrix to obtain the result matrix to be tested includes: using the computing unit to be tested to multiply the first matrix and the transposed second matrix to obtain the result matrix to be tested. For example, the second matrix B200 shown in Figure 2 can be transposed. And the first matrix A200 is multiplied by the transposed second matrix B200 to obtain the result matrix to be tested.
在另一些实施例中,利用待测计算单元将第一矩阵和第二矩阵相乘,得到待测结果矩阵还包括:利用待测计算单元将转置的第一矩阵和第二矩阵相乘,得到待测结果矩阵。例如,可以将如图2所示的第一矩阵A200转置。并将转置的第一矩阵A200与第二矩阵B200相乘,可以得到待测结果矩阵。In some other embodiments, using the computing unit to be tested to multiply the first matrix and the second matrix to obtain the result matrix to be tested further includes: using the computing unit to be tested to multiply the transposed first matrix and the second matrix to obtain the result matrix to be tested. For example, the first matrix A200 shown in Figure 2 can be transposed. And the transposed first matrix A200 is multiplied by the second matrix B200 to obtain the result matrix to be tested.
可以理解,转置操作可以由目标计算单元、访存单元或待测计算单元执行,本公开对此不进行限制。It can be understood that the transposition operation can be performed by the target computing unit, the memory access unit or the computing unit to be tested, and the present disclosure does not limit this.
可以理解,上文对待测计算单元执行的操作进行了说明,下面将对本公开确定精度测试结果的一些方式进行说明。It can be understood that the above describes the operations performed by the computing unit to be tested, and some methods of determining the accuracy test results of the present disclosure will be described below.
在一些实施例中,差异包括多个差异值。例如,基准矩阵可以包括M×N个基准值。待测结果矩阵可以包括M×N个待测值。将确定待测值和基准值之间的差异值,共可以确定M×N个差异值。In some embodiments, the difference includes multiple difference values. For example, the reference matrix may include M×N reference values. The test result matrix may include M×N test values. The difference value between the test value and the reference value is determined, and a total of M×N difference values may be determined.
在一些实施例中,根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的测试结果包括:响应于确定至少一个差异值小于或等于预设差异阈值,确定待测计算单元的测试结果为第一测试结果。响应于确定至少一个差异值大于预设差异阈值,确定待测计算单元的测试结果为第二测试结果。第一测试结果用于指示待测计算单元的精度满足需求。第二测试结果用于指示待测计算单元的精度未满足需求。In some embodiments, determining the test result of the computing unit to be tested according to the difference between the test result matrix and the reference matrix includes: in response to determining that at least one difference value is less than or equal to a preset difference threshold, determining the test result of the computing unit to be tested as a first test result. In response to determining that at least one difference value is greater than a preset difference threshold, determining the test result of the computing unit to be tested as a second test result. The first test result is used to indicate that the accuracy of the computing unit to be tested meets the requirements. The second test result is used to indicate that the accuracy of the computing unit to be tested does not meet the requirements.
例如,可以确定大于预设差异阈值的差异值的数目,若该数目也大于预设数目阈值,可以将测试结果确定第二测试结果。若该数目小于预设数目阈值,可以将测试结果确定第一测试结果For example, the number of difference values greater than a preset difference threshold may be determined. If the number is also greater than the preset number threshold, the test result may be determined as the second test result. If the number is less than the preset number threshold, the test result may be determined as the first test result.
可以理解,上文对本公开的方法进行了说明,下面将对本公开的装置进行说明。It can be understood that the method of the present disclosure is described above, and the device of the present disclosure will be described below.
图3是根据本公开的一个实施例的计算单元的测试装置的示意框图。FIG. 3 is a schematic block diagram of a testing device for a computing unit according to an embodiment of the present disclosure.
如图3所示,装置300可以包括目标计算单元310和待测计算单元320。As shown in FIG. 3 , the apparatus 300 may include a target computing unit 310 and a computing unit to be tested 320 .
目标计算单元310,可以配置为:根据第一三角函数值序列、第二三角函数值序列和第三三角函数值序列,分别得到第一矩阵、第二矩阵和基准矩阵。第一矩阵包括至少一个第一向量,第一向量是通过将第一三角函数值序列沿第一方向循环移动第一移动位数得到的,第二矩阵包括至少一个第二向量,第二向量是通过将第二三角函数值序列沿第二方向循环移动第二移动位数得到的,第三三角函数值序列的相位值是根据第一三角函数值序列的相位值与第二三角函数值序列的相位值之差得到的;The target calculation unit 310 may be configured to obtain a first matrix, a second matrix and a reference matrix according to a first trigonometric function value sequence, a second trigonometric function value sequence and a third trigonometric function value sequence, respectively. The first matrix includes at least one first vector, the first vector is obtained by circularly shifting the first trigonometric function value sequence along a first direction by a first shifting bit number, the second matrix includes at least one second vector, the second vector is obtained by circularly shifting the second trigonometric function value sequence along a second direction by a second shifting bit number, and the phase value of the third trigonometric function value sequence is obtained according to the difference between the phase value of the first trigonometric function value sequence and the phase value of the second trigonometric function value sequence;
待测计算单元320,配置为将第一矩阵和第二矩阵相乘,得到待测结果矩阵。The calculation unit 320 to be tested is configured to multiply the first matrix and the second matrix to obtain a result matrix to be tested.
目标计算单元310还配置为:根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的精度测试结果。The target computing unit 310 is further configured to determine the accuracy test result of the computing unit to be tested according to the difference between the result matrix to be tested and the reference matrix.
在一些实施例中,基准矩阵包括多个基准值,与第一向量和第二向量对应的基准值是第三三角函数值序列中与移动参数对应的第三三角函数值,移动参数是根据第一移动位数和第二移动位数得到的。In some embodiments, the reference matrix includes multiple reference values, and the reference values corresponding to the first vector and the second vector are third trigonometric function values in the third trigonometric function value sequence corresponding to the shift parameters, and the shift parameters are obtained based on the first shift bit number and the second shift bit number.
在一些实施例中,第一三角函数值序列包括规模参数个第一三角函数值,第二三角函数值序列包括规模参数个第二三角函数值,第三三角函数值是根据规模参数、第一三角函数值序列的相位值与第二三角函数值序列的相位值之差得到的。In some embodiments, the first trigonometric function value sequence includes first trigonometric function values with a scale parameter, the second trigonometric function value sequence includes second trigonometric function values with a scale parameter, and the third trigonometric function value is obtained based on the scale parameter and the difference between the phase value of the first trigonometric function value sequence and the phase value of the second trigonometric function value sequence.
在一些实施例中,在第一矩阵的规模、第二矩阵的规模以及基准矩阵的规模一致的情况下,基准矩阵的基准向量是通过将第三三角函数值序列沿第一方向循环移动第一移动位数得到的。In some embodiments, when the scales of the first matrix, the second matrix and the reference matrix are consistent, the reference vector of the reference matrix is obtained by cyclically shifting the third trigonometric function value sequence along the first direction by a first shift bit number.
在一些实施例中,规模参数为K,第一三角函数值序列包括K个第一三角函数值,第二三角函数值序列包括K个第二三角函数值,第三三角函数值序列包括K个第三三角函数值,K为大于1的整数。第一移动位数为i,i为大于或等于0且小于K的整数,第二移动位数为j,j为大于或等于0且小于K的整数。In some embodiments, the scale parameter is K, the first trigonometric function value sequence includes K first trigonometric function values, the second trigonometric function value sequence includes K second trigonometric function values, the third trigonometric function value sequence includes K third trigonometric function values, and K is an integer greater than 1. The first shift bit number is i, i is an integer greater than or equal to 0 and less than K, and the second shift bit number is j, j is an integer greater than or equal to 0 and less than K.
在一些实施例中,第一向量依次包括第一在前子向量和第一在后子向量,第一在前子向量包括第i+1个至第K个第一三角函数值,第一在后子向量包括第1个至第i个第一三角函数值;第二向量包括K个第二三角函数值,第二向量依次包括第二在前子向量和第二在后子向量,第二在前子向量包括第K-j+1个至第K个第二三角函数值,第一在后子向量包括第1个至第K-j个第二三角函数值,i为大于或等于1的整数,j为大于或等于1的整数。In some embodiments, the first vector includes a first preceding sub-vector and a first succeeding sub-vector in sequence, the first preceding sub-vector including the i+1th to Kth first trigonometric function values, and the first succeeding sub-vector including the 1st to ith first trigonometric function values; the second vector includes K second trigonometric function values, the second vector includes a second preceding sub-vector and a second succeeding sub-vector in sequence, the second preceding sub-vector including the K-j+1th to Kth second trigonometric function values, and the first succeeding sub-vector including the 1st to K-jth second trigonometric function values, i is an integer greater than or equal to 1, and j is an integer greater than or equal to 1.
在一些实施例中,移动参数是通过公式就根据第一移动位数和第二移动位数得到的。在上述公式九中,z为移动参数,基准值为第三三角函数值序列中第z个第三三角函数值,g为正整数。In some embodiments, the shift parameter is obtained according to the first shift bit number and the second shift bit number by a formula. In the above formula 9, z is the shift parameter, the reference value is the zth third trigonometric function value in the third trigonometric function value sequence, and g is a positive integer.
在一些实施例中,第一三角函数值对应的第一相位序列为等差数列,第一相位序列的第一公差是根据预设弧度和规模参数确定的。第二三角函数值对应的第二相位序列为等差数列,第二相位序列的第二公差是根据预设弧度和规模参数确定的。In some embodiments, the first phase sequence corresponding to the first trigonometric function value is an arithmetic progression, and the first tolerance of the first phase sequence is determined according to a preset radian and scale parameter. The second phase sequence corresponding to the second trigonometric function value is an arithmetic progression, and the second tolerance of the second phase sequence is determined according to a preset radian and scale parameter.
在一些实施例中,第一三角函数值序列为第一正弦值序列,第二三角函数值序列为第二正弦值序列,第三三角函数值序列为第三余弦值序列。或者,第一三角函数值序列为第一余弦值序列,第二三角函数值序列为第二余弦值序列,第三三角函数值序列为第三余弦值序列。或者,第一三角函数值序列为第一正弦值序列,第二三角函数值序列为第二余弦值序列,第三三角函数值序列为第三正弦值序列。或者,第一三角函数值序列为第一余弦值序列,第二三角函数值序列为第二正弦值序列,第三三角函数值序列为第三正弦值序列。In some embodiments, the first trigonometric function value sequence is a first sine value sequence, the second trigonometric function value sequence is a second sine value sequence, and the third trigonometric function value sequence is a third cosine value sequence. Alternatively, the first trigonometric function value sequence is a first cosine value sequence, the second trigonometric function value sequence is a second cosine value sequence, and the third trigonometric function value sequence is a third cosine value sequence. Alternatively, the first trigonometric function value sequence is a first sine value sequence, the second trigonometric function value sequence is a second cosine value sequence, and the third trigonometric function value sequence is a third sine value sequence. Alternatively, the first trigonometric function value sequence is a first cosine value sequence, the second trigonometric function value sequence is a second sine value sequence, and the third trigonometric function value sequence is a third sine value sequence.
在一些实施例中,多个第一向量包括M个第一移动位数彼此不同的第一向量,M为大于1且小于或等于K的整数。多个第二向量包括N个第二移动位数彼此不同的第二向量,N为大于1且小于或等于K的整数,基准矩阵包括M×N个基准值。In some embodiments, the plurality of first vectors include M first vectors whose first shift bit numbers are different from each other, where M is an integer greater than 1 and less than or equal to K. The plurality of second vectors include N second vectors whose second shift bit numbers are different from each other, where N is an integer greater than 1 and less than or equal to K, and the reference matrix includes M×N reference values.
在一些实施例中,目标计算单元还配置执行以下操作以分别确定第一矩阵、第二矩阵和基准矩阵:分别复制第i+1个至第K个第一三角函数值以及第1个至第i个第一三角函数值,得到第一矩阵的第一向量。分别复制第K-j+1个至第K个第二三角函数值以及第1个至第K-j个第二三角函数值,得到第二矩阵的第二向量。复制与移动参数对应的第三三角函数值,得到与第一向量和第二向量对应的基准矩阵的基准值。In some embodiments, the target computing unit is further configured to perform the following operations to respectively determine the first matrix, the second matrix, and the reference matrix: respectively copy the i+1th to Kth first trigonometric function values and the 1st to ith first trigonometric function values to obtain the first vector of the first matrix. respectively copy the K-j+1th to Kth second trigonometric function values and the 1st to K-jth second trigonometric function values to obtain the second vector of the second matrix. respectively copy the third trigonometric function value corresponding to the movement parameter to obtain the reference value of the reference matrix corresponding to the first vector and the second vector.
在一些实施例中,待测计算单元还配置为执行以下操作至少之一以将第一矩阵和第二矩阵相乘,得到待测结果矩阵:利用待测计算单元将转置的第一矩阵和第二矩阵相乘,得到待测结果矩阵。利用待测计算单元将第一矩阵和转置的第二矩阵相乘,得到待测结果矩阵。In some embodiments, the computing unit to be tested is further configured to perform at least one of the following operations to multiply the first matrix and the second matrix to obtain a result matrix to be tested: multiply the transposed first matrix and the second matrix by the computing unit to be tested to obtain a result matrix to be tested. Multiply the first matrix and the transposed second matrix by the computing unit to be tested to obtain a result matrix to be tested.
在一些实施例中,差异包括多个差异值,目标计算单元还配置为执行以下操作以根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的精度测试结果:响应于确定至少一个差异值小于或等于预设差异阈值,确定待测计算单元的精度测试结果为第一测试结果。第一测试结果用于指示待测计算单元的精度满足需求。In some embodiments, the difference includes a plurality of difference values, and the target computing unit is further configured to perform the following operations to determine the accuracy test result of the computing unit to be tested according to the difference between the result matrix to be tested and the reference matrix: in response to determining that at least one difference value is less than or equal to a preset difference threshold, determine that the accuracy test result of the computing unit to be tested is a first test result. The first test result is used to indicate that the accuracy of the computing unit to be tested meets the requirement.
在一些实施例中,差异包括多个差异值,目标计算单元还配置为执行以下操作以根据待测结果矩阵和基准矩阵之间的差异,确定待测计算单元的精度测试结果:响应于确定至少一个差异值大于预设差异阈值,确定待测计算单元的精度测试结果为第二测试结果。第二测试结果用于指示待测计算单元的精度未满足需求。In some embodiments, the difference includes a plurality of difference values, and the target computing unit is further configured to perform the following operations to determine the accuracy test result of the computing unit to be tested according to the difference between the result matrix to be tested and the reference matrix: in response to determining that at least one difference value is greater than a preset difference threshold, determine that the accuracy test result of the computing unit to be tested is a second test result. The second test result is used to indicate that the accuracy of the computing unit to be tested does not meet the requirement.
可以理解,上文对本公开的装置进行了说明,下面将对包括该装置的设备进行说明。It can be understood that the apparatus of the present disclosure is described above, and the device including the apparatus will be described below.
图4是根据本公开的一个实施例电子设备的示意框图。FIG. 4 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure.
如图4所示,设备4000可以包括计算单元的测试装置400。装置400可以为上述装置300。As shown in Fig. 4, the device 4000 may include a computing unit testing apparatus 400. The apparatus 400 may be the apparatus 300 described above.
本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
图5示出了可以用来实施本公开的实施例的示例电子设备500的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。FIG5 shows a schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and/or required herein.
如图5所示,设备500包括计算单元501,其可以根据存储在只读存储器(Read-OnlyMemory,ROM)502中的计算机程序或者从存储单元508加载到随机访问存储器(RandomAccess Memory,RAM)503中的计算机程序,来执行各种适当的动作和处理。在RAM 503中,还可存储设备500操作所需的各种程序和数据。计算单元501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(Input/ Output,I/O)接口505也连接至总线504。As shown in FIG5 , the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to the bus 504.
设备500中的多个部件连接至I/O接口505,包括:输入单元506,例如键盘、鼠标等;输出单元507,例如各种类型的显示器、扬声器等;存储单元508,例如磁盘、光盘等;以及通信单元509,例如网卡、调制解调器、无线通信收发机等。通信单元509允许设备500通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
计算单元501可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元501的一些示例包括但不限于中央处理单元(Central Processing Unit,CPU)、图形处理单元(Graph Processing Unit,GPU)、各种专用的人工智能(Artificial Intelligence,AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(Digital SignalProcessor,DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元501执行上文所描述的各个方法和处理,例如计算单元的测试方法。例如,在一些实施例中,计算单元的测试方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元508。在一些实施例中,计算机程序的部分或者全部可以经由ROM 502和/或通信单元509而被载入和/或安装到设备500上。当计算机程序加载到RAM 503并由计算单元501执行时,可以执行上文描述的计算单元的测试方法的一个或多个步骤。备选地,在其他实施例中,计算单元501可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行计算单元的测试方法。The computing unit 501 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as the testing method of the computing unit. For example, in some embodiments, the testing method of the computing unit may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed on the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the testing method of the computing unit described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the computing unit test method in any other appropriate manner (eg, by means of firmware).
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(ApplicationSpecific Standard Parts,ASSP)、芯片上系统的系统(System On Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions/operations specified in the flow chart and/or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器、只读存储器、可擦除可编程只读存储器(ErasableProgrammable Read-Only Memory,EPROM)或快闪存储器、光纤、便捷式紧凑盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories (EPROM) or flash memories, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,阴极射线管(Cathode Ray Tube,CRT)显示器或者液晶显示器(Liquid Crystal Display,LCD));以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) display or a liquid crystal display (LCD)) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(Local Aera Network,LAN)、广域网(Wide Aera Network,WAN)和互联网。The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims (29)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410937488.4A CN118672859A (en) | 2024-07-12 | 2024-07-12 | Test method and device of computing unit, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410937488.4A CN118672859A (en) | 2024-07-12 | 2024-07-12 | Test method and device of computing unit, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118672859A true CN118672859A (en) | 2024-09-20 |
Family
ID=92726536
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410937488.4A Pending CN118672859A (en) | 2024-07-12 | 2024-07-12 | Test method and device of computing unit, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118672859A (en) |
-
2024
- 2024-07-12 CN CN202410937488.4A patent/CN118672859A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7009603B2 (en) | Quantum circuit simulation methods, appliances, equipment, storage media, and programs | |
JP7199489B2 (en) | Methods, systems, electronics, and media for removing quantum measurement noise | |
JP7354320B2 (en) | Quantum device noise removal method and apparatus, electronic equipment, computer readable storage medium, and computer program | |
AU2022283685A1 (en) | Quantum neural network training method and system, electronic device, and medium | |
CN113568821B (en) | AI chip calculation performance test method, device, equipment and medium | |
CN114462613B (en) | Quantum computer performance characterization method and device, electronic equipment and medium | |
CN113222159B (en) | A method and device for determining a quantum state | |
CN115329972B (en) | Quantum computer performance determining method and device, electronic equipment and medium | |
CN114897175B (en) | Noise elimination method and device of quantum measurement equipment, electronic equipment and medium | |
CN114021728B (en) | Quantum data measuring method and system, electronic device, and medium | |
AU2022241510B2 (en) | Method and apparatus for calibrating quantum measurement device, electronic device, and medium | |
CN114997407B (en) | Noise elimination method and device of quantum measurement equipment, electronic equipment and medium | |
CN115116552A (en) | Molecular energy calculation method and device for quantum chemical simulation | |
AU2023203291A1 (en) | Method and apparatus for determining quantum noise intensity, electronic device and medium | |
CN114021729A (en) | Quantum circuit operation method and system, electronic device and medium | |
KR20250041108A (en) | Method and apparatus for processing matrix multiplication data, electronic device, storage medium, and computer program | |
CN116362341B (en) | Quantum device unitary transformation degree determining method and device, electronic device and medium | |
CN118672859A (en) | Test method and device of computing unit, electronic equipment and storage medium | |
CN116362340B (en) | Quantum device performance comparison method and device, electronic device and medium | |
Rump | Mathematically rigorous global optimization in floating-point arithmetic | |
CN115829040A (en) | Method, device and equipment for determining processing parameters and storage medium | |
CN116739098B (en) | Quantum measurement device performance estimation method and device, electronic device and medium | |
CN116306956B (en) | Method and device for eliminating quantum computer noise, electronic equipment and medium | |
CN117556909B (en) | Quantum circuit simulation method and device and electronic equipment | |
CN116629368B (en) | Quantum device unitary transformation degree determining method and device, electronic device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |