Application testing method, device, computer equipment and storage medium

By using target test cases on heterogeneous application platforms for functional and performance testing, combining transcoding transplantation and visual performance testing, the functional defects and performance differences of heterogeneous platforms in deep learning applications are solved, and the testing efficiency and quality are improved.

CN113268426BActive Publication Date: 2025-04-25DAWNING INFORMATION IND (BEIJING) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110590499.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2025-04-25
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

Heterogeneous platforms have functional defects and performance differences when running deep learning applications, resulting in open source applications not being able to run successfully or perform poorly.

Method used

Provide an application testing method, by obtaining target test cases for target applications suitable for mainstream application platforms, test the application function support results of target applications on heterogeneous application platforms, and continue to test the application performance of target applications in heterogeneous application platforms when determining the application function support results through application functional testing. Optionally, the underlying dependency library problem that fails functional testing is solved through transcoding and porting, and multi-dimensional performance testing is performed through visual performance testing tools to locate performance differences.

Benefits of technology

Quickly check the functional defects and performance differences of heterogeneous application platforms, improve the testing efficiency and test quality of applications, and ensure the operational effect of applications on heterogeneous application platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113268426B_ABST
    Figure CN113268426B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an application testing method, device, computer equipment and storage medium, the method comprising: obtaining a target test case of a target application applicable to a mainstream application platform; testing the application function support result of the target application on a heterogeneous application platform according to the target test case; and testing the application performance of the target application on the heterogeneous application platform when it is determined that the application function support result passes the application functional test. The technical solution of the embodiment of the present invention can quickly troubleshoot the functional defects and performance difference problems of the heterogeneous application platform, thereby improving the test efficiency and test quality of the application, and further ensuring the running effect of the application on the heterogeneous application platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of testing technology, and in particular to an application testing method, device, computer equipment and storage medium. Background Art

[0002] With the accumulation of massive data and the rapid development of hardware devices, people's demand for computing power is increasing. Simple CPU (Central Processing Unit / Processor) resources can no longer meet people's computing needs. Therefore, various types of heterogeneous acceleration cards such as GPU (Graphics Processing Unit) acceleration cards are born. Configuring heterogeneous acceleration cards in mainstream platforms can form a heterogeneous platform, which can improve the processing efficiency of the computing platform.

