[go: up one dir, main page]

CN108628731A - A kind of method and processing equipment of selection test instruction - Google Patents

A kind of method and processing equipment of selection test instruction Download PDF

Info

Publication number
CN108628731A
CN108628731A CN201710156359.1A CN201710156359A CN108628731A CN 108628731 A CN108628731 A CN 108628731A CN 201710156359 A CN201710156359 A CN 201710156359A CN 108628731 A CN108628731 A CN 108628731A
Authority
CN
China
Prior art keywords
segment
vector
instruction
segments
feature
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.)
Granted
Application number
CN201710156359.1A
Other languages
Chinese (zh)
Other versions
CN108628731B (en
Inventor
程捷
李景超
李扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710156359.1A priority Critical patent/CN108628731B/en
Publication of CN108628731A publication Critical patent/CN108628731A/en
Application granted granted Critical
Publication of CN108628731B publication Critical patent/CN108628731B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

This application discloses a kind of method and processing equipment of selection test instruction, the time expended when causing emulator to test the test fragment to solve the problems, such as that multiple test fragments in the prior art due to screening are discrete is longer.This method includes:Instruction to be tested is split as multiple segments by processing equipment, and determines the number for including the instruction of each feature in each segment, and determines that each segment includes the average value of each feature instruction;And include the average value of each feature instruction according to number of each segment comprising the instruction of each feature and each segment, select N number of segment as test instruction in the M segment, wherein to include at least two continuous segments in N number of segment.The accuracy that can ensure the performance indicator for the instruction to be tested that the performance indicator subsequently through N number of segment determines in this way, reduces the number of emulator loading procedure, improves the testing efficiency of emulator.

Description

一种选择测试指令的方法及处理设备A method and processing device for selecting test instructions

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种选择测试指令的方法及处理设备。The present application relates to the field of computer technology, in particular to a method and processing equipment for selecting test instructions.

背景技术Background technique

在研发人员进行大型的程序的设计和开发过程中,经常需要将设计的程序通过仿真器运行进行测试,然后收集该程序的性能指标。例如,在设计处理器体系架构时,研发人员对设计的处理器体系架构的程序进行测试,收集每时钟周期运行指令数(InstructionPer Cycle,IPC)、各级缓存命中率、能耗。In the process of designing and developing a large-scale program, R&D personnel often need to test the designed program by running an emulator, and then collect performance indicators of the program. For example, when designing a processor architecture, R&D personnel test the programs of the designed processor architecture to collect instructions per clock cycle (InstructionPer Cycle, IPC), cache hit ratios at all levels, and energy consumption.

然而,由于程序的设计过程中,需要在仿真器上进行多次测试。且众所周知,运行相同的程序时,仿真器需要的运行时间比硬件平台需要的运行时间要长的多。因此这种反复的测试运行,仿真器有可能需要耗费数周或数月甚至更长的时间才能完成,严重影响了程序开发进程和效率。However, due to the design process of the program, it is necessary to conduct multiple tests on the emulator. And as we all know, when running the same program, the running time required by the emulator is much longer than that required by the hardware platform. Therefore, it may take weeks or months or even longer for the emulator to complete this repeated test operation, which seriously affects the program development process and efficiency.

研究表明,程序在运行过程中,各项性能指标均可以呈现出明显的阶段性特征,因此,在尽量保证最终得到的整个程序的性能指标的准确度的前提下,研发人员从精简测试程序的角度出发,通过以下方法得到整个程序的性能指标:Studies have shown that during the running of the program, various performance indicators can show obvious staged characteristics. Therefore, on the premise of ensuring the accuracy of the final performance indicators of the entire program as much as possible, the R&D personnel should streamline the test program. From the point of view, the performance indicators of the entire program are obtained by the following methods:

1)、处理器获得待测试程序的指令流,并确定所述指令流中包含的基本块(BasicBlock,BB)的种类;1), the processor obtains the instruction flow of the program to be tested, and determines the type of the basic block (BasicBlock, BB) contained in the instruction flow;

2)、所述处理器将指令流切分成多个片段(Interval),并确定每个片段中包含每种BB的数目,得到每个片段对应的基本块向量(Basic Block Vector,BBV);2), the processor divides the instruction stream into a plurality of fragments (Interval), and determines the number of each type of BB contained in each fragment, and obtains a basic block vector (Basic Block Vector, BBV) corresponding to each fragment;

3)、所述处理器将得到的每个片段的BBV进行K均值(K-Means)聚类处理,将得到的BBV分为多类,然后筛选出每类中最接近该类中心的一个BBV,最终确定筛选出的多个BBV对应的测试片段;3), the processor carries out K-means (K-Means) clustering process to the BBV of each segment obtained, divides the obtained BBV into multiple classes, and then screens out a BBV closest to the class center in each class , and finally determine the test fragments corresponding to the screened multiple BBVs;

4)、仿真器依次测试确定的多个测试片段,得到每个测试片段的性能指标;4), the emulator sequentially tests a plurality of test segments determined to obtain the performance index of each test segment;

5)、所述处理器确定每类BBV对应的片段在所述整个程序中的比重,即确定每个测试片段的性能指标的权重,然后根据确定的每个测试片段的性能指标的权重,计算每个测试片段的性能指标的加权和,从而得到所述整个程序的性能指标。5), the processor determines the proportion of the segment corresponding to each type of BBV in the entire program, that is, determines the weight of the performance index of each test segment, and then calculates according to the determined weight of the performance index of each test segment The performance index of each test segment is weighted to obtain the performance index of the entire program.

在上述方法中,由于所述处理器采用K-Means聚类方法筛选得到测试片段,因此得到的测试片段是离散的,即所述仿真器在测试所述多个测试片段时,启动次数与所述测试片段的个数相同;另外,由于仿真器在每次启动过程中将测试片段加载(Loading)到内存耗费的时间较长,而仿真器运行每个测试片段耗费的时间较少,综上所述,所述仿真器测试所述多个测试片段耗费的时间依然较长。In the above method, since the processor adopts the K-Means clustering method to filter and obtain the test fragments, the obtained test fragments are discrete, that is, when the emulator tests the multiple test fragments, the number of times of startup is the same as the number of test fragments obtained. The number of the above test fragments is the same; in addition, because the emulator takes a long time to load the test fragments (Loading) into the memory during each startup process, and the emulator takes less time to run each test fragment, in summary As mentioned above, it still takes a long time for the emulator to test the multiple test segments.

发明内容Contents of the invention

本申请提供一种选择测试指令的方法及处理设备,用以解决现有技术中由于筛选的多个测试片段离散导致仿真器测试所述测试片段时耗费的时间较长的问题。The present application provides a method and a processing device for selecting test instructions, which are used to solve the problem in the prior art that it takes a long time for an emulator to test the test segments due to the discreteness of multiple screened test segments.

第一方面,本申请提供了一种选择测试指令的方法,该方法包括以下步骤:In a first aspect, the present application provides a method for selecting a test instruction, the method comprising the following steps:

处理设备将待测试指令分为M个片段后,确定所述M个片段中每个片段包含的每种特征指令的数目,进而确定所述M个片段中每个片段包含的每种特征指令的平均值;最终所述处理设备根据所述M个片段中每个片段包含的每种特征指令的数目,和所述M个片段中每个片段包含的每种特征指令的平均值,在所述M个片段中选择包含至少两个连续的片段N个片段作为测试指令,其中,M为大于1的整数,N为大于1且小于M的整数。After the processing device divides the instruction to be tested into M fragments, it determines the number of each characteristic instruction contained in each of the M fragments, and then determines the number of each characteristic instruction contained in each of the M fragments. average value; finally, the processing device is based on the number of each feature instruction contained in each of the M segments, and the average value of each feature instruction contained in each of the M segments, in the N fragments including at least two consecutive fragments are selected from the M fragments as test instructions, wherein M is an integer greater than 1, and N is an integer greater than 1 and less than M.

由于在上述方法中,所述处理设备是根据所述M个片段中每个片段包含每种特征指令的平均值选择所述N个片段的,因此,通过上述方法所述处理设备选择的所述N个片段(即测试指令)中特征指令的分布与所述待测试指令中特征指令的分布相符,进而可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度;并且相对于通过传统的方法选择N个离散的测试片段,由于所述处理器选择的所述N个片段中包含至少两个连续的片段,这样,在后续的测试过程中,仿真器加载程序的次数降低,因此,该方法可以降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。综上所述,该方法可以保证通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度,并且可以降低仿真器测试所述N个片段的时间,提高仿真器的测试效率。Since in the above method, the processing device selects the N segments according to the average value of each feature instruction contained in each of the M segments, the processing device selected by the above method The distribution of the characteristic instructions in the N fragments (i.e., the test instructions) is consistent with the distribution of the characteristic instructions in the instructions to be tested, and then the performance index of the instruction to be tested determined by the performance indexes of the N fragments can be ensured. accuracy; and with respect to selecting N discrete test segments by traditional methods, since the N segments selected by the processor include at least two continuous segments, like this, in the subsequent testing process, the emulator The times of loading the program are reduced, therefore, the method can reduce the time for the emulator to test the N segments, and improve the test efficiency of the emulator. In summary, the method can guarantee the accuracy of the performance index of the instruction to be tested determined by the performance index of the N segments, and can reduce the time for the emulator to test the N segments and improve the performance of the emulator. Test efficiency.

在一个可能的设计中,所述处理设备可以通过以下步骤,在所述M个片段中选择所述N个片段作为所述测试指令:In a possible design, the processing device may select the N segments from the M segments as the test instruction through the following steps:

所述处理设备在所述M个片段中选择运行时间之和小于预设的第一时间阈值,且满足第一条件的所述N个片段作为所述测试指令;所述第一条件包括:所述N个片段包含至少两个连续片段,且所述N个片段中所有片段的特征向量的加权和与基本向量之间差值小于预设第一阈值,其中,每个片段的特征向量为所述每个片段包含的每种特征指令的数目组成的向量,所述基本向量为所述M个片段中每个片段包含的每种特征指令的平均值组成的向量。The processing device selects the N segments whose running time is less than a preset first time threshold and satisfies a first condition as the test instruction from the M segments; the first condition includes: The N segments include at least two consecutive segments, and the difference between the weighted sum of the feature vectors of all segments in the N segments and the basic vector is less than a preset first threshold, wherein the feature vector of each segment is the The basic vector is a vector composed of the average value of each characteristic instruction contained in each of the M segments.

通过上述方法,所述处理设备可以在所述M个片段中,选择出包含的片段的特征向量的分布与所述M个片段中特征向量的分布相似或相符的所述N个片段,这样,可以保证保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度。Through the above-mentioned method, the processing device can select the N segments whose feature vector distributions of the segments contained in the M segments are similar or consistent with the distribution of the feature vectors in the M segments, so that, The accuracy of the performance index of the instruction-to-be-test determined subsequently through the performance indexes of the N segments can be guaranteed.

在一个可能的设计中,所述处理设备通过以下步骤,在所述M个片段中选择运行时间小于所述第一时间阈值,且满足所述第一条件的所述N个片段作为所述测试指令:In a possible design, the processing device selects the N segments whose running time is less than the first time threshold and satisfies the first condition among the M segments as the test instruction:

步骤a:所述处理设备初始化残差向量为所述基本向量,并初始化待选子空间为所有X-子空间,其中,所述X-子空间为所述M个片段中任意连续的X个片段的特征向量组成的空间,其中X为大于1小于M的整数;Step a: the processing device initializes the residual vector as the basic vector, and initializes the subspaces to be selected as all X-subspaces, wherein the X-subspaces are any consecutive X of the M segments A space composed of feature vectors of segments, where X is an integer greater than 1 and less than M;

