CN-121349901-B - Parameter adjustment method, device, equipment, medium and program product of test software
Abstract
The application provides a parameter adjustment method, device, equipment, medium and program product of test software, wherein the method comprises the steps of determining optimal parameter configuration of a plurality of software parameters of the test software when a plurality of performance indexes reach an optimal value, determining that the software parameters which have a linear relation with the plurality of performance indexes and are related to chip operation are linear variables, determining first characteristic values of the plurality of performance indexes when the linear variables acquire the optimal value based on the optimal parameter configuration and the linear relation, generating a plurality of reference characteristic vectors corresponding to the first characteristic values, reducing parameter configuration values of the plurality of software parameters until similarity between the first characteristic vectors determined based on the adjusted parameter configuration and the reference characteristic vectors is larger than a similarity threshold value, determining the adjusted parameter configuration as target parameter configuration, and therefore achieving the purpose of reducing the software parameters of the test software.
Inventors
- JIANG LONG
- LIU DONGQI
- ZHAO CHAOJUN
Assignees
- 知合计算技术(杭州)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251219
Claims (14)
- 1. A parameter adjustment method of test software for testing a chip, the method comprising: determining parameter configuration of a plurality of software parameters of the test software when a plurality of performance indexes measured by the test software reach an optimal value, and obtaining optimal parameter configuration, wherein the plurality of performance indexes at least comprise hardware performance indexes for optimizing a chip; Determining the software parameters related to the chip operation as linear variables, wherein the linear variables conform to the conditions that performance characteristics exist in the linear relationship corresponding to the linear variables and actual bottlenecks of performance exist in the linear relationship corresponding to the linear variables; Determining an optimal value of the linear variable from the optimal parameter configuration, determining a first characteristic value of the multiple performance indexes when the optimal value of the linear variable is obtained based on the linear relation, and generating a reference characteristic vector based on multiple first characteristic values; Adjusting the parameter configuration of the plurality of software parameters to reduce the parameter configuration value of the software parameters until the similarity between the first feature vector determined based on the adjusted parameter configuration and the reference feature vector is greater than a similarity threshold; and determining the adjusted parameter configuration as a target parameter configuration of the plurality of software parameters, so that the test software performs performance test on the chip based on the target parameter configuration.
- 2. The method of claim 1, wherein the adjusting the parameter configuration of the plurality of software parameters to reduce the parameter configuration values of the software parameters until the similarity between the first feature vector determined based on the adjusted parameter configuration and the reference feature vector is greater than a similarity threshold comprises: And repeatedly executing the steps of adjusting the parameter configuration of the plurality of software parameters until the similarity is larger than the similarity threshold value to obtain the adjusted parameter configuration, determining a second characteristic value of the plurality of performance indexes when the test software runs based on the adjusted parameter configuration, generating a first characteristic vector based on the plurality of second characteristic values, and returning to execute the step of adjusting the parameter configuration of the plurality of software parameters if the similarity is smaller than or equal to the similarity threshold value.
- 3. The method of claim 1, wherein the adjusting the parameter configuration of the plurality of software parameters comprises: determining software parameters affecting the amount of resources required by the running of the test software from the plurality of software parameters to obtain a plurality of adjustable parameters; and adjusting the parameter configuration of the plurality of adjustable parameters.
- 4. The method of claim 3, wherein the adjusting the parameter configuration of the plurality of adjustable parameters comprises forming the plurality of adjustable parameters into a parameter vector, adjusting the parameter vector based on a preset weight vector to obtain an adjusted parameter vector, determining a third characteristic value of the plurality of performance indexes when the test software runs based on the adjusted parameter vector, generating a second characteristic vector based on the plurality of third characteristic values, and adjusting the weight vector based on the deviation between the second characteristic vector and the reference characteristic vector to obtain a target weight vector; The adjusting of the parameter configuration of the plurality of adjustable parameters comprises adjusting the plurality of adjustable parameters based on the target weight vector.
- 5. The method of claim 4, wherein the adjusting the weight vector based on the deviation between the second feature vector and the reference feature vector results in a target weight vector, comprising: If the deviation is greater than a deviation threshold, repeating the steps of adjusting the weight vector based on the deviation to obtain an adjusted weight vector, adjusting the parameter vector based on the adjusted weight vector to obtain an adjusted parameter vector, regenerating the second feature vector based on the adjusted parameter vector, and redetermining the deviation based on the second feature vector and the reference feature vector; And if the deviation is smaller than or equal to the deviation threshold value, determining the adjusted weight vector as the target weight vector.
- 6. The method of any of claims 1 to 5, wherein the generating a reference feature vector based on a plurality of the first feature values comprises: And forming a characteristic sequence by the first characteristic values, and adding each characteristic value in the characteristic sequence with a preset parameter value to form the one-dimensional reference characteristic vector.
- 7. The method according to any one of claims 1 to 5, wherein said determining a parameter configuration of a plurality of software parameters of the test software when a plurality of performance indicators measured by the test software reach an optimal value comprises: And determining the parameter configuration of the plurality of software parameters when the plurality of performance indexes reach the optimal value by performing pressure test on the test software.
- 8. The method of any one of claims 1 to 5, wherein the linear variable comprises one of: Processor occupancy of a user state of program execution; Processor occupancy of the kernel for program execution; processor occupancy for program execution; occupying the number of processor cores.
- 9. The method of any one of claims 1 to 5, wherein the plurality of performance metrics comprises at least two of: Processor execution efficiency; front end pressure when the processor executes; Back-end pressure when the processor executes; loss caused by failure of speculative prediction when the processor executes; branch miss rate performed by the processor; A first level instruction cache miss rate for processor execution; a first level data cache miss rate performed by the processor; A second level cache miss rate performed by the processor; A first level instruction translation look-aside buffer miss rate executed by the processor; A first level data translation look-aside buffer miss rate performed by the processor; the processor executes the second level translation look-aside buffer miss rate.
- 10. The method of claim 9, wherein the plurality of performance metrics further comprises a duty cycle of a program runtime hotspot function.
- 11. A parameter adjustment apparatus of test software for testing a chip, the apparatus comprising: The first determining module is used for determining parameter configuration of a plurality of software parameters of the test software when a plurality of performance indexes measured by the test software reach an optimal value to obtain the optimal parameter configuration, wherein the plurality of performance indexes at least comprise hardware performance indexes for optimizing a chip; the second determining module is used for determining the software parameters related to the chip operation in the plurality of software parameters, which have a linear relation with the plurality of performance indexes, as linear variables, wherein the linear variables conform to the following conditions that performance characteristics exist in the linear relation corresponding to the linear variables and actual bottlenecks of performance exist in the linear relation corresponding to the linear variables; a generating module, configured to determine an optimal value of the linear variable from the optimal parameter configuration, determine a first eigenvalue of the multiple performance indexes when obtaining the optimal value of the linear variable based on the linear relation, and generate a reference eigenvector based on multiple first eigenvalues; The adjusting module is used for adjusting the parameter configuration of the plurality of software parameters to reduce the parameter configuration values of the software parameters until the similarity between the first feature vector determined based on the adjusted parameter configuration and the reference feature vector is larger than a similarity threshold; The adjusting module is further configured to determine the adjusted parameter configuration as a target parameter configuration of the plurality of software parameters, so that the test software performs a performance test on the chip based on the target parameter configuration.
- 12. An electronic device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is configured to store at least one executable instruction that causes the processor to perform the parameter adjustment method of the test software according to any one of claims 1-10.
- 13. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements a method of parameter adjustment of test software according to any of claims 1-10.
- 14. A computer program product comprising computer instructions instructing a computer device to perform the method of parameter adjustment of test software according to any one of claims 1-10.
Description
Parameter adjustment method, device, equipment, medium and program product of test software Technical Field The embodiment of the application relates to the technical field of software programs, in particular to a parameter adjustment method, device, equipment, medium and program product of test software. Background Development work of a central processing unit, a system-level chip and the like requires a simulation environment to support in an early verification stage of chip functions and performances because no physical product exists. Part of software programs to be verified need to run on an operating system, at this time, a Haps or EMU environment needs to be used, and the operating system, benchmark, workload and other environments of the software are loaded for actual running so as to verify the functions and performances of the chip. In this process, the biggest problem of testing performance using Haps or EMU environments is that the system is running at too slow a speed, and when some benchmarks or workload are actually running, it takes much time, even almost impossible to perform tasks, so software slicing technology is typically used to "clip" the benchmarks or workload software programs. However, the software slicing technology may result in extremely high fragmentation degree of slices, so that the running time and the overall complexity are improved, and even the slices cannot be run. Disclosure of Invention In view of the above, embodiments of the present application provide a method, apparatus, device, medium and program product for adjusting parameters of test software, so as to at least solve or alleviate the above-mentioned problems. According to a first aspect of the embodiment of the application, a parameter adjustment method of test software is provided, the test software is used for testing a chip, the method comprises the steps of determining parameter configurations of multiple software parameters of the test software when multiple performance indexes measured by the test software reach an optimal value, obtaining optimal parameter configurations, wherein the multiple performance indexes at least comprise hardware performance indexes for optimizing the chip, determining the software parameters which have linear relations with the multiple performance indexes and are related to the chip operation as linear variables, determining the optimal values of the linear variables from the optimal parameter configurations, determining first characteristic values of the multiple performance indexes when the optimal values of the linear variables are obtained based on the linear relations, generating reference characteristic vectors based on the multiple first characteristic values, adjusting the parameter configurations of the multiple software parameters until the degree of similarity between the first characteristic vectors and the reference characteristic vectors determined based on the adjusted parameter configurations is greater than that of the multiple performance indexes of the chip, and determining the similarity of the multiple performance indexes to the test software parameters based on the threshold value after the parameter configurations are adjusted. According to a second aspect of the embodiment of the application, a parameter adjustment device of test software is provided, the test software is used for testing a chip, the device comprises a first determining module, a second determining module and a generating module, wherein the first determining module is used for determining the optimal value of the linear variable from the optimal parameter configuration, determining the first characteristic value of the multiple performance indexes when the multiple performance indexes measured by the test software reach the optimal value, generating a reference characteristic vector based on the multiple first characteristic values, the adjusting module is used for adjusting the parameter configuration of the multiple software parameters at least to optimize the hardware performance indexes of the chip, the second determining module is used for enabling the multiple software parameters to have a linear relation with the multiple performance indexes and be determined to be a linear variable, the generating module is used for determining the optimal value of the linear variable from the optimal parameter configuration, determining the first characteristic value of the multiple performance indexes when the optimal value of the linear variable is obtained based on the linear relation, the adjusting module is used for adjusting the parameter configuration of the multiple software parameters to reduce the parameter configuration of the software parameters until the parameter configuration values of the multiple software parameters have a linear relation with the multiple performance indexes, and the parameter configuration is further determined to be similar to the threshold value based on t