[0003] At present, most heterogeneous platforms build corresponding application support based on the basic computing library (also known as dependency library) under their own ecosystem. Taking the ROCm (Radeon Open Compute platform) heterogeneous platform under AMD (Advanced Micro Devices) as an example, the application of GNMT (Google's Neural Machine Translation System) in the field of deep learning natural language processing needs to rely on the AI ​​(Artificial Intelligence) acceleration operator provided by the MIOpen (AMD open source high-performance machine learning library) computing library, and the underlying call is similar to the CUDA (Compute Unified Device Architecture) language HIP (Host Identity Protocol) for development support. Correspondingly, some mainstream deep learning frameworks, such as TensorFlow or PyTorch, have made corresponding porting support. These underlying modifications have no effect on the API (Application Program Interface) level of the upper-level applications of the platform. The interface names can basically remain consistent without making too many additional modifications.

[0004] However, the ecosystem of heterogeneous platforms is not yet perfect, and the dependency libraries of some open source applications are developed based on the mainstream platform environment. For example, some third-party frameworks such as apex and DeepSpeed ​​derived from the deep learning framework PyTorch lack functional support on heterogeneous platforms. Therefore, if the open source code of some mainstream applications is migrated to a heterogeneous environment, problems such as functional or performance anomalies will occur, resulting in the inability of open source applications to run successfully. For example, the current deep learning application case support based on the heterogeneous platform ecosystem mainly has the following problems: (1) Some deep learning applications cannot be run directly on heterogeneous platforms, and some of the dependency libraries involved cannot directly implement functional support. Dependency problems require manual step-by-step troubleshooting to determine the underlying dependency problems; (2) Although deep learning applications can run successfully on heterogeneous platforms, their performance is still somewhat different from that of mainstream platforms, resulting in poor operating results. Summary of the invention

[0005] The embodiments of the present invention provide an application testing method, apparatus, computer equipment and storage medium, which can quickly troubleshoot functional defects and performance difference problems of heterogeneous platforms, thereby improving the testing efficiency and testing quality of the application, and further ensuring the running effect of the application on the heterogeneous application platform.

[0006] In a first aspect, an embodiment of the present invention provides an application testing method, including:

[0007] Obtain target test cases for target applications applicable to mainstream application platforms;

[0008] Testing the application function support result of the target application on the heterogeneous application platform according to the target test case;

[0009] When it is determined that the application function support result passes the application functionality test, the application performance of the target application is tested in the heterogeneous application platform.

[0010] Optionally, after testing the application function support result of the target application on the heterogeneous application platform according to the target test case, the method further includes:

[0011] In the case where it is determined that the application function support result fails the application functionality test, determining a target underlying dependency library in the heterogeneous application platform that fails the application functionality test;

[0012] Determining a target transcoding tool according to the type of the heterogeneous application platform;

[0013] Performing transcoding and transplantation processing on the target underlying dependency library according to the target transcoding tool;

[0014] Return to execute the operation of testing the application function support result of the target application on the heterogeneous application platform according to the target test case, until it is determined that the application function support result passes the application functionality test.

[0015] By adopting the above technical solution, when it is determined that the application function support result fails the application functional test, the target underlying dependency library that fails the application functional test is transcoded and transplanted using a matching transcoding tool, which can effectively solve the compatibility problem of heterogeneous application platforms for the target application.

[0016] Optionally, the testing the application performance of the target application in the heterogeneous application platform includes:

[0017] Calculating the application running performance difference of the target application between the mainstream application platform and the heterogeneous application platform;

[0018] In the case where it is determined that the heterogeneous application platform has performance issues to be optimized based on the difference in the application running performance, a multi-dimensional performance test is performed on the running performance of the target application in the mainstream application platform and the heterogeneous application platform through a visual performance testing tool, and operator call association data of the target application in the running process of the heterogeneous application platform and the mainstream application platform is output;

[0019] Determining a preliminary positioning operator according to the operator calling associated data;

[0020] The operator call associated data includes at least one of the number of called operators, operator call time consumption, and operator call frequency.

[0021] By adopting the above technical solution, when it is determined that there are performance problems to be optimized in the heterogeneous application platform, the detailed situation of the target application running in the heterogeneous application platform can be effectively output by using the visual performance testing tool to perform multi-dimensional performance testing, so as to facilitate in-depth testing and analysis of the running performance of the target application in the heterogeneous platform, thereby preliminarily locating the preliminary positioning operators that affect the application running performance and achieving preliminary positioning of performance problems.

[0022] Optionally, after outputting the operator call associated data of the target application during the running process of the heterogeneous application platform, the method further includes:

[0023] Simplifying the target test case according to the preliminary positioning operator to obtain a simplified test case;

[0024] Reproducing the difference in application running performance of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform according to the simplified test case;

[0025] When it is determined that the application running performance difference of the preliminary positioning operator passes the verification, the preliminary positioning operator is determined as the target operator.

[0026] Optionally, determining the preliminary positioning operator as a target operator includes:

[0027] In the case where it is determined that the reproduction result of the simplified test case matches the application running performance difference corresponding to the preliminary positioning operator, determining the preliminary positioning operator as the target operator;

[0028] When it is determined that the reproduction result of the simplified test case does not match the application running performance difference corresponding to the preliminary positioning operator, the simplified test case is adjusted, and the operation of reproducing the application running performance difference of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform according to the simplified test case is returned to be executed until it is determined that the reproduction result of the simplified test case matches the application running performance difference corresponding to the preliminary positioning operator.

[0029] The above technical solution can ensure the accuracy and reliability of the target operator by verifying the operator selected by the visual performance testing tool using simplified test cases.

[0030] Optionally, after determining the preliminary positioning operator as a target operator, the method further includes:

[0031] Determine the target computing power parameter assignment data of the target operator according to the operator call associated data;

[0032] Performing a benchmark test of underlying operators in the mainstream application platform and the heterogeneous application platform according to a cross-platform operator testing tool and the target computing power parameter assignment data;

[0033] The implementation differences of the target operator between the underlying dependency libraries of the mainstream application platform and the heterogeneous application platform are determined according to the benchmarking test results.

[0034] By adopting the above technical solution, through the benchmarking test of the underlying operators of the target operators in the mainstream application platform and the heterogeneous application platform, the running performance of the target application in the mainstream application platform and the heterogeneous application platform can be gradually located to the gap of the underlying implementation, which can further improve the accuracy of the target application test.

[0035] Optionally, after determining the implementation difference of the target operator between the underlying dependency libraries of the mainstream application platform and the heterogeneous application platform according to the benchmarking test result, the method further includes:

[0036] Performing targeted optimization processing on the target operator and / or the target computing power parameter assignment data of the target operator;

[0037] The targeted optimization processing includes at least one of operator merging, matrix sparsification and matrix compression processing.

[0038] The above technical solution can solve the performance problems of heterogeneous application platforms in a targeted manner by performing targeted optimization processing on the target operator and the target computing power parameter assignment data of the target operator, thereby ensuring that the heterogeneous application platform can effectively run the target application.

[0039] In a second aspect, an embodiment of the present invention further provides an application testing device, including:

[0040] A target test case acquisition module is used to acquire target test cases for target applications applicable to mainstream application platforms;

[0041] An application function support result testing module, used to test the application function support result of the target application on the heterogeneous application platform according to the target test case;

[0042] The application performance testing module is used to test the application performance of the target application in the heterogeneous application platform when it is determined that the application function support result passes the application functionality test.

[0043] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:

[0044] one or more processors;

[0045] A storage device for storing one or more programs;

[0046] When the one or more programs are executed by the one or more processors, the one or more processors implement the application testing method provided by any embodiment of the present invention.

[0047] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the application testing method provided by any embodiment of the present invention is implemented.

[0048] The embodiments of the present invention test the application function support results of the target application on the heterogeneous application platform according to the target test cases applicable to the mainstream application platform, and continue to test the application performance of the target application on the heterogeneous application platform when it is determined that the application function support results pass the application functional test. This solves the problems of low test efficiency and test quality caused by the need for manual troubleshooting of test problems in the existing application testing on heterogeneous application platforms, and can quickly troubleshoot functional defects and performance differences on heterogeneous application platforms, thereby improving the test efficiency and test quality of the application, and further ensuring the running effect of the application on the heterogeneous application platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a flow chart of an application testing method provided by Embodiment 1 of the present invention;

[0050] Figure 2 is a flow chart of an application testing method provided by Embodiment 2 of the present invention;

[0051] Figure 3 It is a flowchart of a deep learning application testing method based on a heterogeneous platform provided in Embodiment 3 of the present invention;

[0052] Figure 4 is a schematic diagram of an application testing device provided by a fourth embodiment of the present invention;

[0053] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0054] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention.

[0055] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.

[0056] Embodiment 1

[0057] Figure 1 is a flow chart of an application testing method provided by the first embodiment of the present invention. This embodiment is applicable to the case of testing the running effect of the target application on a heterogeneous application platform. The method can be executed by an application testing device, which can be implemented by software and / or hardware and can generally be integrated in a computer device. Figure 1 As shown, the method includes the following operations:

[0058] S110 , obtaining target test cases for target applications applicable to mainstream application platforms.

[0059] Among them, the mainstream application platform can be an application platform that only uses CPU computing resources, which is a non-heterogeneous computing platform. It is understandable that the fields to which the mainstream application platform is applicable may include but are not limited to various computing fields such as deep learning, natural language processing, and computer vision, and the embodiments of the present invention do not limit the types of fields to which the mainstream application platform is applicable. The target application may be an application in the mainstream application platform. The target test case may be a test case for testing the running effect of the target application in the mainstream application platform. Exemplarily, when the mainstream application platform is a mainstream platform in the field of deep learning, the target application may be a specific deep learning application (deep learning algorithm) in the mainstream application platform. Accordingly, the target test case may be a test case for testing the deep learning application on the mainstream platform.

[0060] In the embodiment of the present invention, before testing the heterogeneous application platform, the application field of the heterogeneous application platform can be determined first, and the corresponding mainstream application platform can be determined according to the application field of the heterogeneous application platform. Further, a target test case applicable to a specific target application of the mainstream application platform can be obtained, so as to test the heterogeneous application platform according to the test case applicable to the mainstream application platform.