步骤b:所述处理设备在待选子空间中,选择与所述残差向量夹角最小的子空间,确定所述残差向量在选择出的子空间中的投影向量,并将所述残差向量与所述投影向量的差作为新的残差向量,将待选子空间去除选择的子空间后的所有子空间作为新的待选子空间;Step b: the processing device selects the subspace with the smallest angle with the residual vector among the subspaces to be selected, determines the projection vector of the residual vector in the selected subspace, and converts the residual The difference between the difference vector and the projection vector is used as a new residual vector, and all subspaces after the subspace to be selected are removed from the selected subspace are used as new subspaces to be selected;

步骤c:如果残差向量的大小小于所述第一阈值或选择的所有子空间包含的特征向量对应的片段的运行时间之和大于预设的第二时间阈值,所述处理设备将选择的所有子空间包含的特征向量对应的N个片段作为所述测试指令;如果残差向量的大小不小于所述第一阈值且选择的所有子空间包含的特征向量对应的片段的运行时间之和不大于所述第二时间阈值,所述处理设备返回执行步骤b;其中,所述第二时间阈值小于所述第一时间阈值。Step c: If the size of the residual vector is smaller than the first threshold or the sum of the running times of the segments corresponding to the feature vectors contained in all the selected subspaces is greater than the preset second time threshold, the processing device will select all The N segments corresponding to the feature vectors contained in the subspace are used as the test instructions; if the size of the residual vector is not less than the first threshold and the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is not greater than For the second time threshold, the processing device returns to perform step b; wherein, the second time threshold is smaller than the first time threshold.

通过上述方法,所述处理设备选择的N个片段中包括至少一个连续的X个片段,这样,在后续的测试过程中,可以进一步降低仿真器加载程序的次数,大幅度的降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。Through the above method, the N segments selected by the processing device include at least one continuous X segment, so that in the subsequent test process, the number of times the emulator loads the program can be further reduced, and the emulator test is greatly reduced. The time of the N segments improves the test efficiency of the simulator.

在一个可能的设计中,所述第二时间阈值满足以下任意一种条件:In a possible design, the second time threshold satisfies any one of the following conditions:

所述第二时间阈值大于所述第一时间阈值与最大运行时间的差,所述最大运行时间为所述M个片段的运行时间中的最大值;The second time threshold is greater than the difference between the first time threshold and a maximum running time, and the maximum running time is the maximum value among the running times of the M segments;

所述第二时间阈值大于所述第一时间阈值与X倍的最小运行时间的差,所述最小运行时间为所述M个片段的运行时间中的最小值;The second time threshold is greater than the difference between the first time threshold and X times the minimum running time, and the minimum running time is the minimum value among the running times of the M segments;

所述第二时间阈值大于所述第一时间阈值与所述最小运行时间的差。The second time threshold is greater than the difference between the first time threshold and the minimum run time.

通过上述方法设置所述第二时间阈值,在所述处理设备在选择的所有子空间包含的特征向量对应的片段的运行时间之和大于所述第二时间阈值的情况下,可以保证所述处理设备无法再次选择子空间,可以停止选择子空间的流程。因为再选子空间,就会导致选择的所有子空间包含的特征向量对应的片段的运行时间之和大于所述第一时间阈值,不满足所述N个片段的的运行时间之和小于所述第一时间阈值的条件。The second time threshold is set by the above method, and when the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces of the processing device is greater than the second time threshold, the processing can be guaranteed The device cannot select a subspace again, and the process of selecting a subspace can be stopped. Because reselecting the subspace will result in the sum of the running times of the segments corresponding to the eigenvectors contained in all the selected subspaces being greater than the first time threshold, and the sum of the running times of the N segments that do not satisfy the requirement is less than the The condition for the first time threshold.

在一个可能的设计中,所述处理设备也可以通过以下步骤,在所述M个片段中选择运行时间小于所述第一时间阈值,且满足所述第一条件的所述N个片段作为所述测试指令:In a possible design, the processing device may also use the following steps to select, among the M segments, the N segments whose running time is less than the first time threshold and satisfy the first condition as the The above test command:

步骤a1:所述处理设备初始化残差向量为所述基本向量,并初始化待选子空间为所有X-子空间,其中,所述X-子空间为所述M个片段中任意连续的X个片段的特征向量组成的空间,其中X为大于1小于M的整数;Step a1: The processing device initializes the residual vector as the basic vector, and initializes the subspaces to be selected as all X-subspaces, wherein the X-subspaces are any consecutive X of the M segments A space composed of feature vectors of segments, where X is an integer greater than 1 and less than M;

步骤b1:所述处理设备在所述待选子空间中,选择与所述残差向量夹角最小的第一子空间;Step b1: the processing device selects a first subspace having the smallest angle with the residual vector among the subspaces to be selected;

步骤c1:所述处理设备在所述待选子空间中确定与所述残差向量夹角次小的第二子空间;Step c1: the processing device determines a second subspace with the second smallest angle with the residual vector among the subspaces to be selected;

步骤d1:所述处理设备将所述待选子空间中去除选择的第一子空间后的所有子空间作为新的待选子空间,并通过如下方式,更新所述残差向量:Step d1: The processing device takes all subspaces except the selected first subspace in the candidate subspaces as new candidate subspaces, and updates the residual vector in the following manner:

所述处理设备在所述第一子空间中的所有向量与所述残差向量的相关系数,并找到相关系数最大的目标方向;所述处理设备根据确定的方向,确定目标向量Y,所述目标向量Y的一个端点在所述第一子空间和所述第二子空间的平分角位置,另一个端点为所述残差向量与所述第一子空间的交叉点;所述处理设备将所述残差向量与Y的差值作为新的残差向量;The processing device has correlation coefficients between all vectors in the first subspace and the residual vector, and finds the target direction with the largest correlation coefficient; the processing device determines the target vector Y according to the determined direction, and the One endpoint of the target vector Y is at the bisector angle position of the first subspace and the second subspace, and the other endpoint is the intersection of the residual vector and the first subspace; the processing device will The difference between the residual vector and Y is used as a new residual vector;

步骤e1:如果残差向量的大小小于所述第一阈值或选择的所有子空间包含的特征向量对应的片段的运行时间之和大于预设的第二时间阈值,所述处理设备将选择的所有子空间包含的特征向量对应的N个片段作为所述测试指令;如果残差向量的大小不小于所述第一阈值且选择的所有子空间包含的特征向量对应的片段的运行时间之和不大于所述第二时间阈值,所述处理设备返回执行步骤b1;其中,所述第二时间阈值小于所述第一时间阈值,且大于所述第一时间阈值与最大运行时间的差,所述最大运行时间为所述M个片段的运行时间中的最大值。Step e1: If the size of the residual vector is smaller than the first threshold or the sum of the running times of the segments corresponding to the feature vectors contained in all the selected subspaces is greater than the preset second time threshold, the processing device will select all The N segments corresponding to the feature vectors contained in the subspace are used as the test instructions; if the size of the residual vector is not less than the first threshold and the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is not greater than The second time threshold, the processing device returns to execute step b1; wherein, the second time threshold is less than the first time threshold and greater than the difference between the first time threshold and the maximum running time, the maximum The running time is the maximum value among the running times of the M segments.

通过上述方法,所述处理设备选择的N个片段中包括至少一个连续的X个片段,这样,在后续的测试过程中,可以进一步降低仿真器加载程序的次数,大幅度的降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。Through the above method, the N segments selected by the processing device include at least one continuous X segment, so that in the subsequent test process, the number of times the emulator loads the program can be further reduced, and the emulator test is greatly reduced. The time of the N segments improves the test efficiency of the simulator.

在一个可能的设计中,所述处理设备还可以通过以下步骤,在所述M个片段中选择所述N个片段作为所述测试指令:In a possible design, the processing device may also select the N segments from the M segments as the test instruction through the following steps:

首先,所述处理设备将所述M个片段中至少两个连续的片段作为一组,从而确定S个片段组,其中,S为大于1且小于M的整数,所述M个片段中一个片段包含于S个片段组中的一个片段组中;然后,所述处理设备确定所述S个片段组中每个片段组的目标向量,其中,所述S个片段组中任一个片段组的目标向量为所述片段组中每个片段包含的每种特征指令的平均值组成的向量;最后,所述处理设备在所述S个片段组中,选择目标向量与基本向量之间差值小于预设第二阈值的至少一个片段组,并将所述至少一个片段组中包含的所述N个片段作为所述测试指令,所述基本向量为所述M个片段中每个片段包含的每种特征指令的平均值组成的向量。First, the processing device regards at least two consecutive segments among the M segments as a group, thereby determining S segment groups, wherein, S is an integer greater than 1 and less than M, and one of the M segments contained in one of the S segment groups; then, the processing device determines a target vector for each of the S segment groups, wherein the target of any one of the S segment groups The vector is a vector composed of the average value of each feature instruction contained in each segment in the segment group; finally, the processing device selects a difference between the target vector and the basic vector in the S segment groups that is smaller than the preset Set at least one fragment group of the second threshold, and use the N fragments contained in the at least one fragment group as the test instruction, and the basic vector is each of the M fragments contained in each Vector of mean values of feature directives.

在上述方法中,任一个片段组的目标向量可以表示该片段组包含的所有片段中特征指令的分布情况,因此,通过上述方法,所述处理设备选择出的所述至少一个片段组中每个片段组包含的片段中特征指令的分布均与所述M个片段中特征向量的分布均相似或相符。因此,通过上述方法选择所述N个片段作为测试片段,不仅可以提高所述处理设备选择出所述测试片段的速度,而且还可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度。In the above method, the target vector of any segment group can represent the distribution of the feature instructions in all the segments contained in the segment group, therefore, through the above method, each of the at least one segment group selected by the processing device The distribution of feature instructions in the segments included in the segment group is similar to or consistent with the distribution of feature vectors in the M segments. Therefore, selecting the N segments as test segments through the above method can not only improve the speed at which the processing device selects the test segments, but also ensure that the subsequent Test the accuracy of the performance metrics of the command.

在一个可能的设计中,所述特征指令为所述M个片段中包含的基本块。In a possible design, the feature instruction is a basic block included in the M segments.

第二方面,本申请实施例还提供了一种处理设备,该处理设备具有实现上述方法实例中处理设备的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a second aspect, the embodiment of the present application further provides a processing device, which has the function of implementing the processing device in the above method example. The functions described above may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.

在一个可能的设计中,所述处理设备的结构中包括确定单元和处理单元,这些单元可以执行上述方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In a possible design, the structure of the processing device includes a determination unit and a processing unit, and these units can perform corresponding functions in the above method examples. For details, refer to the detailed description in the method examples, and details are not repeated here.

在一个可能的设计中,所述处理设备的结构中包括处理器和存储器,所述处理器被配置为支持所述处理设备执行上述方法中相应的功能。所述存储器与所述处理器耦合,其保存所述处理器必要的程序指令和数据。In a possible design, the structure of the processing device includes a processor and a memory, and the processor is configured to support the processing device to perform corresponding functions in the above methods. The memory is coupled to the processor and holds program instructions and data necessary for the processor.

第三方面,本申请还提供了一种计算机可读存储介质,用于存储为执行上述第一方面、第一方面的任意一种设计的功能所用的计算机软件指令,其包含用于执行上述第一方面、第一方面的任意一种设计的方法所设计的程序。In the third aspect, the present application also provides a computer-readable storage medium, which is used to store computer software instructions for performing the functions of any one of the above-mentioned first aspect and the first aspect, which includes instructions for executing the above-mentioned first aspect. In one aspect, a program designed by any design method of the first aspect.

本申请实施例中,处理设备将待测试指令分为M个片段,并确定每个片段中包含每种特征指令的数目,从而确定每个片段包含每种特征指令的平均值;所述处理设备可以根据所述M个片段中每个片段包含每种特征指令的数目和所述M个片段中每个片段包含每种特征指令的平均值,在所述M个片段中选择N个片段作为测试指令,其中,所述N个片段中包含至少两个连续的片段。在本申请实施例中,由于所述处理设备是根据所述M个片段中每个片段包含每种特征指令的平均值选择所述N个片段的,因此,所述处理设备选择的所述N个片段(即测试指令)中特征指令的分布与所述待测试指令中特征指令的分布相符,进而可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度;并且相对于通过传统的方法选择N个离散的测试片段,由于所述处理器选择的所述N个片段中包含至少两个连续的片段,这样,在后续的测试过程中,仿真器加载程序的次数降低,因此,本申请实施例提供的该方法可以降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。显然,本申请实施例提供的方法,可以保证通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度,并且可以降低仿真器测试所述N个片段的时间,提高仿真器的测试效率。In the embodiment of the present application, the processing device divides the instruction to be tested into M fragments, and determines the number of each characteristic instruction contained in each fragment, thereby determining the average value of each characteristic instruction contained in each fragment; the processing device According to the number of each characteristic instruction contained in each of the M fragments and the average value of each characteristic instruction contained in each of the M fragments, N fragments are selected from the M fragments as a test Instructions, wherein the N segments include at least two consecutive segments. In the embodiment of the present application, since the processing device selects the N segments according to the average value of each feature instruction contained in each of the M segments, the N selected by the processing device The distribution of the characteristic instructions in the N fragments (i.e. the test instructions) is consistent with the distribution of the characteristic instructions in the instructions to be tested, thereby ensuring the accuracy of the performance index of the instruction to be tested determined by the performance indexes of the N fragments. and with respect to selecting N discrete test segments by traditional methods, since the N segments selected by the processor contain at least two continuous segments, like this, in the subsequent testing process, the emulator loads The number of programs is reduced. Therefore, the method provided by the embodiment of the present application can reduce the time for the emulator to test the N segments, and improve the test efficiency of the emulator. Obviously, the method provided by the embodiment of the present application can ensure the accuracy of the performance index of the instruction to be tested determined by the performance index of the N segments, and can reduce the time for the emulator to test the N segments and improve Simulator testing efficiency.

附图说明Description of drawings

图1为本申请实施例提供的一种测试系统示意图;Fig. 1 is a schematic diagram of a test system provided by the embodiment of the present application;

图2为本申请实施例提供的一种选择测试指令的方法流程图;FIG. 2 is a flow chart of a method for selecting a test instruction provided in an embodiment of the present application;

图3为本申请实施例提供的一种子空间示意图;FIG. 3 is a schematic diagram of a subspace provided by an embodiment of the present application;

图4为本申请实施例提供的一种选择子空间的示意图;FIG. 4 is a schematic diagram of a selection subspace provided by an embodiment of the present application;

图5为本申请实施例提供的一种与残差向量相关系数最大的目标方向的示意图;FIG. 5 is a schematic diagram of a target direction with the largest correlation coefficient with the residual vector provided by the embodiment of the present application;

图6为本申请实施例提供的一种目标向量的示意图;FIG. 6 is a schematic diagram of a target vector provided by an embodiment of the present application;

图7为本申请实施例提供的一种处理设备的结构图;FIG. 7 is a structural diagram of a processing device provided in an embodiment of the present application;

图8为本申请实施例提供的另一种处理设备的结构图。FIG. 8 is a structural diagram of another processing device provided by an embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。In order to make the purpose, technical solution and advantages of the application clearer, the application will be further described in detail below in conjunction with the accompanying drawings.

本申请提供一种选择测试指令的方法及处理设备,用以解决现有技术中由于筛选的多个测试片段离散导致仿真器测试所述测试片段时耗费的时间较长的问题。其中,方法和装置是基于同一发明构思的,由于方法和装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。The present application provides a method and a processing device for selecting test instructions, which are used to solve the problem in the prior art that it takes a long time for an emulator to test the test segments due to the discreteness of multiple screened test segments. Among them, the method and the device are based on the same inventive concept. Since the principles of the method and the device to solve problems are similar, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.

本申请实施例中,处理设备将待测试指令分为M个片段,并确定每个片段中包含每种特征指令的数目,从而确定每个片段包含每种特征指令的平均值;所述处理设备可以根据所述M个片段中每个片段包含每种特征指令的数目和所述M个片段中每个片段包含每种特征指令的平均值,在所述M个片段中选择N个片段作为测试指令,其中,所述N个片段中包含至少两个连续的片段。在本申请实施例中,由于所述处理设备是根据所述M个片段中每个片段包含每种特征指令的平均值选择所述N个片段的,因此,所述处理设备选择的所述N个片段(即测试指令)中特征指令的分布与所述待测试指令中特征指令的分布相符,进而可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度;并且相对于通过传统的方法选择N个离散的测试片段,由于所述处理器选择的所述N个片段中包含至少两个连续的片段,这样,在后续的测试过程中,仿真器加载程序的次数降低,因此,本申请实施例提供的该方法可以降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。显然,本申请实施例提供的方法,可以保证通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度,并且可以降低仿真器测试所述N个片段的时间,提高仿真器的测试效率。In the embodiment of the present application, the processing device divides the instruction to be tested into M fragments, and determines the number of each characteristic instruction contained in each fragment, thereby determining the average value of each characteristic instruction contained in each fragment; the processing device According to the number of each characteristic instruction contained in each of the M fragments and the average value of each characteristic instruction contained in each of the M fragments, N fragments are selected from the M fragments as a test Instructions, wherein the N segments include at least two consecutive segments. In the embodiment of the present application, since the processing device selects the N segments according to the average value of each feature instruction contained in each of the M segments, the N selected by the processing device The distribution of the characteristic instructions in the N fragments (i.e. the test instructions) is consistent with the distribution of the characteristic instructions in the instructions to be tested, thereby ensuring the accuracy of the performance index of the instruction to be tested determined by the performance indexes of the N fragments. and with respect to selecting N discrete test segments by traditional methods, since the N segments selected by the processor contain at least two continuous segments, like this, in the subsequent testing process, the emulator loads The number of programs is reduced. Therefore, the method provided by the embodiment of the present application can reduce the time for the emulator to test the N segments, and improve the test efficiency of the emulator. Obviously, the method provided by the embodiment of the present application can ensure the accuracy of the performance index of the instruction to be tested determined by the performance index of the N segments, and can reduce the time for the emulator to test the N segments and improve Simulator testing efficiency.

以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。Hereinafter, some terms used in this application are explained to facilitate the understanding of those skilled in the art.

本申请涉及的待测试指令,又可以称为指令流,为程序运行过程中的多条指令,该指令一般为汇编指令。在测试程序的过程前,需要获取待测试程序的待测试指令;仿真器可以运行待测试程序的待测试指令,从而得到待测试程序的各性能指标。The instructions to be tested involved in the present application may also be called instruction streams, which are multiple instructions in the program running process, and the instructions are generally assembly instructions. Before the process of testing the program, it is necessary to acquire the to-be-tested instructions of the to-be-tested program; the emulator can run the to-be-tested instructions of the to-be-tested program, thereby obtaining various performance indicators of the to-be-tested program.

本申请涉及的特征指令,为待测试指令中对性能指标有影响的指令。可选的,所述特征指令为所述待测试指令中的特定的指令,如控制指令(如跳转指令、中断指令等),或者所述特征指令由相邻两个控制指令和之间的所有指令组成的基本块等,对此本申请不作限定。The characteristic instructions involved in this application are the instructions that have an impact on performance indicators among the instructions to be tested. Optionally, the characteristic instruction is a specific instruction in the instruction to be tested, such as a control instruction (such as a jump instruction, an interrupt instruction, etc.), or the characteristic instruction is composed of two adjacent control instructions and the The basic blocks and the like composed of all instructions are not limited in this application.

本申请涉及的片段或待测试指令的性能指标,为运行所述片段或待测试指令的设备的IPC、各级缓存命中率(例如第二层(L2)缓存命中率),或能耗等参数。The performance index of the segment or the instruction to be tested involved in this application is the IPC of the device running the segment or the instruction to be tested, the cache hit rate of all levels (such as the second layer (L2) cache hit rate), or parameters such as energy consumption .

本申请中所涉及的多个,是指两个或两个以上。A plurality referred to in this application refers to two or more than two.

另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or imply order.

下面结合附图对本申请提供的方案进行具体说明。The solutions provided by the present application will be described in detail below in conjunction with the accompanying drawings.

图1示出了本申请实施例提供的选择测试指令的方法适用的测试系统,参阅图1所示,所述测试系统中包括处理设备101和仿真器102。FIG. 1 shows a test system to which the method for selecting a test instruction provided by an embodiment of the present application is applicable. Referring to FIG. 1 , the test system includes a processing device 101 and an emulator 102 .

在所述测试系统对待测试程序对应的待测试指令进行测试的过程中,所述处理设备101用于将所述待测试指令拆分为M个片段,并确定所述M个片段中每个片段中包含每种特征指令的数目,从而确定所述M个片段中每个片段包含每种特征指令的平均值;以及根据所述M个片段中每个片段包含每种特征指令的数目和所述M个片段中每个片段包含每种特征指令的平均值,在所述M个片段中选择N个片段作为测试指令;其中,所述N个片段中包含至少两个连续的片段M为大于1的整数,N为大于1且小于M的整数;In the process of the test system testing the instruction to be tested corresponding to the program to be tested, the processing device 101 is configured to split the instruction to be tested into M fragments, and determine each of the M fragments Include the number of each kind of characteristic instruction in, thereby determine the average value of each kind of characteristic instruction contained in each fragment in the said M fragments; And according to the number and the described Each of the M fragments contains the average value of each characteristic instruction, and N fragments are selected as test instructions among the M fragments; wherein, the N fragments contain at least two consecutive fragments M is greater than 1 is an integer, N is an integer greater than 1 and less than M;

所述仿真器102用于对所述处理设备选择到的所述测试指令进行测试,从而得到所述测试指令的性能指标。The emulator 102 is configured to test the test instruction selected by the processing device, so as to obtain the performance index of the test instruction.

可选的,所述处理设备101还可以根据所述仿真器102得到的所述测试指令性能指标,得到所述待测试指令的性能指标。Optionally, the processing device 101 may also obtain the performance index of the instruction to be tested according to the performance index of the test instruction obtained by the simulator 102 .

其中,所述处理设备101可以为计算机或集成电路等设备。所述仿真器102可以为模拟器或软件仿真器,对此本申请均不作限定。Wherein, the processing device 101 may be a device such as a computer or an integrated circuit. The simulator 102 may be a simulator or a software simulator, which is not limited in this application.

在本申请实施例提供的所述测试系统中,由于所述处理设备101是根据所述M个片段中每个片段包含每种特征指令的平均值选择所述N个片段的,因此,所述处理设备101选择的所述N个片段(即测试指令)中特征指令的分布与所述待测试指令中特征指令的分布相符,进而可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度;并且相对于通过传统的方法选择N个离散的测试片段,由于所述处理器选择的所述N个片段中包含至少两个连续的片段,这样,在后续的测试过程中,仿真器加载程序的次数降低,因此,本申请实施例提供的该方法可以降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。显然,本申请实施例提供的测试系统可以保证通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度,并且可以降低仿真器测试所述N个片段的时间,提高仿真器的测试效率。In the test system provided in the embodiment of the present application, since the processing device 101 selects the N segments according to the average value of each feature instruction contained in each of the M segments, the The distribution of the characteristic instructions in the N segments (that is, the test instructions) selected by the processing device 101 is consistent with the distribution of the characteristic instructions in the instructions to be tested, thereby ensuring that the subsequent The accuracy of the performance index of the instruction to be tested; and compared to selecting N discrete test segments by traditional methods, since the N segments selected by the processor include at least two continuous segments, like this, in the subsequent During the test process, the number of times the emulator loads programs is reduced. Therefore, the method provided in the embodiment of the present application can reduce the time for the emulator to test the N segments and improve the test efficiency of the emulator. Obviously, the test system provided by the embodiment of the present application can ensure the accuracy of the performance index of the instruction to be tested determined by the performance index of the N fragments, and can reduce the time for the emulator to test the N fragments, improve Simulator testing efficiency.