[0061] S120: Testing the application function support result of the target application on the heterogeneous application platform according to the target test case.

[0062] Among them, the heterogeneous application platform can be an application platform composed of multiple different types of computing resources, such as a computing application platform composed of CPU and GPU, etc., as long as it combines different types of computing resources. The embodiment of the present invention does not limit the types of computing resources included in the heterogeneous application platform. The application function support result can reflect the functional support of the heterogeneous application platform for the target application.

[0063] Accordingly, after obtaining the target test case, the application functionality test can be performed on the heterogeneous application platform, specifically, the application function support result of the target application on the heterogeneous application platform is tested according to the target test case to determine the functional support of the heterogeneous application platform for the target application. It can be understood that the functional support of the heterogeneous application platform for the target application reflects the compatibility between the heterogeneous application platform and the target application. That is, the test case type applicable to the mainstream application platform can be used to test the compatibility between the heterogeneous application platform and the target application to quickly troubleshoot the functional defects of the heterogeneous application platform.

[0064] S130: When it is determined that the application function support result passes the application functionality test, test the application performance of the target application in the heterogeneous application platform.

[0065] In the embodiment of the present invention, when it is determined that the application function support result passes the application functionality test, it indicates that the heterogeneous application platform can effectively be compatible with the target application, that is, the heterogeneous application platform passes the compatibility test. In order to enable the heterogeneous application platform to effectively run the target application, it is necessary to further test the application performance of the target application in the heterogeneous application platform.

[0066] It is understandable that the application performance of the target application can be tested in the heterogeneous application platform according to the performance indicators of the target application. Optionally, the performance indicators of the target application may be different for different target application types. Exemplarily, the performance indicators of the target application may include application execution time and application accuracy, etc. The embodiment of the present invention does not limit the indicator type of the performance indicator of the target application.

[0067] It can be seen that the embodiment of the present invention first uses the target test cases of the mainstream application platform to test the compatibility of the target application in the heterogeneous application platform, which can quickly troubleshoot the functional defects of the heterogeneous application platform. After the compatibility passes the test requirements, the application performance of the heterogeneous application platform running the target application is further tested, which can quickly troubleshoot the performance difference problem of the heterogeneous application platform, thereby achieving comprehensive detection of the heterogeneous application platform and improving the test efficiency and test quality of the application in the heterogeneous application platform. When the target application passes the test in the heterogeneous application platform, it indicates that the heterogeneous application platform can effectively run the target application, thereby ensuring the running effect of the application in the heterogeneous application platform.

[0068] The embodiments of the present invention test the application function support results of the target application on the heterogeneous application platform according to the target test cases applicable to the mainstream application platform, and continue to test the application performance of the target application on the heterogeneous application platform when it is determined that the application function support results pass the application functional test. This solves the problems of low test efficiency and test quality caused by the need for manual troubleshooting of test problems in the existing application testing on heterogeneous application platforms, and can quickly troubleshoot functional defects and performance differences on heterogeneous application platforms, thereby improving the test efficiency and test quality of the application, and further ensuring the running effect of the application on the heterogeneous application platform.

[0069] Embodiment 2

[0070] Figure 2 is a flowchart of an application testing method provided by the second embodiment of the present invention. This embodiment is specific based on the above embodiment. In this embodiment, multiple specific optional implementation methods are provided for testing the application function support results of the target application on the heterogeneous application platform according to the target test case, and testing the application performance of the target application on the heterogeneous application platform. Figure 2 As shown, the method of this embodiment may include:

[0071] S210: Obtain a target test case for a target application applicable to a mainstream application platform, and test an application function support result of the target application on a heterogeneous application platform according to the target test case.

[0072] S220, determine whether the application function support result passes the application functionality test, if so, execute S250, otherwise, execute S230.

[0073] In the embodiment of the present invention, if the application function support result passes the application functionality test, indicating that the heterogeneous application platform can effectively be compatible with the target application, then the subsequent performance test can be directly entered. If the application function support result does not pass the application functionality test, indicating that the heterogeneous application platform cannot effectively be compatible with the target application, then the heterogeneous application platform needs to be processed for compatibility so that the heterogeneous application platform can effectively be compatible with the target application, that is, pass the compatibility test.

[0074] S230: Determine the target underlying dependency library that has not passed the application functionality test in the heterogeneous application platform.

[0075] Among them, the target underlying dependency library can be a basic computing library in the underlying layer of the heterogeneous application platform that has not passed the application functional test.

[0076] S240, determining a target transcoding tool according to the type of the heterogeneous application platform, performing transcoding and transplantation processing on the target underlying dependency library according to the target transcoding tool, and returning to execute S220.

[0077] Among them, the target transcoding tool can be used to perform transcoding and transplantation processing on heterogeneous application platforms.

[0078] Accordingly, if the application function support result fails the application functionality test, it is necessary to determine the target underlying dependency library in the heterogeneous application platform that fails the application functionality test, that is, to determine the basic computing library that fails the compatibility test. Furthermore, the target transcoding tool is determined according to the type of the heterogeneous application platform, so that the target underlying dependency library can be transcoded and transplanted using the target transcoding tool, so that the target underlying dependency library can match the encoding method of the mainstream application platform, thereby solving the compatibility problem of the heterogeneous application platform. Optionally, in addition to using the transcoding tool for transcoding and transplantation processing, the API of the automatic transcoding function that comes with the heterogeneous application platform can also be used for functional transplantation. Accordingly, after the transcoding and transplantation processing is completed, the operation of testing the application function support result of the target application on the heterogeneous application platform according to the target test case can be returned to perform functionality verification on the heterogeneous application platform again until it is determined that the application function support result passes the application functionality test.

[0079] By adopting the above technical solution, when it is determined that the application function support result fails the application functional test, the target underlying dependency library that fails the application functional test is transcoded and transplanted using a matching transcoding tool, which can effectively solve the compatibility problem of heterogeneous application platforms for the target application.

[0080] S250: Calculate the difference in application running performance of the target application between the mainstream application platform and the heterogeneous application platform.

[0081] Among them, the application running performance difference can be the difference between the performance of the target application running on two platforms. For example, the application running performance difference can be the difference between the running time of the target application running on two platforms, etc. The embodiment of the present invention does not limit the specific performance difference type of the application running performance difference.

[0082] Specifically, when testing the application performance of a target application in a heterogeneous application platform, the application running performance difference of the target application between the mainstream application platform and the application platform can be calculated to locate the performance problem of the heterogeneous application platform according to the application running performance difference.

[0083] S260. Determine whether the heterogeneous application platform has performance issues to be optimized. If so, execute S270. Otherwise, execute S2J0.

[0084] The preset performance difference threshold may be a pre-set threshold, and may be set to a corresponding value according to actual needs. The embodiment of the present invention does not limit the specific value of the preset performance difference threshold. The performance problem to be optimized may be a performance problem in a heterogeneous application platform that has poor performance and needs further optimization.

[0085] It is understandable that since the functions of heterogeneous application platforms are not yet perfect, the effect of running target applications on them is usually worse than that of mainstream application platforms. If the effect of running target applications on heterogeneous application platforms is close to that of mainstream application platforms, or the difference from the running effect of mainstream application platforms is not too large, then the running effect of heterogeneous application platforms can be considered to be ideal. Therefore, it is possible to determine whether there are performance issues to be optimized on heterogeneous application platforms based on the specific differences in the application running performance between the two platforms.

[0086] Optionally, after obtaining the application running performance difference between the two platforms, the application running performance difference can be further compared with a preset performance difference threshold to determine whether the heterogeneous application platform has performance problems to be optimized based on the comparison results of the two data.

[0087] In a specific example, taking the running time of the application as an example, it is assumed that the preset performance difference threshold corresponding to the running time is 20% of the mainstream application platform. If the running time of the target application on the mainstream application platform is 1s, and the running time of the target application on the heterogeneous application platform is 0.7s, then the application running performance difference between the target application on the mainstream application platform and the heterogeneous application platform is specifically 0.3s, which exceeds 20% of the mainstream application platform, and it can be determined that the heterogeneous application platform has performance problems to be optimized. Alternatively, assuming that the running time of the heterogeneous application platform reaches 80% of the running time of the mainstream application platform, it can be considered that the running performance of the heterogeneous application platform has reached the ideal value. If the running time of the target application on the mainstream application platform is 1s, and the running time of the target application on the heterogeneous application platform is 0.9s, then the performance of the heterogeneous application platform is 90% of the running performance in the mainstream application platform, which exceeds 80%, and it is determined that the heterogeneous application platform does not have performance problems to be optimized.

[0088] Correspondingly, if it is determined that the heterogeneous application platform has performance issues to be optimized, it means that the current heterogeneous application platform cannot effectively run the target application, and further testing and positioning of the performance issues of the heterogeneous application platform is required. If it is determined that the heterogeneous application platform does not have performance issues to be optimized, the subsequent performance test process can be ignored, and the heterogeneous application platform can be directly judged to complete the test process, and it is determined that the heterogeneous application platform meets the operating performance requirements of the target application, and the current heterogeneous application platform can effectively run the target application.

[0089] S270. Perform multi-dimensional performance testing on the running performance of the target application in the mainstream application platform and the heterogeneous application platform through a visual performance testing tool, output operator call association data of the target application during the running process of the heterogeneous application platform and the mainstream application platform, and determine a preliminary positioning operator based on the operator call association data.

[0090] Among them, the visualization performance testing tool can be a tool that tests the running performance of the target application in the heterogeneous application platform in a visual way. For example, the deep learning computing library miopen tool and the log printing tool in rocblas, as long as the running performance of the target application in the heterogeneous application platform can be visually tested, the embodiment of the present invention does not limit the specific tool type of the visualization performance testing tool. The operator call associated data can be the relevant data of the operator called when the target application is running in the heterogeneous application platform. Among them, the operator call associated data can include but is not limited to at least one of the number of called operators, the operator call time and the operator call frequency. The number of called operators is the number of called operators, and the operator call time is the execution time of each called operator. For example, when the heterogeneous application platform includes two computing resources, CPU and GPU, the operator call time can include the time consumed by the operator being called by the CPU and the time consumed by the operator being called by the GPU. The operator call frequency can be the frequency of each operator being called. It can be seen that the operator call associated data can reflect the specific situation of the target application calling the operator when it is running in the heterogeneous application platform. The initially located operator may be an operator causing a difference in application running performance that is initially located through operator call association data output by a visual performance testing tool.

[0091] In an embodiment of the present invention, if it is determined that there are performance problems to be optimized in the heterogeneous application platform, it is necessary to analyze the specific running conditions of the target application on the heterogeneous application platform and the mainstream application platform respectively to determine the specific factors that cause the difference in the running performance of the target application. In order to ensure the accuracy and reliability of the difference in the running performance of the application, the heterogeneous application platform can first exclude the performance differences caused by non-platform factors, such as excluding the influence of the hardware-level application running performance differences caused by factors such as GPU preheating, kernel (operating system kernel) and cache (cache memory) cache, so that the application running performance differences can truly reflect the performance differences between the two platforms. On this basis, the corresponding API is used to call the visual performance testing tool to perform multi-dimensional performance testing on the running performance of the target application in the heterogeneous application platform and the mainstream application platform through the visual performance testing tool, so as to output the operator call association data reflecting the operator call situation during the running process of the target application in the heterogeneous application platform and the mainstream application platform. Since the operator call association data can reflect the call situation of each operator, one or more operators that have the greatest impact on the running performance of the target application in the heterogeneous application platform can be preliminarily analyzed and located according to the operator call association data, and it is determined as the preliminary positioning operator. It is understandable that the visual performance testing tool can be used to determine the difference in application running performance corresponding to the preliminary positioning operator.

[0092] By adopting the above technical solution, when it is determined that there are performance problems to be optimized in the heterogeneous application platform, the detailed situation of the target application running in the heterogeneous application platform can be effectively output by using the visual performance testing tool to perform multi-dimensional performance testing, so as to facilitate in-depth testing and analysis of the running performance of the target application in the heterogeneous platform, thereby preliminarily locating the preliminary positioning operators that affect the application running performance and achieving preliminary positioning of performance problems.

[0093] S280. Simplify the target test case according to the preliminary positioning operator to obtain a simplified test case.