本申请实施例提供了一种选择测试指令的方法,该方法适用于图1所示的测试系统,本申请实施例涉及的处理设备可以为所述测试系统中的处理设备101。参阅图2所示,该方法的流程包括:The embodiment of the present application provides a method for selecting test instructions, which is applicable to the test system shown in FIG. 1 , and the processing device involved in the embodiment of the present application may be the processing device 101 in the test system. Referring to Fig. 2, the flow process of the method includes:

S201:处理设备将待测试指令拆分为M个片段,M为大于1的整数。S201: The processing device splits the instruction to be tested into M fragments, where M is an integer greater than 1.

可选的,所述待测试指令可以以多个指令流文件的形式进行存储,即所述待测试指令可以存储在多个指令流文件中。因此,所述处理设备在执行S201时,可以以存储所述所述待测试指令的指令流文件为单位拆分所述待测试指令,即将存储在每个指令流文件中的指令作为一个片段。Optionally, the instruction to be tested may be stored in the form of multiple instruction stream files, that is, the instruction to be tested may be stored in multiple instruction stream files. Therefore, when the processing device executes S201, the instruction to be tested may be split in units of instruction stream files storing the instruction to be tested, that is, the instruction stored in each instruction stream file is regarded as a segment.

S202:所述处理设备确定所述M个片段中的每个片段中包含每种特征指令的数目。S202: The processing device determines the number of each characteristic instruction contained in each of the M segments.

可选的,所述特征指令为所述M个片段(或所述待测试指令中)中包含的多种基本块,或多种控制指令。在本申请实施例中,仅以所述特征指令为基本块为例进行说明。Optionally, the characteristic instructions are various basic blocks contained in the M segments (or in the instructions to be tested), or various control instructions. In this embodiment of the present application, description is made by taking the feature instruction as a basic block as an example.

可选的,所述特征指令可以为测试人员预设的,或者所述处理设备根据所述待测试指令确定的。Optionally, the feature instruction may be preset by the tester, or determined by the processing device according to the instruction to be tested.

例如,所述处理设备通过如下方法,根据所述待测试指令确定多种基本块:For example, the processing device determines various basic blocks according to the instruction to be tested by the following method:

所述处理设备确定所述待测试指令中包含的所有基本块,并将相同的基本块作为一类实现对确定的所有基本块进行分类,从而确定多种基本块。The processing device determines all the basic blocks contained in the instruction to be tested, and classifies all the determined basic blocks by taking the same basic block as a class, so as to determine multiple kinds of basic blocks.

S203:所述处理设备确定所述M个片段中每个片段包含每种特征指令的平均值。S203: The processing device determines that each of the M segments contains an average value of each characteristic instruction.

例1,待测试指令分为3个片段,所述待测试指令中包含的特征指令为5种,处理设备确定每个片段分别包含第1种至第5种特征指令的数目为:片段1:{0,2,0,4,5},片段2:{1,3,5,4,0},片段3:{2,1,0,4,2},那么该3个片段中每个片段包含每种特征指令的平均值为{1,2,5/3,4,7/3}。Example 1, the instruction to be tested is divided into 3 segments, and the instruction to be tested contains 5 types of characteristic instructions, and the processing device determines that each segment contains the number of the first to fifth type of characteristic instructions: Segment 1: {0,2,0,4,5}, segment 2: {1,3,5,4,0}, segment 3: {2,1,0,4,2}, then each of the 3 segments Fragments contain an average of {1, 2, 5/3, 4, 7/3} for each feature instruction.

由于所述特征指令对所述待测试指令的性能指标有影响,因此可以将所述M个片段(即所述待测试指令)中每种特征指令的分布情况作为基准,从而可以保证选择出与所述M个片段中每种特征指令的分布情况最为相似或相符的N个片段作为测试指令,进而保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度。在本申请实施例中,所述M个片段中每种特征指令的分布情况可以通过所述M个片段中每个片段包含每种特征指令的平均值表示。Since the characteristic instruction has an impact on the performance index of the instruction to be tested, the distribution of each characteristic instruction in the M segments (that is, the instruction to be tested) can be used as a benchmark, thereby ensuring that the selected The distribution of each characteristic instruction among the M fragments is the most similar or consistent with the N fragments used as test instructions, thereby ensuring the accuracy of the performance index of the instruction to be tested determined by the performance index of the N fragments. . In this embodiment of the present application, the distribution of each characteristic instruction in the M segments may be represented by an average value of each characteristic instruction contained in each of the M segments.

S204:所述处理设备根据所述M个片段中每个片段包含每种特征指令的数目和所述M个片段中每个片段包含每种特征指令的平均值,在所述M个片段中选择N个片段作为测试指令,所述N个片段包含至少两个连续的片段,其中,N为大于1且小于M的整数。S204: The processing device selects among the M segments according to the number of each type of characteristic instruction contained in each of the M segments and the average value of each type of characteristic instruction contained in each of the M segments. N fragments are used as test instructions, and the N fragments include at least two consecutive fragments, wherein N is an integer greater than 1 and less than M.

所述处理设备可以通过多种方法,在所述M个片段中选择所述N个片段,并保证所述N个片段中特征指令的分布与所述M个片段特征指令的分布相符。其中,所述M个片段中特征指令的分布情况,可以由基本向量表示。所述基本向量由所述M个片段中每个片段包含每种特征指令的平均值组成的,例如,所述M个片段中每个片段包含每种特征指令的平均值为例1中的{1,2,5/3,4,7/3},那么所述基本向量为[1,2,5/3,4,7/3]或[1,2,5/3,4,7/3]TThe processing device may select the N segments from the M segments through various methods, and ensure that the distribution of feature instructions in the N segments is consistent with the distribution of feature instructions in the M segments. Wherein, the distribution of the feature instructions in the M segments may be represented by a basic vector. The basic vector is composed of each of the M fragments containing the average value of each characteristic instruction, for example, each of the M fragments contains the average value of each characteristic instruction in Example 1 { 1,2,5/3,4,7/3}, then the basic vector is [1,2,5/3,4,7/3] or [1,2,5/3,4,7/ 3] T.

可选的,所述处理设备可以通过以下方法一,在所述M个片段中选择所述N个片段作为所述测试指令,包括:Optionally, the processing device may select the N segments from the M segments as the test instruction through the following method one, including:

所述处理设备在所述M个片段中选择运行时间之和小于预设的第一时间阈值,且满足第一条件的所述N个片段作为所述测试指令;The processing device selects, among the M segments, the N segments whose running time is less than a preset first time threshold and which meet the first condition as the test instruction;

所述第一条件包括:所述N个片段包含至少两个连续片段,且所述N个片段中所有片段的特征向量的加权和与基本向量之间差值小于预设第一阈值。The first condition includes: the N segments include at least two consecutive segments, and a difference between a weighted sum of feature vectors of all segments in the N segments and a basic vector is smaller than a preset first threshold.

其中,每个片段的特征向量为所述每个片段包含的每种特征指令的数目组成的向量,以例1中的片段1为例进行说明,片段1中包含每种特征指令的数目为{0,2,0,4,5},那么片段1的特征向量为[0,2,0,4,5],或[0,2,0,4,5]TWherein, the feature vector of each segment is a vector composed of the number of each feature instruction contained in each segment. Taking segment 1 in Example 1 as an example, the number of each feature instruction contained in segment 1 is { 0,2,0,4,5}, then the feature vector of segment 1 is [0,2,0,4,5], or [0,2,0,4,5] T .

所述第一阈值为根据具体的测试场景设置的,当所述第一阈值取值越小,所述处理设备在上述方法中选择出的所述N个片段中特征指令的分布与所述M个片段中的特征指令的分布越相似。The first threshold is set according to a specific test scenario. When the value of the first threshold is smaller, the distribution of feature instructions in the N segments selected by the processing device in the above method is different from the M The distribution of feature instructions in each segment is more similar.

可选的,所述M个片段中每个片段的运行时间可以为所述处理设备预测的。可选的,所述处理设备可以考虑每个片段的指令的条数、指令的特点以及仿真器的工作性能等至少一项,对每个片段的运行时间进行预测,对此本申请实施例不作限定。Optionally, the running time of each segment in the M segments may be predicted by the processing device. Optionally, the processing device may consider at least one item, such as the number of instructions in each segment, the characteristics of the instructions, and the performance of the emulator, to predict the running time of each segment, which is not made in this embodiment of the present application. limited.

在上述方法中,所述N个片段中特征指令的分布情况可以由所述N个片段中所有片段的特征向量的加权和表示。由于所述N个片段中所有片段的特征向量的加权和与所述基本向量之间的差值小于所述第一阈值,即所述N个片段中所有片段的特征向量的加权和与所述基本向量拟合,因此,所述N个片段中特征向量的分布与所述M个片段中特征向量的分布相似或相符。因此,通过上述方法选择所述N个片段作为测试片段,可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度。In the above method, the distribution of feature instructions in the N segments may be represented by a weighted sum of feature vectors of all segments in the N segments. Since the difference between the weighted sum of the feature vectors of all the segments in the N segments and the basic vector is smaller than the first threshold, that is, the weighted sum of the feature vectors of all the segments in the N segments and the The basis vectors are fitted, so that the distribution of feature vectors in the N segments is similar or consistent with the distribution of feature vectors in the M segments. Therefore, selecting the N fragments as test fragments by the above method can ensure the accuracy of the performance index of the instruction to be tested which is subsequently determined through the performance indexes of the N fragments.

在上述方法中,相对于通过传统的方法选择N个离散的测试片段,由于所述处理器选择的所述N个片段中包含至少两个连续的片段,这样,在后续的测试过程中,连续的片段可以一次加载到仿真器中,由于仿真器的工作特性,所述仿真器一次加载一个片段所用的加载时间与一次加载多个片段所用的加载时间相近,但是每次加载所用的时间较长,因此该方法可以使仿真器加载程序的次数降低,从而可以降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。In the above method, as compared to selecting N discrete test segments by the traditional method, since the N segments selected by the processor contain at least two continuous segments, in this way, in the subsequent test process, the continuous The fragments of can be loaded into the emulator at one time. Due to the working characteristics of the emulator, the loading time used by the emulator to load one fragment at a time is similar to the loading time used to load multiple fragments at a time, but each load takes longer , so the method can reduce the number of times the emulator loads the program, thereby reducing the time for the emulator to test the N segments and improving the test efficiency of the emulator.

另外,在该方法中,所述处理设备选择的所述N个片段的运行时间之和小于所述第一时间阈值,这样可以保证所述仿真器在测试所述N个片段的时间在所述第一时间阈值范围内,避免造成测试时间过长的现象。In addition, in this method, the sum of the running times of the N fragments selected by the processing device is less than the first time threshold, which can ensure that the simulator tests the N fragments within the Within the threshold range of the first time, avoid the phenomenon that the test time is too long.