[0094] The simplified test case may be a test case obtained by simplifying the target test case, and may be used to test the underlying operator.

[0095] In the above scheme, the visual performance testing tool can be used to preliminarily compare the performance differences of the two platforms in the specific underlying operator call part to obtain the preliminary positioning operator. Accordingly, in order to accurately determine the performance problem at the underlying operator level, the target test case for testing the entire target application can be simplified according to the preliminary positioning operator to obtain a simplified test case that can test the preliminary positioning operator.

[0096] S290. Reproduce the application running performance difference of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform according to the simplified test case.

[0097] Accordingly, after obtaining the simplified test case, the simplified test case can be used to reproduce the application running performance of the preliminary positioning operator in the mainstream application platform and the heterogeneous application platform respectively. Optionally, the reproduction method may include but is not limited to calling the API encapsulated by the high-level framework and the related functions of the target dependency library. It can be seen that the reproduction results of the simplified test case can reflect the application running performance of the preliminary positioning operator in the two platforms, so as to compare and calculate the application running performance of the preliminary positioning operator in the mainstream application platform and the heterogeneous application platform, and obtain the difference in application running performance of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform.

[0098] Furthermore, after obtaining the difference in application running performance between the mainstream application platform and the heterogeneous application platform of the preliminary positioning operator, the difference in application running performance between the mainstream application platform and the heterogeneous application platform of the preliminary positioning operator determined by the simplified test case can be verified and confirmed with the difference in application running performance corresponding to the preliminary positioning operator determined by the visual performance testing tool. Accordingly, when it is determined that the difference in application running performance of the preliminary positioning operator is verified and confirmed, the preliminary positioning operator can be determined as the target operator. Among them, the target operator is the operator that is finally determined to reduce the application running performance of the target application in the heterogeneous application platform, that is, the operator with slower performance. At the same time, the test results of the current simplified test case can more carefully reflect the difference in application running performance of the target operator in the two platforms.

[0099] S2A0, determine whether the reproduction result of the simplified test case matches the application running performance difference corresponding to the preliminary positioning operator, if so, execute S2C0, otherwise, execute S2B0.

[0100] S2B0. Adjust the simplified test case and return to execute S2A0.

[0101] S2C0. Determine the preliminary positioning operator as a target operator.

[0102] Specifically, when the simplified test case is used to verify and confirm the application operation performance difference of the preliminary positioning operator, the reproduction result of the simplified test case can be compared with the application operation performance difference corresponding to the preliminary positioning operator. If it is determined that the reproduction result of the simplified test case matches the application operation performance difference corresponding to the preliminary positioning operator, such as the application operation performance difference of the two is the same or similar, it indicates that the preliminary positioning operator is found correctly. At this time, the preliminary positioning operator can be directly determined as the target operator. If it is determined that the reproduction result of the simplified test case does not match the application operation performance difference corresponding to the preliminary positioning operator, such as the application operation performance difference of the two is quite different, it is necessary to optimize and adjust the simplified test case. After the simplified test case is adjusted, it can return to execute the operation of reproducing the application operation performance difference of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform according to the simplified test case, until it is determined that the reproduction result of the simplified test case matches the application operation performance difference corresponding to the preliminary positioning operator, and finally determine the target operator.

[0103] The above technical solution can ensure the accuracy and reliability of the target operator by verifying the operator selected by the visual performance testing tool using simplified test cases.

[0104] S2D0. Determine the target computing power parameter assignment data of the target operator according to the operator call associated data.

[0105] The target computing power parameter assignment data may be data for assigning relevant computing power parameters of the target operator.

[0106] In the embodiment of the present invention, the operator call associated data may optionally include the computing power parameter assignment data of each underlying operator. Therefore, after determining the target operator, the computing power parameter assignment data of the target operator may be determined according to the operator call associated data as the target computing power parameter assignment data to determine the parameter assignment status when the target operator is actually called.

[0107] S2E0. Perform underlying operator benchmarking tests in the mainstream application platform and the heterogeneous application platform according to the cross-platform operator testing tool and the target computing power parameter assignment data.

[0108] Among them, the cross-platform operator testing tool can test the performance difference between the underlying computing libraries of mainstream application platforms and heterogeneous application platforms when executing the target operator of the target application. The underlying operator benchmarking test is to benchmark the application running performance of the target operator on the two platforms.

[0109] S2F0. Determine the implementation differences of the target operator between the underlying dependency libraries of the mainstream application platform and the heterogeneous application platform according to the benchmarking test results.

[0110] Among them, the benchmarking test results are the results of benchmarking tests on underlying operators in mainstream application platforms and heterogeneous application platforms.

[0111] Accordingly, in order to concretize the application running performance differences of the target application in the mainstream application platform and the heterogeneous application platform to the underlying dependency library, after determining the target operator and the target computing power parameter assignment data of the target operator, the cross-platform operator testing tool can be used to use the target computing power parameter assignment data of the target operator to perform underlying operator benchmarking tests in the mainstream application platform and the underlying dependency library of the heterogeneous application platform. Accordingly, the benchmarking test results obtained by the target operator in the underlying operator benchmarking test link can reflect the implementation differences between the target operator in the underlying dependency library of the mainstream application platform and the heterogeneous application platform.

[0112] By adopting the above technical solution, through the benchmarking test of the underlying operators of the target operators in the mainstream application platform and the heterogeneous application platform, the running performance of the target application in the mainstream application platform and the heterogeneous application platform can be gradually located to the gap of the underlying implementation, which can further improve the accuracy of the target application test.

[0113] S2J0. Determine whether the heterogeneous application platform meets the operating performance requirements of the target application.

[0114] In an optional embodiment of the present invention, after determining the target operator and the target computing power parameter assignment data of the target operator according to the benchmark test results, it may also include: performing targeted optimization processing on the target operator or the target computing power parameter assignment data of the target operator; wherein the targeted optimization processing may include but is not limited to at least one of operator merging, matrix sparsification and matrix compression processing.

[0115] In the embodiment of the present invention, after the gap between the running performance of the target application in the mainstream application platform and the heterogeneous application platform is gradually located to the underlying implementation, targeted optimization processing can be performed on the target operator and / or the target computing power parameter assignment data of the target operator. For example, the target operator can be subjected to operator merging processing, or the target computing power parameter assignment data can be subjected to matrix sparseness or matrix compression processing, etc.