在上述方法一中,所述处理设备在所述M个片段中选择运行时间小于所述第一时间阈值,且满足所述第一条件的所述N个片段作为所述测试指令,即所述处理设备选择包含的所有片段的特征向量的加权和与所述基本向量拟合的所述N个片段。可选的,所述处理设备可以通过子空间回归算法,在所述M个片段中选择所述N个片段。In the first method above, the processing device selects the N fragments whose running time is less than the first time threshold and satisfies the first condition among the M fragments as the test instructions, that is, the The processing device selects said N segments comprising a weighted sum of the feature vectors of all segments fitted to said basis vector. Optionally, the processing device may select the N segments from the M segments by using a subspace regression algorithm.

可选的,本申请提供了一种利用子空间回归算法选择所述N个片段的方法,具体包括以下步骤:Optionally, the present application provides a method for selecting the N segments using a subspace regression algorithm, which specifically includes the following steps:

步骤a:所述处理设备初始化残差向量为所述基本向量,并初始化待选子空间为所有X-子空间,其中,所述X-子空间为所述M个片段中任意连续的X个片段的特征向量组成的空间,其中X为大于1小于M的整数;Step a: the processing device initializes the residual vector as the basic vector, and initializes the subspaces to be selected as all X-subspaces, wherein the X-subspaces are any consecutive X of the M segments A space composed of feature vectors of segments, where X is an integer greater than 1 and less than M;

步骤b:所述处理设备在所述待选子空间中,选择与所述残差向量夹角最小的子空间,确定所述残差向量在选择出的子空间中的投影向量,并将所述残差向量与所述投影向量的差作为新的残差向量,将待选子空间去除选择的子空间后的所有子空间作为新的待选子空间;Step b: the processing device selects the subspace with the smallest angle with the residual vector among the subspaces to be selected, determines the projection vector of the residual vector in the selected subspace, and calculates the The difference between the residual vector and the projection vector is used as a new residual vector, and all subspaces after the subspace to be selected are removed from the selected subspace are used as new subspaces to be selected;

步骤c:如果残差向量的大小小于所述第一阈值或选择的所有子空间包含的特征向量对应的片段的运行时间之和大于预设的第二时间阈值,所述处理设备将选择的所有子空间包含的特征向量对应的N个片段作为所述测试指令;如果残差向量的大小不小于所述第一阈值且选择的所有子空间包含的特征向量对应的片段的运行时间之和不大于所述第二时间阈值,所述处理设备返回执行步骤b;其中,所述第二时间阈值小于所述第一时间阈值。Step c: If the size of the residual vector is smaller than the first threshold or the sum of the running times of the segments corresponding to the feature vectors contained in all the selected subspaces is greater than the preset second time threshold, the processing device will select all The N segments corresponding to the feature vectors contained in the subspace are used as the test instructions; if the size of the residual vector is not less than the first threshold and the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is not greater than For the second time threshold, the processing device returns to perform step b; wherein, the second time threshold is smaller than the first time threshold.

可选的,所述第二时间阈值大于所述第一时间阈值与最大运行时间的差,所述最大运行时间为所述M个片段的运行时间中的最大值,或者Optionally, the second time threshold is greater than the difference between the first time threshold and a maximum running time, and the maximum running time is the maximum value among the running times of the M segments, or

所述第二时间阈值大于所述第一时间阈值与X倍的最小运行时间的差,所述最小运行时间为所述M个片段的运行时间中的最小值,或者The second time threshold is greater than the difference between the first time threshold and X times the minimum running time, the minimum running time being the minimum of the running times of the M segments, or

所述第二时间阈值大于所述第一时间阈值与所述最小运行时间的差。The second time threshold is greater than the difference between the first time threshold and the minimum run time.

通过上述方法设置所述第二时间阈值,在所述处理设备在选择的所有子空间包含的特征向量对应的片段的运行时间之和大于所述第二时间阈值的情况下,可以保证所述处理设备无法再次选择子空间,可以停止选择子空间的流程。因为再选子空间,就会导致选择的所有子空间包含的特征向量对应的片段的运行时间之和大于所述第一时间阈值,不满足所述N个片段的的运行时间之和小于所述第一时间阈值的条件。The second time threshold is set by the above method, and when the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces of the processing device is greater than the second time threshold, the processing can be guaranteed The device cannot select a subspace again, and the process of selecting a subspace can be stopped. Because reselecting the subspace will result in the sum of the running times of the segments corresponding to the eigenvectors contained in all the selected subspaces being greater than the first time threshold, and the sum of the running times of the N segments that do not satisfy the requirement is less than the The condition for the first time threshold.

根据数学领域中的向量理论可知,所述处理设备选择的任一个子空间上的投影向量为该子空间包含的X个特征向量的加权和,且在上述方法中,所述处理设备选择的所有子空间上的投影向量之和,与所述基本向量之间差值的大小小于所述第一阈值,即所述处理设备选择的所有子空间包含的X个特征向量(N个片段的特征向量)的加权和与所述基本向量之间差值小于所述第一阈值。According to the vector theory in the field of mathematics, it can be known that the projection vector on any subspace selected by the processing device is the weighted sum of the X feature vectors contained in the subspace, and in the above method, all the vectors selected by the processing device The sum of the projection vectors on the subspaces, and the magnitude of the difference between the basic vectors is less than the first threshold, that is, the X feature vectors (the feature vectors of the N segments) contained in all the subspaces selected by the processing device The difference between the weighted sum of ) and the basic vector is smaller than the first threshold.

通过上述方法,所述处理设备选择的N个片段中包括至少一个连续的X个片段,这样,在后续的测试过程中,可以进一步降低仿真器加载程序的次数,大幅度的降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。Through the above method, the N segments selected by the processing device include at least one continuous X segment, so that in the subsequent test process, the number of times the emulator loads the program can be further reduced, and the emulator test is greatly reduced. The time of the N segments improves the test efficiency of the simulator.

其中,在上述方法中,X为可连续的片段的个数,X可以根据具体测试场景的需求具体设置,这样可以提高所述处理设备选择连续片段的自由度。Wherein, in the above method, X is the number of continuous segments, and X can be specifically set according to the requirements of specific test scenarios, which can improve the degree of freedom for the processing device to select continuous segments.

可选的,在步骤a之前,所述处理设备可以通过如下方法,确定所有X-子空间,包括:Optionally, before step a, the processing device may determine all X-subspaces through the following methods, including:

所述处理设备将所述M个片段中,每连续X个片段分为一组,生成多组片段;The processing device divides each consecutive X segments into one group among the M segments, and generates multiple groups of segments;

所述处理设备将每组片段中包含的X个片段的特征向量组成为一个X-子空间。The processing device composes feature vectors of X segments contained in each group of segments into an X-subspace.

由于在数学领域中,向量可以为一条有方向的线,多个向量可以确定一个平面,因此,在本申请实施例中,一组片段对应的X-子空间用由X个特征向量确定的平面表示。如图3所示,某组片段中包含两个片段,其中一个片段的特征向量为a1,另一个片段的特征向量为a2,这样这两个向量即可确定一个平面C1,该平面即为子空间。Since in the field of mathematics, a vector can be a directional line, and multiple vectors can determine a plane, therefore, in the embodiment of the present application, the X-subspace corresponding to a group of segments uses the plane determined by X eigenvectors express. As shown in Figure 3, a group of fragments contains two fragments, one of which has a eigenvector a1 and the other a2, so that these two vectors can determine a plane C 1 , which is subspace.

可选的,基于与上述方法相同的原理,所述处理设备还可以通过以下步骤,选择所述N个片段:Optionally, based on the same principle as the above method, the processing device may also select the N segments through the following steps:

步骤1:所述处理设备初始化残差向量为所述基本向量,并初始化待选子空间为所有X-子空间,其中,所述X-子空间为所述M个片段中任意连续的X个片段的特征向量组成的空间,其中X为大于1小于M的整数;Step 1: The processing device initializes the residual vector as the basic vector, and initializes the subspaces to be selected as all X-subspaces, wherein the X-subspaces are any consecutive X of the M segments A space composed of feature vectors of segments, where X is an integer greater than 1 and less than M;

步骤2:所述处理设备在所述待选子空间中,选择与所述残差向量夹角最小的子空间,确定所述残差向量在选择出的子空间中的投影向量,并将所述残差向量与所述投影向量的差作为新的残差向量,将待选子空间去除选择的子空间后的所有子空间作为新的待选子空间;Step 2: The processing device selects the subspace with the smallest angle with the residual vector among the subspaces to be selected, determines the projection vector of the residual vector in the selected subspace, and converts the The difference between the residual vector and the projection vector is used as a new residual vector, and all subspaces after the subspace to be selected are removed from the selected subspace are used as new subspaces to be selected;

步骤3:如果残差向量的大小小于所述第一阈值,且选择的所有子空间包含的特征向量对应的片段的运行时间之和小于所述第一时间阈值,所述处理设备返回执行步骤2;如果残差向量的大小不小于所述第一阈值或选择的所有子空间包含的特征向量对应的片段的运行时间之和不小于所述第一时间阈值,所述处理设备丢弃本次选择的子空间,将本次之前选择的所有子空间包含的特征向量对应的N个片段作为所述测试指令。Step 3: If the size of the residual vector is less than the first threshold, and the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is less than the first time threshold, the processing device returns to step 2 ; If the size of the residual vector is not less than the first threshold or the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is not less than the first time threshold, the processing device discards the selected In the subspace, the N segments corresponding to the feature vectors contained in all the subspaces selected before this time are used as the test instructions.

例2,所述处理设备初始化残差向量R为基本向量B,初始化待选子空间为所有2-子空间。由于子空间可以理解为一个平面,向量可以理解为一个直线。所述处理设备在选择子空间时,如图4所示,所述处理设备首先需要确定与R最拟合的子空间(即与R夹角最小的子空间),假设该子空间为C1。此时,所述处理设备可以确定C1中包含的两个特征向量对应的2个片段可以作为测试片段,并继续更新所述残差向量和所述待选子空间,并继续选择子空间,直至最后更新的残差向量的大小小于所述第一阈值,或已选择的测试片段的运行时间之和大于所述第二时间阈值。其中,所述处理设备在选择C1后,更新所述残差向量为R-U,更新所述待选子空间为待选子空间中除去C1后的所有子空间。Example 2, the processing device initializes the residual vector R as the basic vector B, and initializes the subspaces to be selected as all 2-subspaces. Since the subspace can be understood as a plane, the vector can be understood as a straight line. When the processing device selects a subspace, as shown in Figure 4, the processing device first needs to determine the subspace that best fits R (that is, the subspace with the smallest angle with R), assuming that the subspace is C 1 . At this time, the processing device may determine that the two segments corresponding to the two feature vectors contained in C1 can be used as test segments, and continue to update the residual vector and the subspace to be selected, and continue to select a subspace, Until the size of the last updated residual vector is less than the first threshold, or the sum of the running times of the selected test segments is greater than the second time threshold. Wherein, after selecting C 1 , the processing device updates the residual vector to RU, and updates the candidate subspaces to all subspaces except C 1 in the candidate subspaces.

可选的,本申请实施例还提供了另一种利用子空间回归算法选择所述N个片段的方法,具体包括以下步骤:Optionally, the embodiment of the present application also provides another method for selecting the N segments using a subspace regression algorithm, which specifically includes the following steps:

步骤a1:所述处理设备初始化残差向量为所述基本向量,并初始化待选子空间为所有X-子空间,其中,所述X-子空间为所述M个片段中任意连续的X个片段的特征向量组成的空间,其中X为大于1小于M的整数;Step a1: The processing device initializes the residual vector as the basic vector, and initializes the subspaces to be selected as all X-subspaces, wherein the X-subspaces are any consecutive X of the M segments A space composed of feature vectors of segments, where X is an integer greater than 1 and less than M;

步骤b1:所述处理设备在所述待选子空间中,选择与所述残差向量夹角最小的第一子空间;Step b1: the processing device selects a first subspace having the smallest angle with the residual vector among the subspaces to be selected;

步骤c1:所述处理设备在所述待选子空间中确定与所述残差向量夹角次小的第二子空间;Step c1: the processing device determines a second subspace with the second smallest angle with the residual vector among the subspaces to be selected;

步骤d1:所述处理设备将所述待选子空间中去除选择的第一子空间后的所有子空间作为新的待选子空间,并通过如下方式,更新所述残差向量:Step d1: The processing device takes all subspaces except the selected first subspace in the candidate subspaces as new candidate subspaces, and updates the residual vector in the following manner:

所述处理设备在所述第一子空间中的所有向量与所述残差向量的相关系数,并找到相关系数最大的目标方向,如图5所示;所述处理设备根据确定的方向,确定目标向量Y,所述目标向量Y的一个端点在所述第一子空间和所述第二子空间的平分角位置U,另一个端点为所述残差向量与所述第一子空间的交叉点,如图6所示;所述处理设备将所述残差向量与Y的差值作为新的残差向量;The correlation coefficient of all vectors in the first subspace and the residual vector by the processing device, and find the target direction with the largest correlation coefficient, as shown in Figure 5; according to the determined direction, the processing device determines Target vector Y, one endpoint of the target vector Y is at the bisector angle position U of the first subspace and the second subspace, and the other endpoint is the intersection of the residual vector and the first subspace point, as shown in Figure 6; the processing device uses the difference between the residual vector and Y as a new residual vector;

步骤e1:如果残差向量的大小小于所述第一阈值或选择的所有子空间包含的特征向量对应的片段的运行时间之和大于预设的第二时间阈值,所述处理设备将选择的所有子空间包含的特征向量对应的N个片段作为所述测试指令;如果残差向量的大小不小于所述第一阈值且选择的所有子空间包含的特征向量对应的片段的运行时间之和不大于所述第二时间阈值,所述处理设备返回执行步骤b1;其中,所述第二时间阈值的设置同方法一,此处不再赘述。Step e1: If the size of the residual vector is smaller than the first threshold or the sum of the running times of the segments corresponding to the feature vectors contained in all the selected subspaces is greater than the preset second time threshold, the processing device will select all The N segments corresponding to the feature vectors contained in the subspace are used as the test instructions; if the size of the residual vector is not less than the first threshold and the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is not greater than For the second time threshold, the processing device returns to execute step b1; wherein, the setting of the second time threshold is the same as method 1, and will not be repeated here.

通过上述方法,所述处理设备也可以准确地在所述M个片段中选择出符合以上两个条件的N个片段。Through the above method, the processing device can also accurately select N segments that meet the above two conditions from the M segments.

根据数学领域中的向量理论可知,所述处理设备选择的任一个子空间上的任意一个向量为该子空间包含的X个特征向量的加权和,且在上述方法中,所述处理设备选择的所有子空间上的目标向量之和,与所述基本向量之间差值的大小小于所述第一阈值,即所述处理设备选择的所有子空间包含的X个特征向量(N个片段的特征向量)的加权和与所述基本向量之间差值小于所述第一阈值。According to the vector theory in the field of mathematics, it can be known that any vector on any subspace selected by the processing device is the weighted sum of the X feature vectors contained in the subspace, and in the above method, the selected by the processing device The difference between the sum of the target vectors on all subspaces and the basic vector is smaller than the first threshold, that is, the X feature vectors (features of N segments) contained in all subspaces selected by the processing device The difference between the weighted sum of the vector) and the basic vector is smaller than the first threshold.

可选的,所述处理设备可以通过以下方法二,在所述M个片段中选择所述N个片段作为所述测试指令,包括:Optionally, the processing device may select the N segments from the M segments as the test instruction through the following method two, including:

所述处理设备在所述M个片段中,确定S个片段组,其中,S为大于1且小于M的整数,所述S个片段组中每个片段组包含至少两个连续的片段,所述M个片段中一个片段包含于S个片段组中的一个片段组中;The processing device determines S segment groups among the M segments, wherein S is an integer greater than 1 and less than M, and each segment group in the S segment groups contains at least two consecutive segments, so One of the M segments is included in one of the S segment groups;

所述处理设备在所述S个片段组中,选择目标向量与基本向量之间差值小于预设第二阈值的至少一个片段组,并将所述至少一个片段组中包含的所述N个片段作为所述测试指令;其中,所述S个片段组中任一个片段组的目标向量为所述片段组中每个片段包含的每种特征指令的平均值组成的向量,所述基本向量为所述M个片段中每个片段包含的每种特征指令的平均值组成的向量。The processing device selects at least one segment group whose difference between the target vector and the basic vector is smaller than a preset second threshold value among the S segment groups, and selects the N segment groups contained in the at least one segment group Segment as the test instruction; wherein, the target vector of any segment group in the S segment groups is a vector composed of the average value of each feature instruction contained in each segment in the segment group, and the basic vector is A vector composed of average values of each feature instruction included in each of the M segments.

其中,所述第二阈值为根据具体的测试场景设置的,当所述第二阈值取值越小,所述处理设备在上述方法中选择出的所述N个片段中特征指令的分布与所述M个片段中的特征指令的分布越相似。Wherein, the second threshold is set according to a specific test scenario. When the value of the second threshold is smaller, the distribution of the feature instructions in the N segments selected by the processing device in the above method is different from the The distribution of the feature instructions in the M segments is more similar.

在上述方法中,任一个片段组的目标向量可以表示该片段组包含的所有片段中特征指令的分布情况,因此,通过上述方法,所述处理设备选择出的所述至少一个片段组中每个片段组包含的片段中特征指令的分布均与所述M个片段中特征向量的分布均相似或相符。因此,通过上述方法选择所述N个片段作为测试片段,不仅可以提高所述处理设备选择出所述测试片段的速度,而且还可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度。In the above method, the target vector of any segment group can represent the distribution of the feature instructions in all the segments contained in the segment group, therefore, through the above method, each of the at least one segment group selected by the processing device The distribution of feature instructions in the segments included in the segment group is similar to or consistent with the distribution of feature vectors in the M segments. Therefore, selecting the N segments as test segments through the above method can not only improve the speed at which the processing device selects the test segments, but also ensure that the subsequent Test the accuracy of the performance metrics of the command.

下面以具体的例子,对采用传统的方法和本申请实施例提供的方法选择的测试指令的仿真时间进行对比。The following uses a specific example to compare the simulation time of the test instructions selected by using the traditional method and the method provided by the embodiment of the present application.

例3,假设所述仿真器加载一次测试指令(加载一个离散的片段,或同时加载几个连续的片段)所需的加载时间为25分钟,而运行一次待测试片段所需的运行时间为1分钟。Example 3, assuming that the loading time required for the emulator to load a test instruction (load a discrete fragment, or load several continuous fragments simultaneously) is 25 minutes, and the running time required to run a fragment to be tested is 1 minute.

在处理设备采用K-Means聚类方法,在多个片段中选择的测试指令中包含24个离散的测试片段的场景下,所述仿真器测试所述24个离散的测试片段所需的总时间S=25*24+1*24=624分钟;In the scenario where the processing device adopts the K-Means clustering method, and the test instruction selected in multiple fragments contains 24 discrete test fragments, the total time required for the emulator to test the 24 discrete test fragments S=25*24+1*24=624 minutes;

在所述处理设备采用本申请实施例提供的方法,在多个片段中选择的测试指令包含6组片段,且所述6组片段组包含24个片段的场景下,所述仿真器测试所述6组片段所需的总时间S=25*6+1*24=174分钟。In the scenario where the processing device adopts the method provided in the embodiment of the present application, and the test instruction selected among the plurality of fragments includes 6 groups of fragments, and the 6 groups of fragment groups contain 24 fragments, the emulator tests the The total time S=25*6+1*24=174 minutes required for 6 sets of segments.

通过以上对比可看,在所述处理设备在通过两种方法选择相同数目的测试片段的情况下,采用本申请实施例提供的方法选择测试指令,可以明显降低所述仿真器测试该测试指令的总时间。It can be seen from the above comparison that, in the case that the processing device selects the same number of test segments through the two methods, using the method provided by the embodiment of the present application to select the test instruction can significantly reduce the cost of the emulator to test the test instruction. total time.

在本申请实施例中,由于所述处理设备是根据所述M个片段中每个片段包含每种特征指令的平均值选择所述N个片段的,因此,所述处理设备选择的所述N个片段(即测试指令)中特征指令的分布与所述待测试指令中特征指令的分布相符,进而可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度;并且相对于通过传统的方法选择N个离散的测试片段,由于所述处理器选择的所述N个片段中包含至少两个连续的片段,这样,在后续的测试过程中,仿真器加载程序的次数降低,因此,本申请实施例提供的该方法可以降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。显然,本申请实施例提供的方法,可以保证通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度,并且可以降低仿真器测试所述N个片段的时间,提高仿真器的测试效率。In the embodiment of the present application, since the processing device selects the N segments according to the average value of each feature instruction contained in each of the M segments, the N selected by the processing device The distribution of the characteristic instructions in the segments (i.e. the test instructions) is consistent with the distribution of the characteristic instructions in the instructions to be tested, thereby ensuring the accuracy of the performance indicators of the instructions to be tested determined by the performance indicators of the N segments. degree; and with respect to selecting N discrete test segments by traditional methods, since the N segments selected by the processor contain at least two continuous segments, like this, in the subsequent testing process, the emulator loads The number of programs is reduced. Therefore, the method provided by the embodiment of the present application can reduce the time for the emulator to test the N segments, and improve the test efficiency of the emulator. Obviously, the method provided by the embodiment of the present application can ensure the accuracy of the performance index of the instruction to be tested determined by the performance index of the N segments, and can reduce the time for the emulator to test the N segments and improve Simulator testing efficiency.

在所述处理设备采用上述实施例中的方法,在所述M个片段中选择出所述N个片段作为测试指令后,仿真器可以对选择的所述N个片段进行Q次测试,每次测试需要仿真器将一个离散的片段或一组片段(包含至少两个连续的片段)加载到内存并运行,从而得到所述N个片段的性能指标(所述N个片段中每个离散的片段和每组片段的性能指标);其中,Q为大于1且小于N的整数。After the processing device adopts the method in the above embodiment and selects the N segments from the M segments as test instructions, the emulator can perform Q tests on the selected N segments, each time The test requires the emulator to load a discrete fragment or a group of fragments (comprising at least two continuous fragments) into the memory and run it, so as to obtain the performance index of the N fragments (each discrete fragment in the N fragments and the performance index of each group of fragments); wherein, Q is an integer greater than 1 and less than N.

可选的,所述处理设备还可以但不限于以下几种方式,根据所述N个片段中每个离散的片段和每组片段的性能指标,得到所述待测试指令的性能指标:Optionally, the processing device may also obtain the performance index of the instruction to be tested according to the performance index of each discrete segment and each group of segments in the N segments, but not limited to the following methods:

所述处理设备可以获取所述N个片段中每个离散的片段以及每组片段的性能指标的权重,然后分别将所述N个片段中每个离散的片段的性能指标乘以对应的权重,以及将所述N个片段中每组片段的性能指标乘以对应的权重,将得到的计算结果相加作为所述待测试指令的性能指标;或者The processing device may obtain the weight of each discrete segment in the N segments and the performance index of each group of segments, and then multiply the performance index of each discrete segment in the N segments by the corresponding weight, And multiplying the performance index of each group of fragments in the N fragments by the corresponding weight, and adding the obtained calculation results as the performance index of the instruction to be tested; or