[0116] The above technical solution can solve the performance problems of heterogeneous application platforms in a targeted manner by performing targeted optimization processing on the target operator and the target computing power parameter assignment data of the target operator, thereby ensuring that the heterogeneous application platform can effectively run the target application.

[0117] Optionally, after targeted optimization processing is performed on the target operator and / or target computing power parameter assignment data, the optimized heterogeneous application platform can be selectively returned to execute the application performance test operation S270-S2C0 to verify the targeted optimization effect.

[0118] The above technical solution can quickly and effectively troubleshoot the default function problems of heterogeneous application platforms and realize the functional support of target applications on heterogeneous application platforms by testing the functional support of heterogeneous application platforms. Furthermore, by gradually testing the application performance differences of target applications on heterogeneous application platforms and mainstream application platforms, the gap between the underlying implementations of the two platforms can be gradually tracked and located, so as to realize targeted optimization of heterogeneous application platforms, so that the target applications on heterogeneous platforms can match or even exceed the operating performance of mainstream application platforms.

[0119] Embodiment 3

[0120] Figure 3 : This is a flowchart of a deep learning application testing method based on a heterogeneous platform provided in Embodiment 3 of the present invention. The embodiment of the present invention mainly uses the natural language processing model GNMT based on the ROCm platform (a heterogeneous application platform) as an example of the target application. Accordingly, the application testing method may include the following process steps:

[0121] Step 1. Perform application functionality testing on heterogeneous application platforms: Use the established use case testing method of the mainstream platform for deep learning applications to test the functional support of deep learning applications on heterogeneous application platforms. The test content of application functionality testing should be as complete as possible, such as the support for data types fp32 (single-precision data type) or fp16 (half-precision data type) in GNMT. If the application functions normally, indicating that the heterogeneous application platform has passed the compatibility test, you can proceed to step three and perform subsequent performance testing. If the application functions abnormally, indicating that the heterogeneous application platform has not passed the compatibility test, you can proceed to step two.

[0122] Step 2, transcoding and transplantation. After the above functional testing steps, the underlying dependency libraries that are not supported on the heterogeneous application platform can be screened out. At this time, the transcoding tool can be used for transcoding and transplantation. For example, the cuda code of the unsupported underlying dependency library is transcoded and transplanted into a hip program through ROCm hipify-perl. Or. Functional transplantation is performed through some automatic transcoding function APIs in the framework. It should be noted that in the process of transcoding and transplantation, there may be some variables or functions that fail to be automatically transcoded. At this time, the variables or functions that fail to be automatically transcoded can be manually corrected to match the encoding method of the heterogeneous application platform. After completing the transcoding and transplantation process on the heterogeneous application platform, it is necessary to enter step 1 again to perform application functional testing until it is determined that the heterogeneous application platform has passed the application functional testing.

[0123] Step 3, multi-dimensional performance testing and problem location. According to the test results in the above step 1, the performance difference between the current heterogeneous application platform and the mainstream computing platform can be determined. If it is determined that there is a significant performance gap between the heterogeneous application platform and the mainstream application platform, it is necessary to specifically capture and find the factors that cause the performance difference. In order to ensure the accuracy of the performance gap, the impact of hardware factors such as GPU preheating, kernel, and cache cache on the performance difference can be first excluded. After that, the performance of the deep learning application can be viewed in different dimensions to determine the specific manifestations of the performance disadvantages. Exemplarily, the detailed data of the operator calls of the deep learning application in the specific operation can be output with the help of the deep learning computing library miopen tool, the log printing function in rocblas, or the API call visualization function built into the framework (for example, torchprof to view the API that takes more time) to preliminarily screen the slower-performing operators in the heterogeneous application platform according to the detailed data of the operator calls, that is, to determine the slow operators.

[0124] Step 4, test case simplification. The test results of step 3 show the performance difference between the two platforms in the specific underlying operator call part. It is understandable that deep learning applications are generally more complex, so when the specific operator that slows down performance is initially determined, a test case can be simplified to reproduce the above performance difference to facilitate debugging. Optionally, the means of reproducing the simplified test case may include but are not limited to calling the API encapsulated by the high-level framework to reproduce and the underlying computing library related functions to reproduce. Further, the operator with slower performance initially screened out in step 3 can be verified based on the reproduction results of the simplified test case to verify the operator initially screened. If the verification is consistent, step 5 can be entered for further testing; otherwise, the simplified test case needs to be adjusted. The adjustment method may include but is not limited to adjusting the scale of data generation, the call of the forward propagation API, and the call of the reverse propagation API. Using the simplified test case, the comparative difference between the slower performance operators on the two platforms can be more clearly seen, and at the same time, it can be verified whether the operator found in the above step is correct. In the GNMT test program, it can be found that the main operators that slow down the program performance are miopen_rnn_backward and miopen_rnn, which take a long time. In the GNMT scenario, the test case can be simplified by calling the nn.LSTM function (an API function) in the PyTorch framework.

[0125] Step 5. Benchmarking test of the underlying operator platform. After the above test steps, the underlying operators with slower performance and the parameter assignment during their actual calls can be roughly analyzed. Furthermore, with the help of cross-platform operator testing tools, the performance differences of the underlying computing libraries of the two platforms when executing actual deep learning application operators can be refined. For example, with the help of the cross-platform open source benchmarking tool DeepBench, the underlying differences of different example scales of multiple operators on the two platforms can be compared in detail. For example, the operators that can be tested by the DeepBench tool may include but are not limited to the loop layer operator rnn_bench and the matrix multiplication operator gemm_bench. After the benchmarking test of the underlying operator platform, the two platforms can be more specifically benchmarked to the differences in the disadvantages of the underlying computing library implementation, thereby completing the entire test process.

[0126] Step 6: Targeted performance optimization. After the test process is completed, the slow operators and their specific example parameter assignments are basically clear. Therefore, in order to improve the operation effect of the heterogeneous application platform for deep learning applications, the slow operators and / or computing power parameter assignments in the heterogeneous application platform can be optimized in a targeted manner. For example, the slow operators can be merged to perform matrix sparseness or matrix compression processing.