所述处理设备确定M与N的商,并确定所述N个片段中所有离散的片段和所有组片段的性能指标的总和,并将所述总和与所述商的乘积,作为所述待测试指令的性能指标。The processing device determines the quotient of M and N, and determines the sum of the performance indicators of all discrete segments and all group segments in the N segments, and uses the product of the sum and the quotient as the to-be-tested The performance metrics of the directive.

其中,所述N个片段中每个离散的片段以及每组片段的性能指标的权重可以为测试人员设置的,或者所述处理设备确定的,本申请对此不作限定。Wherein, the weight of each discrete segment in the N segments and the performance index of each group of segments may be set by the tester or determined by the processing device, which is not limited in the present application.

通过上述方法,所述处理设备可以准确地根据选择的所述N个片段的系能指标得到所述待测试指令的性能指标。Through the above method, the processing device can accurately obtain the performance index of the instruction to be tested according to the selected performance indexes of the N fragments.

基于与方法实施例同样的发明构思,本申请还提供了一种处理设备,所述处理设备用于实现图2所示的选择测试指令的方法,如图7所示,该处理设备700包括:确定单元701以及处理单元702,其中,Based on the same inventive concept as the method embodiment, the present application also provides a processing device, which is used to implement the method for selecting a test instruction shown in FIG. 2 . As shown in FIG. 7 , the processing device 700 includes: The determining unit 701 and the processing unit 702, wherein,

确定单元701,用于将待测试指令分为M个片段,其中,M为大于1的整数;并A determining unit 701, configured to divide the instruction to be tested into M segments, where M is an integer greater than 1; and

确定所述M个片段中每个片段包含的每种特征指令的数目;以及determining the number of each feature instruction included in each of the M segments; and

确定所述M个片段中每个片段包含的每种特征指令的平均值;Determine the average value of each feature instruction contained in each of the M segments;

处理单元702,用于根据所述M个片段中每个片段包含的每种特征指令的数目和所述M个片段中每个片段包含的每种特征指令的平均值,在所述M个片段中选择N个片段作为测试指令,所述N个片段包含至少两个连续的片段,其中N为大于1且小于M的整数。The processing unit 702 is configured to, according to the number of each type of characteristic instructions contained in each of the M segments and the average value of each type of characteristic instructions contained in each of the M segments, in the M segments N fragments are selected as test instructions, and the N fragments include at least two consecutive fragments, where N is an integer greater than 1 and less than M.

可选的,所述处理单元702,具体用于:Optionally, the processing unit 702 is specifically configured to:

在所述M个片段中选择运行时间之和小于预设的第一时间阈值,且满足第一条件的所述N个片段作为所述测试指令;Selecting the N segments whose sum of running time is less than a preset first time threshold and satisfying the first condition from among the M segments is used as the test instruction;

所述第一条件包括:所述N个片段包含至少两个连续片段,且所述N个片段中所有片段的特征向量的加权和与基本向量之间差值小于预设第一阈值,其中,每个片段的特征向量为所述每个片段包含的每种特征指令的数目组成的向量,所述基本向量为所述M个片段中每个片段包含的每种特征指令的平均值组成的向量。The first condition includes: the N segments include at least two consecutive segments, and the difference between the weighted sum of the feature vectors of all segments in the N segments and the basic vector is less than a preset first threshold, wherein, The feature vector of each segment is a vector composed of the number of each type of feature instruction contained in each segment, and the basic vector is a vector composed of the average value of each type of feature instruction contained in each segment of the M segments .

可选的,所述处理单元702,在所述M个片段中选择运行时间小于所述第一时间阈值,且满足所述第一条件的所述N个片段作为所述测试指令时,具体用于执行步骤:Optionally, when the processing unit 702 selects the N segments whose running time is less than the first time threshold and satisfies the first condition among the M segments as the test instruction, specifically use To execute the steps:

步骤a:初始化残差向量为所述基本向量,并初始化待选子空间为所有X-子空间,其中,所述X-子空间为所述M个片段中任意连续的X个片段的特征向量组成的空间,其中X为大于1小于M的整数;Step a: Initialize the residual vector as the basic vector, and initialize the subspaces to be selected as all X-subspaces, where the X-subspaces are the feature vectors of any consecutive X segments among the M segments The space formed, where X is an integer greater than 1 and less than M;

步骤b:在待选子空间中,选择与所述残差向量夹角最小的子空间,确定所述残差向量在选择出的子空间中的投影向量,并将所述残差向量与所述投影向量的差作为新的残差向量,将待选子空间去除选择的子空间后的所有子空间作为新的待选子空间;Step b: In the subspace to be selected, select the subspace with the smallest angle with the residual vector, determine the projection vector of the residual vector in the selected subspace, and combine the residual vector with the The difference of the projection vector is used as a new residual vector, and all subspaces after the subspace to be selected are removed from the selected subspace are used as new subspaces to be selected;

步骤c:如果残差向量的大小小于所述第一阈值或选择的所有子空间包含的特征向量对应的片段的运行时间之和大于预设的第二时间阈值,将选择的所有子空间包含的特征向量对应的N个片段作为所述测试指令;如果残差向量的大小不小于所述第一阈值且选择的所有子空间包含的特征向量对应的片段的运行时间之和不大于所述第二时间阈值,返回执行步骤b;其中,所述第二时间阈值小于所述第一时间阈值。Step c: If the size of the residual vector is smaller than the first threshold or the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is greater than the preset second time threshold, the selected subspaces contained in The N segments corresponding to the feature vectors are used as the test instructions; if the size of the residual vector is not less than the first threshold and the sum of the running times of the segments corresponding to the feature vectors contained in all selected subspaces is not greater than the second Time threshold, return to step b; wherein, the second time threshold is smaller than the first time threshold.

可选的,所述处理单元702,具体用于:Optionally, the processing unit 702 is specifically configured to:

在所述M个片段中,确定S个片段组,其中,S为大于1且小于M的整数,所述S个片段组中每个片段组包含至少两个连续的片段,所述M个片段中一个片段包含于S个片段组中的一个片段组中;Among the M fragments, S fragment groups are determined, wherein S is an integer greater than 1 and less than M, and each fragment group in the S fragment groups contains at least two consecutive fragments, and the M fragments One of the fragments is included in one of the S fragment groups;

在所述S个片段组中,选择目标向量与基本向量之间差值小于预设第二阈值的至少一个片段组,并将所述至少一个片段组中包含的所述N个片段作为所述测试指令;其中,所述S个片段组中任一个片段组的目标向量为所述片段组中每个片段包含的每种特征指令的平均值组成的向量,所述基本向量为所述M个片段中每个片段包含的每种特征指令的平均值组成的向量。Among the S segment groups, select at least one segment group whose difference between the target vector and the basic vector is less than a preset second threshold, and use the N segments contained in the at least one segment group as the A test instruction; wherein, the target vector of any segment group in the S segment groups is a vector composed of the average value of each feature instruction contained in each segment in the segment group, and the basic vector is the M Vector of average values of each feature instruction contained in each fragment in the fragment.

可选的,所述特征指令为所述M个片段中包含的基本块。Optionally, the feature instruction is a basic block contained in the M segments.

在本申请实施例中,由于所述处理设备是根据所述M个片段中每个片段包含每种特征指令的平均值选择所述N个片段的,因此,所述处理设备选择的所述N个片段(即测试指令)中特征指令的分布与所述待测试指令中特征指令的分布相符,进而可以保证后续通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度;并且相对于通过传统的方法选择N个离散的测试片段,由于所述处理器选择的所述N个片段中包含至少两个连续的片段,这样,在后续的测试过程中,仿真器加载程序的次数降低,因此,本申请实施例提供的所述处理设备可以降低了仿真器测试所述N个片段的时间,提高了仿真器的测试效率。显然,本申请实施例提供的所述处理设备,可以保证通过所述N个片段的性能指标确定的所述待测试指令的性能指标的准确度,并且可以降低仿真器测试所述N个片段的时间,提高仿真器的测试效率。In the embodiment of the present application, since the processing device selects the N segments according to the average value of each feature instruction contained in each of the M segments, the N selected by the processing device The distribution of the characteristic instructions in the N fragments (i.e. the test instructions) is consistent with the distribution of the characteristic instructions in the instructions to be tested, thereby ensuring the accuracy of the performance index of the instruction to be tested determined by the performance indexes of the N fragments. and with respect to selecting N discrete test segments by traditional methods, since the N segments selected by the processor contain at least two continuous segments, like this, in the subsequent testing process, the emulator loads The number of programs is reduced. Therefore, the processing device provided in the embodiment of the present application can reduce the time for the emulator to test the N segments, and improve the test efficiency of the emulator. Apparently, the processing device provided in the embodiment of the present application can ensure the accuracy of the performance index of the instruction to be tested determined by the performance index of the N segments, and can reduce the time required for the emulator to test the N segments. Time, improve the test efficiency of the emulator.

本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。The division of modules in the embodiments of the present application is schematic, and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application can be integrated into a processing In the controller, it can also be physically present separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.

其中,当集成的模块采用硬件的形式实现时,如图8所示,处理设备800可以包括处理器801和存储器802。上述模块对应的实体的硬件可以为所述处理器801。所述处理器801,可以是一个中央处理模块(Central Processing Unit,CPU),或者为数字处理模块等等。所述存储器802,用于存储所述处理器801执行的程序。所述存储器802可以是非易失性存储器,比如硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(Random-Access Memory,RAM)。所述存储器802还可以是能够用于携带或存储具有指令或数据结构形式的程序代码并能够由计算机存取的任何其他介质,但不限于此。Wherein, when the integrated modules are implemented in the form of hardware, as shown in FIG. 8 , the processing device 800 may include a processor 801 and a memory 802 . Physical hardware corresponding to the foregoing modules may be the processor 801 . The processor 801 may be a central processing unit (Central Processing Unit, CPU), or a digital processing module or the like. The memory 802 is configured to store programs executed by the processor 801 . The memory 802 may be a non-volatile memory, such as a hard disk (Hard Disk Drive, HDD) or a solid-state disk (Solid-State Drive, SSD), etc., or a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM). The memory 802 may also be any other medium that can be used to carry or store program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

所述处理器801用于执行存储器802存储的程序代码,具体用于执行图2所示实施例所述的方法。可以参见图2所示实施例所述的方法,本申请在此不再赘述。The processor 801 is configured to execute the program codes stored in the memory 802, and is specifically configured to execute the method described in the embodiment shown in FIG. 2 . Reference may be made to the method described in the embodiment shown in FIG. 2 , which will not be repeated here in this application.

可选的,本申请实施例提供的所述处理设备800还可以包括通信接口803,所述通信接口803用于与其他设备(例如仿真器)进行通信。Optionally, the processing device 800 provided in the embodiment of the present application may further include a communication interface 803, where the communication interface 803 is used to communicate with other devices (such as an emulator).

在本申请实施例中不限定所述通信接口803、所述处理器801以及所述存储器802之间的具体连接介质。本申请实施例在图8中以所述处理器801、所述存储器802以及通信接口803之间通过总线804连接,总线804在图8中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线804可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。A specific connection medium among the communication interface 803, the processor 801, and the memory 802 is not limited in this embodiment of the present application. In the embodiment of the present application, in FIG. 8, the processor 801, the memory 802, and the communication interface 803 are connected through a bus 804. The bus 804 is represented by a thick line in FIG. It is for illustrative purposes only, and is not intended to be limiting. The bus 804 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 8 , but it does not mean that there is only one bus or one type of bus.

本发明实施例还提供了一种计算机可读存储介质,用于存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。An embodiment of the present invention also provides a computer-readable storage medium for storing computer software instructions to be executed for executing the above-mentioned processor, which includes a program for executing the above-mentioned processor.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims (11)

1. a kind of method of selection test instruction, which is characterized in that the method includes:
Instruction to be tested is divided into M segment by processing equipment, wherein M is the integer more than 1;
The processing equipment determines the number for each feature instruction that each segment includes in the M segment;
The processing equipment determines the average value for each feature instruction that each segment includes in the M segment;
Number and the M piece of the processing equipment according to each feature instruction that each segment includes in the M segment The average value for each feature instruction that each segment includes in section, selects N number of segment to refer to as test in the M segment It enables, N number of segment includes at least two continuous segments, wherein N is the integer more than 1 and less than M.
2. according to the method described in claim 1, it is characterized in that, the processing equipment is according to each piece in the M segment The average value for each feature instruction that each segment includes in the number and the M segment of each feature instruction that section includes, N number of segment is selected to be instructed as the test in the M segment, including:
The processing equipment selects the sum of run time to be less than preset first time threshold in the M segment, and meets N number of segment of first condition is instructed as the test;
The first condition includes:N number of segment includes at least two continuous fragments, and all segments in N number of segment Feature vector weighted sum and basis vector between difference be less than preset first threshold value, wherein the feature vector of each segment The vector of the number composition for each feature instruction for including for each segment, the basis vector are in the M segment The vector of the average value composition for each feature instruction that each segment includes.
3. method according to claim 2, which is characterized in that when the processing equipment selects operation in the M segment Between be less than the first time threshold, and the N number of segment for meeting the first condition is instructed as the test, including:
Step a:The processing equipment initialization residual vector is the basis vector, and it is all X- to initialize subspace to be selected Subspace, wherein the subspaces X- are the space of the feature vector composition of X segment of arbitrary continuation in the M segment, Wherein X is the integer for being less than M more than 1;
Step b:In subspace to be selected, the subspace of selection and the residual vector angle minimum determines the processing equipment Projection vector of the residual vector in the subspace selected, and the difference of the residual vector and the projection vector is made For new residual vector, all subspaces after subspace to be selected is removed the subspace selected are as new subspace to be selected;
Step c:If the size of residual vector is less than the feature vector that all subspaces of the first threshold or selection include The sum of run time of corresponding segment is more than preset second time threshold, and the processing equipment is by all subspaces of selection Including the corresponding N number of segment of feature vector instructed as the test;If the size of residual vector is not less than described first When the sum of run time of the corresponding segment of feature vector that all subspaces of threshold value and selection include is not more than described second Between threshold value, the processing equipment returns to step b;Wherein, the second time threshold is less than the first time threshold.
4. according to the method described in claim 1, it is characterized in that, the processing equipment is according to each piece in the M segment The average value for each feature instruction that each segment includes in the number and the M segment of each feature instruction that section includes, N number of segment is selected to be instructed as the test in the M segment, including:
The processing equipment determines S segment group in the M segment, wherein S is the integer more than 1 and less than M, described Each segment group includes at least two continuous segments in S segment group, and a segment is contained in the S in the M segment In a segment group in a segment group;
The processing equipment is in the S segment group, and difference is less than default second between selection target vector and basis vector At least one segment group of threshold value, and refer to the N number of segment for including at least one segment group as the test It enables;Wherein, the object vector of any of described S segment group segment group be in the segment group each segment include each The vector of the average value composition of feature instruction, the basis vector are each feature that each segment includes in the M segment The vector of the average value composition of instruction.
5. according to claim 1-4 any one of them methods, which is characterized in that the feature instruction is in the M segment Including basic block.
6. a kind of processing equipment, which is characterized in that including:
Determination unit, for instruction to be tested to be divided into M segment, wherein M is the integer more than 1;And
Determine the number for each feature instruction that each segment includes in the M segment;And
Determine the average value for each feature instruction that each segment includes in the M segment;
Processing unit, the number for being instructed according to each feature that each segment includes in the M segment and the M piece The average value for each feature instruction that each segment includes in section, selects N number of segment to refer to as test in the M segment It enables, N number of segment includes at least two continuous segments, and wherein N is the integer more than 1 and less than M.
7. processing equipment according to claim 6, which is characterized in that the processing unit is specifically used for:
It selects the sum of run time to be less than preset first time threshold in the M segment, and meets the institute of first condition N number of segment is stated to instruct as the test;
The first condition includes:N number of segment includes at least two continuous fragments, and all segments in N number of segment Feature vector weighted sum and basis vector between difference be less than preset first threshold value, wherein the feature vector of each segment The vector of the number composition for each feature instruction for including for each segment, the basis vector are in the M segment The vector of the average value composition for each feature instruction that each segment includes.
8. processing equipment according to claim 7, which is characterized in that the processing unit selects fortune in the M segment The row time is less than the first time threshold, and when the N number of segment for meeting the first condition is instructed as the test, Specifically for executing step:
Step a:Initialization residual vector is the basis vector, and it is all subspaces X- to initialize subspace to be selected, wherein The subspaces X- are the space of the feature vector composition of X segment of arbitrary continuation in the M segment, and wherein X is more than 1 Integer less than M;
Step b:In subspace to be selected, the subspace of selection and the residual vector angle minimum determines the residual vector Projection vector in the subspace selected, and using the difference of the residual vector and the projection vector as new residual error to Amount, all subspaces after subspace to be selected is removed the subspace selected are as new subspace to be selected;
Step c:If the size of residual vector is less than the feature vector that all subspaces of the first threshold or selection include The sum of run time of corresponding segment be more than preset second time threshold, the feature for including by all subspaces of selection to Corresponding N number of segment is measured to instruct as the test;If the size of residual vector not less than the first threshold and selection The sum of run time for the corresponding segment of feature vector that all subspaces include is not more than the second time threshold, and return is held Row step b;Wherein, the second time threshold is less than the first time threshold.
9. processing equipment according to claim 6, which is characterized in that the processing unit is specifically used for:
In the M segment, S segment group is determined, wherein S is the integer more than 1 and less than M, in the S segment group Each segment group includes at least two continuous segments, and a segment is contained in one in S segment group in the M segment In segment group;
In the S segment group, difference is less than at least the one of default second threshold between selection target vector and basis vector A segment group, and the N number of segment for including at least one segment group is instructed as the test;Wherein, the S The object vector of any of a segment group segment group is the flat of each feature instruction that each segment includes in the segment group The vector of mean value composition, the basis vector are the average value for each feature instruction that each segment includes in the M segment The vector of composition.
10. according to claim 6-9 any one of them processing equipments, which is characterized in that the feature instruction is the M piece The basic block for including in section.
11. a kind of processing equipment, which is characterized in that the processing equipment includes:Processor, bus and memory, feature It is,
The memory is connected with the memory by the bus;
The processor calls the instruction being stored in the memory, perform claim to require 1-5 any one of them methods.
CN201710156359.1A 2017-03-16 2017-03-16 A method and processing device for selecting test instructions Expired - Fee Related CN108628731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710156359.1A CN108628731B (en) 2017-03-16 2017-03-16 A method and processing device for selecting test instructions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710156359.1A CN108628731B (en) 2017-03-16 2017-03-16 A method and processing device for selecting test instructions

Publications (2)

Publication Number Publication Date
CN108628731A true CN108628731A (en) 2018-10-09
CN108628731B CN108628731B (en) 2020-12-22

Family

ID=63686550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710156359.1A Expired - Fee Related CN108628731B (en) 2017-03-16 2017-03-16 A method and processing device for selecting test instructions

Country Status (1)

Country Link
CN (1) CN108628731B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025082300A1 (en) * 2023-10-19 2025-04-24 华为技术有限公司 Resource scheduling method and apparatus, and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055153A1 (en) * 2007-08-21 2009-02-26 Bell Jr Robert H Augmenting of Automated Clustering-Based Trace Sampling Methods by User-Directed Phase Detection
US7757065B1 (en) * 2000-11-09 2010-07-13 Intel Corporation Instruction segment recording scheme
CN103049310A (en) * 2012-12-29 2013-04-17 中国科学院深圳先进技术研究院 Multi-core simulation parallel accelerating method based on sampling
CN105630458A (en) * 2015-12-29 2016-06-01 东南大学—无锡集成电路技术研究所 Prediction method of out-of-order processor steady-state average throughput rate based on artificial neural network
CN105654120A (en) * 2015-12-25 2016-06-08 东南大学—无锡集成电路技术研究所 Two-step cluster software load feature extraction method based on SOM and K-means

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7757065B1 (en) * 2000-11-09 2010-07-13 Intel Corporation Instruction segment recording scheme
US20090055153A1 (en) * 2007-08-21 2009-02-26 Bell Jr Robert H Augmenting of Automated Clustering-Based Trace Sampling Methods by User-Directed Phase Detection
CN103049310A (en) * 2012-12-29 2013-04-17 中国科学院深圳先进技术研究院 Multi-core simulation parallel accelerating method based on sampling
CN105654120A (en) * 2015-12-25 2016-06-08 东南大学—无锡集成电路技术研究所 Two-step cluster software load feature extraction method based on SOM and K-means
CN105630458A (en) * 2015-12-29 2016-06-01 东南大学—无锡集成电路技术研究所 Prediction method of out-of-order processor steady-state average throughput rate based on artificial neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高伟: "面向SIMD的自动向量化优化技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025082300A1 (en) * 2023-10-19 2025-04-24 华为技术有限公司 Resource scheduling method and apparatus, and server

Also Published As

Publication number Publication date
CN108628731B (en) 2020-12-22

Similar Documents

Publication Publication Date Title
EP3736692B1 (en) Using computational cost and instantaneous load analysis for intelligent deployment of neural networks on multiple hardware executors
CN106897109B (en) Virtual machine performance prediction method based on random forest regression
WO2018076791A1 (en) Resource load balancing control method and cluster scheduler
US8091073B2 (en) Scaling instruction intervals to identify collection points for representative instruction traces
CN110178123B (en) Performance index evaluation method and device
CN106339181A (en) Method and system for processing data in storage system
US9542294B2 (en) Method to apply perturbation for resource bottleneck detection and capacity planning
US20130013283A1 (en) Distributed multi-pass microarchitecture simulation
KR102057219B1 (en) Apparatus Detecting I/O Data Saturation and Method thereof
CN108628731A (en) A kind of method and processing equipment of selection test instruction
CN106201655B (en) Virtual machine allocation method and virtual machine allocation system
CN110278125B (en) Cloud computing resource elasticity evaluation method
CN115794570A (en) Pressure testing method, device, equipment and computer readable storage medium
CN108008999B (en) Index evaluation method and device
Noorshams et al. Modeling of i/o performance interference in virtualized environments with queueing petri nets
JP2004070862A (en) Memory resource optimization support method, program and apparatus
CN117540613A (en) Pneumatic load secondary interpolation processing method and device
US20240220683A1 (en) Generating and analyzing material structures based on material parameters and machine learning models
CN110097183B (en) Information processing method and information processing system
WO2023097661A1 (en) Big data system resource configuration parameter tuning method based on generative adversarial network
US8527923B1 (en) System, method, and computer program product for hierarchical formal hardware verification of floating-point division and/or square root algorithmic designs using automatic sequential equivalence checking
TW202310586A (en) Method and system for evaluating performance of cloud-based system
CN114490367A (en) Ranking method of metamorphic test case pairs based on coverage information
CN117377945A (en) Apparatus and method for batch rebalancing in distributed data parallel DNN training
EP4517533A1 (en) Method and system for predicting energy consumption of a computer program

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201222