[0127] Optionally, after targeted optimization of the heterogeneous application platform, in order to verify the optimization effect, you can go back to step 5 to test the performance improvement of the optimized operator. Accordingly, if the performance verification result meets the optimization target, the optimization is completed; if it does not meet the optimization target, further targeted optimization processing is performed until it is determined that the performance verification result meets the optimization target. After the test result reaches the ideal performance value, optionally, the optimized function performance can be verified through the simplified test case of step 4 or the original test case of step 3.

[0128] The embodiments of the present invention can quickly and effectively troubleshoot the default function problems of heterogeneous application platforms and implement functional support for deep learning applications on specified heterogeneous application platforms by performing functional verification, performance testing and optimization on deep learning applications based on heterogeneous application platforms. For deep learning applications with obvious performance differences, the gaps in the underlying implementation can be gradually tracked and located, so that targeted optimization of heterogeneous application platforms can be achieved, so that deep learning applications on heterogeneous platforms can match or even exceed the computing performance of mainstream application platforms.

[0129] It should be noted that any arrangement and combination of the technical features in the above embodiments also falls within the protection scope of the present invention.

[0130] Embodiment 4

[0131] Figure 4 is a schematic diagram of an application testing device provided by the fourth embodiment of the present invention, such as Figure 4 As shown, the device includes: a target test case acquisition module 310, an application function support result test module 320 and an application performance test module 330, wherein:

[0132] A target test case acquisition module 310 is used to acquire target test cases of target applications applicable to mainstream application platforms;

[0133] An application function support result testing module 320 is used to test the application function support result of the target application on the heterogeneous application platform according to the target test case;

[0134] The application performance testing module 330 is used to test the application performance of the target application in the heterogeneous application platform when it is determined that the application function support result passes the application functionality test.

[0135] The embodiments of the present invention test the application function support results of the target application on the heterogeneous application platform according to the target test cases applicable to the mainstream application platform, and continue to test the application performance of the target application on the heterogeneous application platform when it is determined that the application function support results pass the application functional test. This solves the problems of low test efficiency and test quality caused by the need for manual troubleshooting of test problems in the existing application testing on heterogeneous application platforms, and can quickly troubleshoot functional defects and performance differences on heterogeneous application platforms, thereby improving the test efficiency and test quality of the application, and further ensuring the running effect of the application on the heterogeneous application platform.

[0136] Optionally, the application testing device may further include a transcoding and transplantation processing module, which is used to: when it is determined that the application function support result has not passed the application functionality test, determine the target underlying dependency library in the heterogeneous application platform that has not passed the application functionality test; determine the target transcoding tool according to the type of the heterogeneous application platform; perform transcoding and transplantation processing on the target underlying dependency library according to the target transcoding tool; return to execute the operation of testing the application function support result of the target application on the heterogeneous application platform according to the target test case until it is determined that the application function support result has passed the application functionality test.

[0137] Optionally, the application performance testing module 330 is specifically used to: calculate the application running performance difference of the target application between the mainstream application platform and the heterogeneous application platform; when it is determined that the heterogeneous application platform has performance issues to be optimized based on the application running performance difference, perform multi-dimensional performance testing on the running performance of the target application in the mainstream application platform and the heterogeneous application platform through a visual performance testing tool, and output operator call association data of the target application during the running process of the heterogeneous application platform and the mainstream application platform; determine a preliminary positioning operator based on the operator call association data; wherein the operator call association data includes at least one of the number of called operators, operator call time and operator call frequency.

[0138] Optionally, the application performance testing module 330 is also used to: simplify the target test case according to the preliminary positioning operator to obtain a simplified test case; reproduce the application running performance difference of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform according to the simplified test case; and determine the preliminary positioning operator as the target operator when it is determined that the application running performance difference of the preliminary positioning operator has passed verification.

[0139] Optionally, the application performance testing module 330 is specifically used to: when it is determined that the reproduction result of the simplified test case matches the application running performance difference corresponding to the preliminary positioning operator, determine the preliminary positioning operator as the target operator; when it is determined that the reproduction result of the simplified test case does not match the application running performance difference corresponding to the preliminary positioning operator, adjust the simplified test case, and return to execute the operation of reproducing the application running performance difference of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform according to the simplified test case, until it is determined that the reproduction result of the simplified test case matches the application running performance difference corresponding to the preliminary positioning operator.

[0140] Optionally, the application performance testing module 330 is also used to: determine the target computing power parameter assignment data of the target operator based on the operator call associated data; perform underlying operator benchmarking testing in the mainstream application platform and the heterogeneous application platform based on the cross-platform operator testing tool and the target computing power parameter assignment data; and determine the implementation differences between the underlying dependency libraries of the target operator in the mainstream application platform and the heterogeneous application platform based on the benchmarking test results.

[0141] Optionally, the application testing device may further include a targeted optimization module, which is used to: perform targeted optimization processing on the target operator and / or the target computing power parameter assignment data of the target operator; wherein the targeted optimization processing includes at least one of operator merging, matrix sparsification and matrix compression processing.

[0142] The above application testing device can execute the application testing method provided by any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the application testing method provided by any embodiment of the present invention.

[0143] Since the application testing device introduced above is a device that can execute the application testing method in the embodiment of the present invention, based on the application testing method introduced in the embodiment of the present invention, the technical personnel in this field can understand the specific implementation of the application testing device of this embodiment and its various variations, so how the application testing device implements the application testing method in the embodiment of the present invention is not described in detail here. As long as the technical personnel in this field implement the device used by the application testing method in the embodiment of the present invention, it belongs to the scope of protection of this application.

[0144] Embodiment 5

[0145] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention. Figure 5A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 5 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0146] like Figure 5 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors 16, a memory 28, and a bus 18 that connects various system components (including the memory 28 and the processor 16).

[0147] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0148] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0149] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0150] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0151] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 through the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.

[0152] The processor 16 executes various functional applications and data processing by running the program stored in the memory 28, thereby implementing the application testing method provided by the embodiment of the present invention: obtaining a target test case of a target application suitable for a mainstream application platform; testing the application function support result of the target application on a heterogeneous application platform according to the target test case; and testing the application performance of the target application on the heterogeneous application platform when it is determined that the application function support result passes the application functionality test.

[0153] Embodiment 6

[0154] Embodiment 6 of the present invention further provides a computer storage medium storing a computer program, wherein the computer program, when executed by a computer processor, is used to execute the application testing method described in any one of the above embodiments of the present invention: obtaining a target test case for a target application applicable to a mainstream application platform; testing an application function support result of the target application on a heterogeneous application platform according to the target test case; and testing the application performance of the target application on the heterogeneous application platform when it is determined that the application function support result passes the application functionality test.

[0155] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.

[0156] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0157] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0158] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0159] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An application testing method, characterized in that: include: Obtain target test cases for target applications applicable to mainstream application platforms; Testing the application function support result of the target application on the heterogeneous application platform according to the target test case; When it is determined that the application function support result passes the application functionality test, testing the application performance of the target application in the heterogeneous application platform; The testing the application performance of the target application in the heterogeneous application platform includes: Calculating the application running performance difference of the target application between the mainstream application platform and the heterogeneous application platform; In the case where it is determined that the heterogeneous application platform has performance issues to be optimized based on the difference in the application running performance, a multi-dimensional performance test is performed on the running performance of the target application in the mainstream application platform and the heterogeneous application platform through a visual performance testing tool, and operator call association data of the target application in the running process of the heterogeneous application platform and the mainstream application platform is output; Determining a preliminary positioning operator according to the operator calling associated data; In the case where it is determined that the difference in application running performance of the preliminary positioning operator is confirmed by verification, determining the preliminary positioning operator as a target operator; Determine the target computing power parameter assignment data of the target operator according to the operator call associated data; Performing a benchmark test of underlying operators in the mainstream application platform and the heterogeneous application platform according to a cross-platform operator testing tool and the target computing power parameter assignment data; Determine the implementation difference of the target operator between the underlying dependency libraries of the mainstream application platform and the heterogeneous application platform according to the benchmarking test result; The operator call associated data includes at least one of the number of operator calls, operator call time consumption, and operator call frequency; The preliminary positioning operator is an operator that causes the difference in application running performance and is preliminarily positioned by calling the associated data of the operator output by the visual performance testing tool; The mainstream application platform is an application platform that utilizes CPU computing resources, and the heterogeneous application platform is an application platform that is constructed based on a variety of different types of computing resources.

2. The method according to claim 1, characterized in that After testing the application function support result of the target application on the heterogeneous application platform according to the target test case, the method further includes: In the case where it is determined that the application function support result fails the application functionality test, determining a target underlying dependency library in the heterogeneous application platform that fails the application functionality test; Determining a target transcoding tool according to the type of the heterogeneous application platform; Performing transcoding and transplantation processing on the target underlying dependency library according to the target transcoding tool; Return to execute the operation of testing the application function support result of the target application on the heterogeneous application platform according to the target test case, until it is determined that the application function support result passes the application functionality test.

3. The method according to claim 1, characterized in that After outputting the operator call associated data of the target application during the running process of the heterogeneous application platform, the method further includes: Simplifying the target test case according to the preliminary positioning operator to obtain a simplified test case; The difference in application running performance of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform is reproduced according to the simplified test case.

4. The method according to claim 3, characterized in that The determining the preliminary positioning operator as a target operator comprises: In the case where it is determined that the reproduction result of the simplified test case matches the application running performance difference corresponding to the preliminary positioning operator, determining the preliminary positioning operator as the target operator; When it is determined that the reproduction result of the simplified test case does not match the application running performance difference corresponding to the preliminary positioning operator, the simplified test case is adjusted, and the operation of reproducing the application running performance difference of the preliminary positioning operator between the mainstream application platform and the heterogeneous application platform according to the simplified test case is returned to be executed until it is determined that the reproduction result of the simplified test case matches the application running performance difference corresponding to the preliminary positioning operator.

5. The method according to claim 1, characterized in that After determining the implementation difference of the target operator between the underlying dependency libraries of the mainstream application platform and the heterogeneous application platform according to the benchmarking test result, the method further includes: Performing targeted optimization processing on the target operator and / or the target computing power parameter assignment data of the target operator; The targeted optimization processing includes at least one of operator merging, matrix sparsification and matrix compression processing.

6. An application testing device, characterized in that: include: A target test case acquisition module is used to acquire target test cases for target applications applicable to mainstream application platforms; An application function support result testing module, used to test the application function support result of the target application on the heterogeneous application platform according to the target test case; An application performance testing module, configured to test the application performance of the target application in the heterogeneous application platform when it is determined that the application function support result passes the application functionality test; The application performance test module is specifically used for: Calculating the application running performance difference of the target application between the mainstream application platform and the heterogeneous application platform; In the case where it is determined that the heterogeneous application platform has performance issues to be optimized based on the difference in the application running performance, a multi-dimensional performance test is performed on the running performance of the target application in the mainstream application platform and the heterogeneous application platform through a visual performance testing tool, and operator call association data of the target application in the running process of the heterogeneous application platform and the mainstream application platform is output; Determining a preliminary positioning operator according to the operator calling associated data; In the case where it is determined that the difference in application running performance of the preliminary positioning operator is confirmed by verification, determining the preliminary positioning operator as a target operator; The application performance testing module is also used to: determine the target computing power parameter assignment data of the target operator according to the operator call association data; perform a benchmark test of the underlying operators in the mainstream application platform and the heterogeneous application platform according to the cross-platform operator testing tool and the target computing power parameter assignment data; determine the implementation differences between the underlying dependency libraries of the target operator in the mainstream application platform and the heterogeneous application platform according to the benchmark test results; The operator call associated data includes at least one of the number of operator calls, operator call time consumption, and operator call frequency; The preliminary positioning operator is an operator that causes the difference in application running performance and is preliminarily positioned by calling the associated data of the operator output by the visual performance testing tool; The mainstream application platform is an application platform that utilizes CPU computing resources; the heterogeneous application platform is an application platform that is constructed based on a variety of different types of computing resources.

7. A computer device, characterized in that: The computer device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the application testing method as described in any one of claims 1-5.

8. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the application testing method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Performance analysis method and system, electronic device and storage medium

    CN110618933A

  • Transplanting program detection method and device, electronic equipment and computer readable storage medium

    CN111240987A

  • Heterogeneous application transplantation method and device and computer equipment

    CN111610976A