GPU verification system, method and device, electronic equipment, storage medium and program product
Through a dynamic GPU verification system, the collaborative work between the designated platform and the reference platform is solved, and the problem of insufficient coverage and accuracy of GPU verification in the existing technology is achieved, achieving more realistic and efficient GPU verification.
Patent Information
- Application Number
- CN202411907539.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-25
AI Technical Summary
When verifying GPU compatibility, existing GPU verification methods are difficult to fully capture the true performance and behavior of the GPU under different operating conditions, resulting in insufficient verification coverage and accuracy.
A dynamic GPU verification system is adopted to work together between the designated platform and the reference platform, run test cases and send test-related data. The reference platform side verifies based on these data to ensure the accuracy and coverage of the verification results.
It improves the coverage and accuracy of GPU verification, so that the verification results more truly reflect the performance of the GPU to be verified in actual applications, simplifies the test process, and reduces the error rate and workload.
Smart Images

Figure CN119690762A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of GPU technology, and in particular to a GPU verification method, a GPU verification device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the rapid development of computer technology, GPU (Graphics Processing Unit) is the core component responsible for graphics rendering and processing in computer systems, and its performance and application scope are expanding. In the development and testing process of GPU, GPU compatibility verification is an important step to ensure the stable operation of GPU on different platforms. By verifying the compatibility of GPU, it can be verified whether the GPU can work normally in different operating systems, different hardware architectures and different software environments, thereby ensuring the stability and reliability of GPU. Summary of the invention
[0003] The present disclosure provides a GPU verification technology solution.
[0004] A GPU verification system, the system comprising a designated platform end and a reference platform end, the designated platform end being configured with a GPU to be verified;
[0005] The designated platform end is used to run the test case, execute the test task in the test case based on the GPU to be verified through the test case, obtain the test result of the test case on the designated platform end, and send the test related data of the designated platform end to the reference platform end, wherein the test related data at least includes the information of the test case and the test result;
[0006] The reference platform end is used to determine the test case according to the test-related data, obtain the test result from the test-related data, run the test case, obtain a first reference result of the test case on the reference platform end, and compare the first reference result with the test result to obtain a first verification result corresponding to the GPU to be verified.
[0007] In a possible implementation, the designated platform end is specifically used for:
[0008] The test related data is sent to the reference platform end in a non-blocking manner.
[0009] In a possible implementation, the designated platform end is specifically used for:
[0010] Create a subprocess to handle data sending tasks;
[0011] The test related data is sent to the reference platform end through the sub-process.
[0012] In a possible implementation, the designated platform end is specifically used for:
[0013] In response to the environment variable of the designated platform end being in synchronization mode, the test-related data is sent to the reference platform end through the subprocess.
[0014] In one possible implementation,
[0015] The designated platform end is specifically used to: store the test-related data in a designated storage system;
[0016] The reference platform end is also used to: obtain the test related data from the designated storage system.
[0017] In a possible implementation, the designated platform end is specifically used for:
[0018] In response to the environment variable of the designated platform end being in asynchronous mode, the test-related data is stored in a designated storage system.
[0019] In a possible implementation, the reference platform is further used for:
[0020] In response to the environment variable of the reference platform being in assertion mode, monitoring the test-related data from the designated platform.
[0021] In a possible implementation, the reference platform is specifically used for:
[0022] The test case executes the test task in the test case based on the CPU of the reference platform end, so as to obtain the first reference result of the test case on the reference platform end.
[0023] In a possible implementation, the reference platform is also configured with the GPU to be verified;
[0024] The reference platform end is also used for: in response to the first verification result indicating that the difference between the first reference result and the test result exceeds a preset error range, re-running the test case, executing the test task in the test case based on the GPU to be verified through the test case, obtaining a second reference result of the test case on the reference platform end, and comparing the second reference result with the test result to obtain a second verification result corresponding to the GPU to be verified.
[0025] In a possible implementation, the reference platform is further used for:
[0026] In response to the first verification result indicating that the difference between the first reference result and the test result exceeds the preset error range, the environmental variables of the reference platform are modified to a default mode.
[0027] In one possible implementation,
[0028] The designated platform end is specifically used for: serializing the test-related data to obtain serialized data corresponding to the test-related data; and sending the serialized data to the reference platform end;
[0029] The reference platform end is specifically used to: deserialize the serialized data to obtain the test related data.
[0030] In one possible implementation,
[0031] The designated platform end is further used for: in response to completion of the to-be-verified GPU test, sending a test end message to the reference platform end;
[0032] The reference platform end is further used to: in response to the test end message, generate a verification report corresponding to the GPU to be verified at least according to the first verification result.
[0033] In a possible implementation, the designated platform end is configured with a CPU of a designated model and is equipped with a designated operating system.
[0034] According to one aspect of the present disclosure, a GPU verification method is provided. The method is applied to a specified platform end, and the specified platform end is configured with a GPU to be verified. The method includes:
[0035] Run the test cases;
[0036] Executing the test task in the test case based on the GPU to be verified by the test case to obtain the test result of the test case on the specified platform end;
[0037] Send the test related data of the designated platform end to the reference platform end, so as to obtain a first verification result corresponding to the GPU to be verified through the reference platform end based on the test related data, wherein the test related data at least includes information of the test case and the test result.
[0038] In a possible implementation, the sending the test-related data of the designated platform end to the reference platform end includes:
[0039] The test related data is sent to the reference platform end in a non-blocking manner.
[0040] In a possible implementation, sending the test-related data to the reference platform in a non-blocking manner includes:
[0041] Create a subprocess to handle data sending tasks;
[0042] The test related data is sent to the reference platform end through the sub-process.
[0043] In a possible implementation, sending the test-related data to the reference platform end through the subprocess includes:
[0044] In response to the environment variable of the designated platform end being in synchronization mode, the test-related data is sent to the reference platform end through the subprocess.
[0045] In a possible implementation, sending the test-related data to the reference platform in a non-blocking manner includes:
[0046] The test-related data is stored in a designated storage system.
[0047] In a possible implementation, storing the test-related data in a designated storage system includes:
[0048] In response to the environment variable of the designated platform end being in asynchronous mode, the test-related data is stored in a designated storage system.
[0049] In a possible implementation, the sending the test-related data of the designated platform end to the reference platform end includes:
[0050] Serializing the test-related data to obtain serialized data corresponding to the test-related data;
[0051] The serialized data is sent to the reference platform end.
[0052] In a possible implementation, the method further includes:
[0053] In response to the completion of the GPU test to be verified, a test end message is sent to the reference platform end.
[0054] In a possible implementation, the designated platform end is configured with a CPU of a designated model and is equipped with a designated operating system.
[0055] According to one aspect of the present disclosure, a GPU verification method is provided, the method being applied to a reference platform side, the method comprising:
[0056] Get test-related data on the specified platform;
[0057] Determine a test case according to the test-related data, and obtain a test result of the test case on the designated platform end from the test-related data;
[0058] Running the test case to obtain a first reference result of the test case on the reference platform end;
[0059] The first reference result and the test result are compared to obtain a first verification result corresponding to the GPU to be verified.
[0060] In a possible implementation, the method further includes:
[0061] In response to the environment variable of the reference platform being in assertion mode, monitoring the test-related data from the designated platform.
[0062] In a possible implementation, the running the test case to obtain a first reference result of the test case on the reference platform includes:
[0063] The test case executes the test task in the test case based on the CPU of the reference platform end, so as to obtain the first reference result of the test case on the reference platform end.
[0064] In a possible implementation, the reference platform is also configured with the GPU to be verified;
[0065] The method also includes: in response to the first verification result indicating that the difference between the first reference result and the test result exceeds a preset error range, re-running the test case, executing the test task in the test case based on the GPU to be verified through the test case, obtaining a second reference result of the test case on the reference platform side, and comparing the second reference result with the test result to obtain a second verification result corresponding to the GPU to be verified.
[0066] In a possible implementation, the method further includes:
[0067] In response to the first verification result indicating that the difference between the first reference result and the test result exceeds the preset error range, the environmental variables of the reference platform are modified to a default mode.
[0068] In a possible implementation, the acquiring of the test-related data on the designated platform includes: deserializing the serialized data to obtain the test-related data.
[0069] In a possible implementation, the method further includes:
[0070] In response to the test end message, a verification report corresponding to the GPU to be verified is generated at least according to the first verification result.
[0071] According to one aspect of the present disclosure, a GPU verification device is provided. The device is applied to a specified platform end, and the specified platform end is configured with a GPU to be verified. The device includes:
[0072] The first running module is used to run the test case;
[0073] A testing module, configured to execute the test task in the test case based on the GPU to be verified through the test case, and obtain the test result of the test case on the specified platform end;
[0074] The first sending module is used to send the test related data of the specified platform end to the reference platform end, so as to obtain the first verification result corresponding to the GPU to be verified based on the test related data through the reference platform end, wherein the test related data at least includes the information of the test case and the test result.
[0075] In a possible implementation manner, the first sending module is used to:
[0076] The test related data is sent to the reference platform end in a non-blocking manner.
[0077] In a possible implementation manner, the first sending module is used to:
[0078] Create a subprocess to handle data sending tasks;
[0079] The test related data is sent to the reference platform end through the sub-process.
[0080] In a possible implementation manner, the first sending module is used to:
[0081] In response to the environment variable of the designated platform end being in synchronization mode, the test-related data is sent to the reference platform end through the subprocess.
[0082] In a possible implementation manner, the first sending module is used to:
[0083] The test-related data is stored in a designated storage system.
[0084] In a possible implementation manner, the first sending module is used to:
[0085] In response to the environment variable of the designated platform end being in asynchronous mode, the test-related data is stored in a designated storage system.
[0086] In a possible implementation manner, the first sending module is used to:
[0087] Serializing the test-related data to obtain serialized data corresponding to the test-related data;
[0088] The serialized data is sent to the reference platform end.
[0089] In a possible implementation manner, the device further includes:
[0090] The second sending module is used to send a test end message to the reference platform end in response to the completion of the GPU test to be verified.
[0091] In a possible implementation, the designated platform end is configured with a CPU of a designated model and is equipped with a designated operating system.
[0092] According to one aspect of the present disclosure, a GPU verification device is provided, the device is applied to a reference platform, and the device includes:
[0093] The acquisition module is used to obtain test-related data from the specified platform;
[0094] A determination module, configured to determine a test case according to the test-related data, and obtain a test result of the test case on the designated platform end from the test-related data;
[0095] A second running module is used to run the test case to obtain a first reference result of the test case on the reference platform end;
[0096] The comparison module is used to compare the first reference result and the test result to obtain a first verification result corresponding to the GPU to be verified.
[0097] In a possible implementation manner, the device further includes:
[0098] The monitoring module is used to monitor the test related data from the designated platform end in response to the environment variable of the reference platform end being in assertion mode.
[0099] In a possible implementation, the second operation module is used to:
[0100] The test case executes the test task in the test case based on the CPU of the reference platform end, so as to obtain the first reference result of the test case on the reference platform end.
[0101] In a possible implementation, the reference platform is also configured with the GPU to be verified;
[0102] The device also includes: a third running module, which is used to re-run the test case in response to the first verification result indicating that the difference between the first reference result and the test result exceeds a preset error range, and execute the test task in the test case based on the GPU to be verified through the test case to obtain a second reference result of the test case on the reference platform end, and compare the second reference result with the test result to obtain a second verification result corresponding to the GPU to be verified.
[0103] In a possible implementation manner, the device further includes:
[0104] A modification module is used to modify the environment variable of the reference platform end to a default mode in response to the first verification result indicating that the difference between the first reference result and the test result exceeds the preset error range.
[0105] In a possible implementation, the acquisition module is used to: deserialize the serialized data to obtain the test-related data.
[0106] In a possible implementation manner, the device further includes:
[0107] A generating module is used to generate a verification report corresponding to the GPU to be verified in response to the test end message at least according to the first verification result.
[0108] According to one aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0109] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
[0110] According to one aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0111] The embodiment of the present disclosure provides a GPU verification system, the system includes a designated platform end and a reference platform end, the designated platform end is configured with a GPU to be verified. The designated platform end is used to run a test case, execute the test task in the test case based on the GPU to be verified through the test case, obtain the test result of the test case on the designated platform end, and send the test-related data of the designated platform end to the reference platform end, wherein the test-related data at least includes the information of the test case and the test result. The reference platform end is used to determine the test case according to the test-related data, obtain the test result from the test-related data, run the test case, obtain the first reference result of the test case on the reference platform end, and compare the first reference result with the test result to obtain the first verification result corresponding to the GPU to be verified. Since the designated platform end may contain random parameters and environmental changes each time it executes the test case, therefore, the embodiment of the present disclosure provides a dynamic GPU verification technology solution, which can capture the real performance and behavior of the GPU to be verified under different operating conditions, thereby improving the coverage and accuracy of GPU verification, so that the verification result more truly reflects the performance of the GPU to be verified in actual applications.
[0112] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0113] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0115] Figure 1 A block diagram of a GPU verification system provided by an embodiment of the present disclosure is shown.
[0116] Figure 2 A schematic diagram showing a GPU verification solution in the related art.
[0117] Figure 3 A schematic diagram of a GPU verification solution provided by an embodiment of the present disclosure is shown.
[0118] Figure 4 Another schematic diagram of the GPU verification solution provided by an embodiment of the present disclosure is shown.
[0119] Figure 5 A flow chart of a GPU verification method provided by an embodiment of the present disclosure is shown.
[0120] Figure 6 Another flow chart of the GPU verification method provided by an embodiment of the present disclosure is shown.
[0121] Figure 7 A block diagram of a GPU verification device provided by an embodiment of the present disclosure is shown.
[0122] Figure 8 Another block diagram of the GPU verification device provided by an embodiment of the present disclosure is shown.
[0123] Fig. 9 A block diagram of an electronic device 1900 provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0124] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0125] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0126] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0127] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0128] In the related art, when verifying a GPU on a specified platform, it is usually necessary to compare it with a specific reference platform to verify whether the performance and behavior of the GPU on different platforms are consistent. This is because when using processors of different models or provided by different manufacturers, especially in application scenarios involving high-precision calculations or high result sensitivity, uncontrollable risks caused by differences in processor architectures may be encountered. Specifically, the difference in processor architecture is mainly reflected in the implementation of floating-point operations. Different processor architectures may use different algorithms or strategies to process floating-point operations, which may result in slightly different calculation results on different processors even for the same input data. Especially when dealing with special cases such as infinity (inf) and non-number (NaN), the processing methods of different processor architectures may be significantly different. Therefore, in the related art, it is necessary to dump data on a specific reference platform, that is, export the test results on the reference platform as a dump file as reference data. However, this method has obvious limitations.
[0129] First, the reference data obtained through data dump is static. In actual applications, random parameters and dynamically changing environmental conditions have a significant impact on the performance and behavior of the GPU. Therefore, fixed reference data may not fully reflect the performance of the GPU in a real environment, thus reducing the coverage and accuracy of the test.
[0130] Secondly, the data dump method also involves the issue of copying and version management of dump files. This not only increases the complexity and workload of testing, but may also lead to version confusion and difficulty in troubleshooting. During the testing process, if a problem occurs and needs to be traced back and troubleshooted, managing multiple versions of dump files will be a tedious and time-consuming task.
[0131] In order to solve the technical problems similar to those described above, an embodiment of the present disclosure provides a GPU verification system, the system includes a designated platform end and a reference platform end, and the designated platform end is configured with a GPU to be verified. The designated platform end is used to run a test case, execute the test task in the test case based on the GPU to be verified through the test case, obtain the test result of the test case on the designated platform end, and send the test-related data of the designated platform end to the reference platform end, wherein the test-related data at least includes the information of the test case and the test result. The reference platform end is used to determine the test case according to the test-related data, obtain the test result from the test-related data, run the test case, obtain the first reference result of the test case on the reference platform end, and compare the first reference result with the test result to obtain the first verification result corresponding to the GPU to be verified. Since the designated platform end may contain random parameters and environmental changes each time it executes the test case, therefore, an embodiment of the present disclosure provides a dynamic GPU verification technical solution, which can capture the real performance and behavior of the GPU to be verified under different operating conditions, thereby improving the coverage and accuracy of GPU verification, so that the verification result more truly reflects the performance of the GPU to be verified in actual applications.
[0132] In addition, the disclosed embodiment does not need to perform data dump on the reference platform, nor does it need to transfer the dump file, thereby effectively solving the dump file copying and dump file version management problems involved in data dump in the related art. In the process of verifying the GPU in the disclosed embodiment, any necessary data update or troubleshooting can be performed directly in the real-time data stream without processing and managing multiple versions of dump files. This method simplifies the test process, reduces the error rate, improves the test efficiency, and makes troubleshooting more direct and fast, thereby significantly improving the reliability and convenience of the entire verification process.
[0133] In addition, since when the test case is run on the specified platform, the test case will call the API (Application Programming Interface) provided by the GPU to be verified to execute the test tasks in the test case, the embodiment of the present disclosure can implement interface-level compatibility verification for the GPU to be verified to ensure that the GPU to be verified can work normally on the specified platform and perform the expected performance.
[0134] Figure 1 FIG. 1 is a block diagram of a GPU verification system provided by an embodiment of the present disclosure. Figure 1As shown, the GPU verification system includes a designated platform end and a reference platform end, wherein the designated platform end is configured with a GPU to be verified. The designated platform end is used to run a test case, execute the test task in the test case based on the GPU to be verified through the test case, obtain the test result of the test case on the designated platform end, and send the test-related data of the designated platform end to the reference platform end, wherein the test-related data at least includes the information of the test case and the test result. The reference platform end is used to determine the test case according to the test-related data, obtain the test result from the test-related data, run the test case, obtain the first reference result of the test case on the reference platform end, and compare the first reference result with the test result to obtain the first verification result corresponding to the GPU to be verified.
[0135] In the embodiments of the present disclosure, the platform may also be referred to as a computing platform, which may represent a set of hardware and software environments for performing computing tasks. The designated platform end and the reference platform end are two ends in the GPU verification system, which are different computing platforms. The computing platform may include a series of components and services that work together to support the operation of applications and the computing needs of users.
[0136] The key parts of any computing platform may include, but are not limited to: hardware components, operating systems, system software, application software, development environments, network support, security mechanisms, and user interfaces. Hardware components may include CPU (Central Processing Unit), GPU, memory, storage devices (such as hard disks, solid-state drives), input / output devices (such as keyboards, mice, monitors), and network interfaces. The operating system is the interface between hardware and application software. The operating system is responsible for managing system resources, controlling program execution, and processing file and data access. System software may include device drivers, diagnostic tools, server software, window systems, etc., which support the operation of operating systems and applications. Application software may represent various applications running on the computing platform, which provide users with specific functions and services, such as office software, database management systems, web browsers, etc. The development environment may include programming languages, compilers, debuggers, integrated development environments (IDEs), etc. These tools support developers to create and test software on the platform. Network support can provide network connection capabilities, allowing the computing platform to access a local area network, a wide area network, or the Internet to achieve data transmission and remote access. Security mechanisms may include firewalls, encryption technology, security protocols, etc., to protect the computing platform from unauthorized access and various security threats. The user interface may provide a way for users to interact with the computing platform, including a graphical user interface (GUI), a command line interface (CLI), or other forms of interactive interface.
[0137] In the embodiment of the present disclosure, the designated platform side may be configured with a GPU to be verified.
[0138] In a possible implementation, the designated platform is configured with a designated CPU and a designated operating system. The designated CPU and the designated operating system may be developed for a target market or a specific application scenario. The hardware and software configuration of the designated platform may be more inclined to cost-effectiveness, energy efficiency or optimization of a specific application rather than pure performance indicators.
[0139] By adopting this implementation method, the compatibility between the GPU to be verified and the CPU of a specified model and the specified operating system can be verified.
[0140] In the disclosed embodiment, the reference platform side can be a high-performance benchmark system used to run the same test case and provide comparable performance data (such as a first reference result, a second reference result, etc.). Compared with the specified platform side, the reference platform side can be configured with a CPU with better performance, which means that the reference platform side can provide faster processing speed and higher computing throughput. The operating system carried by the reference platform side can also be more advanced, providing better system stability, faster response time and optimized system calls, thereby providing a more consistent and reliable operating environment. In addition to the CPU and operating system, the reference platform side can also have a more efficient memory architecture, a faster storage solution and more advanced network communication capabilities, all of which can provide strong support for GPU verification.
[0141] In the disclosed embodiment, the test cases to be run can be specified by the user, or the test framework can automatically generate or manage the test cases to be run. In a possible implementation, the designated platform can pull the code of the test case from the test case warehouse and compile it according to the identification information of the test case to be run.
[0142] In GPU verification, multiple test cases can be run sequentially to perform more comprehensive verification of the GPU to be verified.
[0143] In the embodiment of the present disclosure, the test case is run on the designated platform side, and the test case executes the test task in the test case based on the GPU to be verified on the designated platform side, and obtains the test result of the test case on the designated platform side. When the test case is run on the designated platform side, the test case will call the API provided by the GPU to be verified to execute the test task in the test case, so the embodiment of the present disclosure can implement interface-level compatibility verification for the GPU.
[0144] Among them, before the designated platform side executes the test tasks in the test case based on the GPU to be verified, preparatory work such as initializing the GPU to be verified, allocating memory resources for the test tasks in the test case, setting the execution environment, and preparing input data can be performed.
[0145] In a possible implementation, before executing the test task in the test case based on the GPU to be verified, the GPU to be verified may be initialized, for example, the operating mode of the GPU to be verified may be set, registers may be configured, and the like.
[0146] In a possible implementation, before executing the test task in the test case based on the GPU to be verified, memory resources can be allocated for the test task in the test case. When executing the test task in the test case based on the GPU to be verified, memory space is required to store data and intermediate results, so GPU memory (i.e., video memory) needs to be allocated for the test task.
[0147] In a possible implementation, before executing the test task in the test case based on the GPU to be verified, an execution environment may be set. In this implementation, a rendering target, a shader program, a pipeline state object, etc. may be set according to the needs of the test task in the test case.
[0148] In a possible implementation, before executing the test task in the test case based on the GPU to be verified, input data may be prepared. In this implementation, the input data required for the test task may be transmitted to the GPU to be verified, and the input data may include vertex data, texture, constant buffer data, etc.
[0149] In an embodiment of the present disclosure, after obtaining the test result of the test case on the specified platform end, the specified platform end may send the test related data of the specified platform end to the reference platform end, wherein the test related data includes at least the information of the test case and the test result.
[0150] In a possible implementation, the information of the test case may include identification information of the test case. The identification information of the test case may be information that can be used to uniquely identify the test case. For example, the identification information of the test case may be the name or number of the test case.
[0151] In another possible implementation, the information of the test case may include the code of the test case. In this implementation, the designated platform end may directly transmit the code of the test case to the reference platform end.
[0152] In a possible implementation, the information of the test case may further include test parameters corresponding to the test case, wherein the test parameters may provide necessary input data, configuration options or environment settings for the test case to ensure that the test case can be executed under specific conditions.
[0153] In a possible implementation, the designated platform end is specifically used to send the test-related data to the reference platform end in a non-blocking manner.
[0154] In this implementation, after the designated platform completes the execution of each test case and collects the necessary test results, it can use a non-blocking communication method to send the test-related data to the reference platform. That is, the designated platform will not wait for the processing results of the reference platform after sending the test-related data, but can continue to execute the next test case. This method allows the test process to be parallelized, significantly improving the efficiency of the test.
[0155] Among them, non-blocking communication can be achieved through asynchronous programming, in which the specified platform side can use events, callback functions, or multithreading to handle data sending without waiting for each response. For example, Python's asyncio library and FastAPI framework can be used to create asynchronous network requests to achieve efficient data transmission.
[0156] In this implementation, since the designated platform does not need to wait for the verification results of each test case, it can continuously execute new test cases, thereby speeding up the entire test process. In addition, this implementation reduces the delay caused by waiting for network response or data processing, making the test execution faster.
[0157] In a possible implementation, the designated platform end is specifically used to: create a subprocess for processing a data sending task; and send the test-related data to the reference platform end through the subprocess. The data sending task may include a test-related data sending task.
[0158] In this implementation, after the designated platform completes the execution of a test case and collects the test results, it can create a subprocess to send the test-related data to the reference platform. Since the task of sending the test-related data is completed by the subprocess, the main process (e.g., the test execution process) will not be blocked, so it can immediately continue to execute the next test case.
[0159] This implementation allows the main process to continue executing subsequent test cases while the subprocess is processing the task of sending test-related data, thereby significantly reducing waiting time and improving test throughput. In addition, the independence of the subprocess ensures that even if problems are encountered during the transmission of test-related data, the stability of the main process will not be affected, thereby improving the scalability and reliability of the entire test system.
[0160] In a possible implementation, the designated platform end is specifically used to: in response to the environment variable of the designated platform end being in synchronization mode, send the test-related data to the reference platform end through the subprocess.
[0161] In this implementation, the designated platform side can determine the processing method of the test-related data according to the value of the environment variable. In this implementation, when the environment variable of the designated platform side is in synchronization mode, the designated platform side can directly send the test-related data to the reference platform side. After receiving the test-related data, the reference platform side can process it immediately.
[0162] In one example, test-related data can be sent to the reference platform based on an asynchronous non-blocking request using Python FastAPI. For example, an asynchronous non-blocking request can be:
[0163]
[0164] Among them, FastAPI is a modern, fast (high-performance) web framework for building APIs. FastAPI can support asynchronous request processing based on Python 3.6+ type hints. app.get(" / rev / {case_id}") is a decorator that defines a route for an HTTP GET request. When a client requests the / rev / {case_id} path, the subsequent function is triggered to execute. {case_id} is a path parameter, indicating that each request will contain a unique case ID. async def exec(case_id:int): is an asynchronous route processing function defined in FastAPI. The async def keyword indicates that this is an asynchronous function that can perform asynchronous operations. case_id is a parameter that represents the case ID passed to the function. The await keyword is used to wait for the asynchronous function exec_pytest(case_id) to complete. This means that when the exec_pytest function is executed, control is returned to the event loop, allowing other tasks to be performed until exec_pytest is completed. return 0 means that the function returns a value, which is usually used to indicate a successful operation or a specific status code. In the context of an HTTP request, a return of 0 may mean that the request has been accepted and is being processed.
[0165] In a possible implementation, the designated platform end is specifically used to: store the test-related data in a designated storage system; and the reference platform end is further used to: obtain the test-related data from the designated storage system.
[0166] In this implementation, when the designated platform needs to send test-related data corresponding to multiple test cases to the reference platform, or when the processing capacity of the reference platform is insufficient, the test-related data can be transferred through the designated storage system.
[0167] In one example, the designated storage system may be Redis (Remote Dictionary Server), which is an open source, high-performance key-value pair database that can be used as a data structure server.
[0168] In this implementation, the designated storage system may be any storage system that can be used to transfer the test-related data. For example, the designated storage system may also be a database system, a message queue, an object storage service, and the like. For example, the database system may be a relational database (such as MySQL, PostgreSQL) or a non-relational database (such as MongoDB, Cassandra). The message queue may be RabbitMQ, Apache Kafka, and the like. The message queue may be used to process asynchronous data transmission and may pass messages between the designated platform end and the reference platform end. The object storage service may be Amazon S3, Google Cloud Storage, and the like.
[0169] In this implementation, test-related data is allowed to be transmitted asynchronously between the designated platform end and the reference platform end, which provides flexibility in processing large amounts of test data and can serve as a buffering mechanism when the reference platform end is heavily loaded or unavailable. In this implementation, by using a storage system as an intermediary, the sending and processing of test-related data are decoupled, allowing the two platform ends to operate independently, thereby improving the robustness of the system. In addition, the storage system can be expanded as needed to accommodate the storage and retrieval of large amounts of data, providing the ability to handle peak loads. When the number of test cases increases or the processing capacity of the reference platform end is limited, the storage system provides additional buffering and processing time to ensure the stable operation of the system. Furthermore, this implementation allows the designated platform end to release resources immediately after the test-related data is sent, while the reference platform end can process data when resources are available, thereby improving the efficiency of resource use.
[0170] In a possible implementation, the designated platform end is specifically used to: in response to an environment variable of the designated platform end being in an asynchronous mode, store the test-related data in a designated storage system.
[0171] In this implementation, the designated platform can determine how to process the test-related data by checking the setting of the environment variable. If the environment variable is set to "asynchronous mode", the designated platform will not immediately send the test-related data to the reference platform, but will store the test-related data in a pre-configured storage system.
[0172] The setting of environment variables provides the system with a high degree of flexibility and control, so that the processing of test-related data can be adjusted according to different test scenarios or conditions. For example, when the network conditions are unstable or the reference platform is currently unavailable, the test-related data can be stored first, and then sent or further processed when conditions permit.
[0173] In a possible implementation, the designated platform end is specifically used to: serialize the test-related data to obtain serialized data corresponding to the test-related data; send the serialized data to the reference platform end; the reference platform end is specifically used to: deserialize the serialized data to obtain the test-related data.
[0174] In this implementation, serialization may refer to the process of converting a data structure or object state into a storable or transmittable format (such as a binary format). In this implementation, the designated platform end may convert the test-related data into serialized data, for example, the data structure of the test-related data may be converted into a byte stream or other format to facilitate transmission over a network or other transmission medium.
[0175] After serialized data is generated, it can be sent to the reference platform. On the reference platform, the received serialized data can be converted back to the original data structure or object state through the deserialization process. Deserialization is the reverse process of serialization, which involves reconstructing the serialized data stream into a readable and usable data format.
[0176] In this implementation, serialization can reduce the size of data, thereby improving the efficiency of data transmission, especially in network transmission. In addition, serialization ensures that the data maintains the consistency of its structure and content during transmission, reducing the risk of data corruption or loss. Furthermore, serialized data does not depend on a specific platform or programming language, allowing data to be transmitted and used in different systems and environments.
[0177] In a possible implementation, the reference platform end is further used to: in response to an environment variable of the reference platform end being in assertion mode, monitor the test-related data from the designated platform end.
[0178] In this implementation, the reference platform can check its own environment variable settings. If the environment variable is configured as "assertion mode", the reference platform can enter a special listening state, waiting to receive test-related data sent by the specified platform.
[0179] As an example of this implementation, in "assertion mode", the reference platform can perform the following operations:
[0180] Monitor data: continuously monitor data streams or data transmission requests from the specified platform end;
[0181] Receive data: Once data transmission is detected, the reference platform will receive the test-related data sent by the specified platform;
[0182] Processing data: The reference platform can further process the test-related data.
[0183] In this implementation, the reference platform can respond to and receive test-related data in real time through the monitoring mechanism, which speeds up the processing of test-related data. The setting of environment variables provides a flexible way to control the behavior of the reference platform and adjust its working mode according to different test requirements. In "assertion mode", the reference platform can automatically process the received test-related data, reducing manual intervention and improving the automation of the test process.
[0184] In the embodiment of the present disclosure, the reference platform can determine the test case to be run according to the test-related data. In a possible implementation, the reference platform can pull the code of the test case from the test case warehouse and compile it.
[0185] The reference platform side can obtain the test result from the test-related data, run the test case, obtain a first reference result of the test case on the reference platform side, and compare the first reference result with the test result to obtain a first verification result corresponding to the GPU to be verified.
[0186] In a possible implementation, the reference platform end is specifically used to: execute the test task in the test case based on the CPU of the reference platform end through the test case to obtain a first reference result of the test case on the reference platform end.
[0187] In this implementation, when the test case is mainly used to test the general computing API provided by the GPU to be verified, on the reference platform side, the test case can execute the test task in the test case based on the CPU of the reference platform side. By executing the test case on the CPU of the reference platform side, a first reference result of the test case can be obtained. This result reflects the performance level that the GPU to be verified should achieve under ideal or standard conditions.
[0188] This implementation provides a stable and reliable benchmark for the performance evaluation of the GPU to be verified by comparing the test results of the GPU to be verified on the specified platform with the first reference result on the reference platform CPU, and can effectively evaluate whether the performance of the GPU to be verified meets the standard.
[0189] In one possible implementation, the designated platform end is further used to: in response to completion of the test of the GPU to be verified, send a test end message to the reference platform end; the reference platform end is further used to: in response to the test end message, generate a verification report corresponding to the GPU to be verified based on at least the first verification result.
[0190] As an example of this implementation, in response to all test cases corresponding to the GPU to be verified having been run on the designated platform end, it can be determined that the test of the GPU to be verified on the designated platform end is completed.
[0191] In this implementation, the designated platform side may send a test end message to the reference platform side in response to the completion of the GPU test to be verified. The test end message may be a specific signal or flag. The test end message may be used to notify the reference platform side that the test process of the designated platform side has ended.
[0192] After the reference platform receives the test completion message from the designated platform, it can recognize that the test process of the designated platform has been completed. In response to the test completion message, the reference platform can generate a verification report corresponding to the GPU to be verified based on the verification results corresponding to each test case (for example, including the first verification result). The verification report can include the pass / fail status of each test case, the performance indicators of the GPU to be verified, the problems found, etc.
[0193] In this implementation, the verification report corresponding to the GPU to be verified is automatically generated by the reference platform, which can provide strong support for the subsequent research and development of the GPU.
[0194] In one possible implementation, the reference platform end is also configured with the GPU to be verified; the reference platform end is also used to: in response to the first verification result indicating that the difference between the first reference result and the test result exceeds a preset error range, re-run the test case, execute the test task in the test case based on the GPU to be verified through the test case, obtain a second reference result of the test case on the reference platform end, and compare the second reference result with the test result to obtain a second verification result corresponding to the GPU to be verified.
[0195] As an example of this implementation, in response to the difference between the first reference result and the test result exceeding a preset error range, the test case may be marked as an error case or a failure case.
[0196] In this implementation, when the difference between the first reference result and the test result exceeds a preset error range, the test case can be rerun on the reference platform side, and the test task in the test case can be executed based on the GPU to be verified on the reference platform side to obtain a second reference result of the test case on the reference platform side. By comparing the second reference result with the test result, it can be determined whether the error is caused by the incompatibility of the GPU to be verified with the specified platform side or by a problem with the GPU to be verified itself.
[0197] In a possible implementation, the reference platform is further configured to: in response to the first verification result indicating that the difference between the first reference result and the test result exceeds the preset error range, modify the environment variables of the reference platform to a default mode.
[0198] For example, you can set export mode=default to set the environment variable to the default mode.
[0199] In this implementation, the default mode may also be referred to as a default working mode, etc., which is not limited here. The default mode may be a more general test execution mode, which is used to run test cases normally without performing special assertion checks.
[0200] In one possible implementation, you can run the pytest testing framework and execute test cases based on pytest. During the execution of test cases, pytest can generate log information to record the test execution process, results, and any assertion errors or exceptions that occurred. After the test is completed, developers can analyze these logs to determine the reason why the test failed. The logs can contain error messages, stack traces, the order in which test cases were executed, failed assertions, and other information.
[0201] Figure 2 FIG. 1 is a schematic diagram showing a GPU verification solution in the related art. Figure 2 As shown, in the related art, when GPU verification is performed, the operation is mainly divided into three steps: after running the test case on the reference platform, data is dumped to generate a dump file; the dump file is copied from the reference platform to the specified platform; the test case is run on the specified platform, and the test result is compared with the dump file. In the related art, if a bug (defect) occurs or the test code on the reference platform or the code of the test object is changed, the above three steps need to be re-executed.
[0202] Figure 3 A schematic diagram of a GPU verification solution provided by an embodiment of the present disclosure is shown. Figure 3 As shown, in the embodiment of the present disclosure, after the test case is run on the designated platform side, the test-related data is sent to the reference platform side. The reference platform side runs the same test case, compares the results, and generates a verification report. If a bug (defect) occurs or the test code of the reference platform side or the code of the test object is changed, it is necessary to update the reference platform side and retest.
[0203] In related technologies, it is often necessary to modify the code logic of the originally developed test cases to adapt to the testing requirements of different platforms, which not only increases the workload, but also may affect the stability and maintainability of the code of the existing test cases.
[0204] In the disclosed embodiment, the strategy of incremental update and dependency injection can be adopted to effectively avoid modifying the original test case code logic. This method allows the test case to adapt to the testing requirements of different platforms by expanding or inserting new functional modules without changing the original logic. Since only the incremental part is operated, the stability and maintainability of the original test case are maintained, while the errors that may be introduced due to the modification are reduced, and the reusability and development efficiency of the test case are improved. In addition, through base class abstraction, code duplication is further reduced, the maintenance of the test case is simplified, and the entire verification process is more efficient and reliable.
[0205] Figure 4 Another schematic diagram of the GPU verification solution provided by the embodiment of the present disclosure is shown. Figure 4 As shown, testers can start remote testing.
[0206] The designated platform end can run the test case. After any test case is run, the designated platform end can send the name of the test case and the test result of the test case on the designated platform end to the reference platform end. In addition, the designated platform end can immediately run the next test case.
[0207] The reference platform can run the pytest test framework, call the test case review API through the pytest test framework, run the test case by calling the test case review API, and obtain the first reference result of the test case on the reference platform. The test case review API can compare the first reference result with the test result to obtain the first verification result corresponding to the GPU to be verified.
[0208] The designated platform end may also send a test end message to the reference platform end in response to all test cases corresponding to the GPU to be verified having been run on the designated platform end. The reference platform end may generate a verification report corresponding to the GPU to be verified in response to the test end message. In addition, the designated platform end may also display information on the end of the test.
[0209] The GPU verification system provided by the embodiments of the present disclosure can be applied to technical fields such as software engineering, software testing, and interface testing, which are not limited here.
[0210] Figure 5A flow chart of the GPU verification method provided by an embodiment of the present disclosure is shown. In one possible implementation, the execution subject of the GPU verification method may be a GPU verification device. For example, the GPU verification method may be executed by a terminal device or a server or other electronic device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device or a wearable device, etc. In some possible implementations, the GPU verification method may be implemented by a processor calling computer-readable instructions stored in a memory. The GPU verification method is applied to a specified platform end, and the specified platform end is configured with a GPU to be verified. As Figure 5 As shown, the GPU verification method includes steps S51 to S53.
[0211] In step S51, the test case is run.
[0212] In step S52, the test case executes the test task in the test case based on the GPU to be verified, so as to obtain the test result of the test case on the designated platform end.
[0213] In step S53, the test related data of the designated platform end is sent to the reference platform end, so as to obtain the first verification result corresponding to the GPU to be verified through the reference platform end based on the test related data, wherein the test related data at least includes the information of the test case and the test result.
[0214] In a possible implementation, the sending the test-related data of the designated platform end to the reference platform end includes:
[0215] The test related data is sent to the reference platform end in a non-blocking manner.
[0216] In a possible implementation, sending the test-related data to the reference platform in a non-blocking manner includes:
[0217] Create a subprocess to handle data sending tasks;
[0218] The test related data is sent to the reference platform end through the sub-process.
[0219] In a possible implementation, sending the test-related data to the reference platform end through the subprocess includes:
[0220] In response to the environment variable of the designated platform end being in synchronization mode, the test-related data is sent to the reference platform end through the subprocess.
[0221] In a possible implementation, sending the test-related data to the reference platform in a non-blocking manner includes:
[0222] The test-related data is stored in a designated storage system.
[0223] In a possible implementation, storing the test-related data in a designated storage system includes:
[0224] In response to the environment variable of the designated platform end being in asynchronous mode, the test-related data is stored in a designated storage system.
[0225] In a possible implementation, the sending the test-related data of the designated platform end to the reference platform end includes:
[0226] Serializing the test-related data to obtain serialized data corresponding to the test-related data;
[0227] The serialized data is sent to the reference platform end.
[0228] In a possible implementation, the method further includes:
[0229] In response to the completion of the GPU test to be verified, a test end message is sent to the reference platform end.
[0230] In a possible implementation, the designated platform end is configured with a CPU of a designated model and is equipped with a designated operating system.
[0231] Figure 6 Another flow chart of the GPU verification method provided by an embodiment of the present disclosure is shown. In one possible implementation, the execution subject of the GPU verification method may be a GPU verification device. For example, the GPU verification method may be executed by a terminal device or a server or other electronic device. The terminal device may be a user device, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant, a handheld device, a computing device, a vehicle-mounted device or a wearable device. In some possible implementations, the GPU verification method may be implemented by a processor calling computer-readable instructions stored in a memory. The GPU verification method is applied to a reference platform such as Figure 6 As shown, the GPU verification method includes steps S61 to S64.
[0232] In step S61, test related data of the designated platform is obtained.
[0233] In step S62, a test case is determined according to the test-related data, and a test result of the test case on the designated platform end is obtained from the test-related data.
[0234] In step S63, the test case is run to obtain a first reference result of the test case on the reference platform.
[0235] In step S64, the first reference result and the test result are compared to obtain a first verification result corresponding to the GPU to be verified.
[0236] In a possible implementation, the method further includes:
[0237] In response to the environment variable of the reference platform being in assertion mode, monitoring the test-related data from the designated platform.
[0238] In a possible implementation, the running the test case to obtain a first reference result of the test case on the reference platform includes:
[0239] The test case executes the test task in the test case based on the CPU of the reference platform end, so as to obtain the first reference result of the test case on the reference platform end.
[0240] In a possible implementation, the reference platform is also configured with the GPU to be verified;
[0241] The method also includes: in response to the first verification result indicating that the difference between the first reference result and the test result exceeds a preset error range, re-running the test case, executing the test task in the test case based on the GPU to be verified through the test case, obtaining a second reference result of the test case on the reference platform side, and comparing the second reference result with the test result to obtain a second verification result corresponding to the GPU to be verified.
[0242] In a possible implementation, the method further includes:
[0243] In response to the first verification result indicating that the difference between the first reference result and the test result exceeds the preset error range, the environmental variables of the reference platform are modified to a default mode.
[0244] In a possible implementation, the acquiring of the test-related data on the designated platform includes: deserializing the serialized data to obtain the test-related data.
[0245] In a possible implementation, the method further includes:
[0246] In response to the test end message, a verification report corresponding to the GPU to be verified is generated at least according to the first verification result.
[0247] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0248] In addition, the present disclosure also provides a GPU verification device, an electronic device, a computer-readable storage medium, and a computer program product, all of which can be used to implement any GPU verification method provided by the present disclosure. The corresponding technical solutions and technical effects can be found in the corresponding records in the method part and will not be repeated here.
[0249] Figure 7 A block diagram of a GPU verification device provided by an embodiment of the present disclosure is shown. The GPU verification device is applied to a designated platform end, and the designated platform end is configured with a GPU to be verified. Figure 7 As shown, the GPU verification device includes:
[0250] A first running module 71, used for running a test case;
[0251] A testing module 72 is used to execute the test task in the test case based on the GPU to be verified through the test case to obtain the test result of the test case on the specified platform end;
[0252] The first sending module 73 is used to send the test related data of the specified platform end to the reference platform end, so as to obtain the first verification result corresponding to the GPU to be verified based on the test related data through the reference platform end, wherein the test related data at least includes the information of the test case and the test result.
[0253] In a possible implementation, the first sending module 73 is used to:
[0254] The test related data is sent to the reference platform end in a non-blocking manner.
[0255] In a possible implementation, the first sending module 73 is used to:
[0256] Create a subprocess to handle data sending tasks;
[0257] The test related data is sent to the reference platform end through the sub-process.
[0258] In a possible implementation, the first sending module 73 is used to:
[0259] In response to the environment variable of the designated platform end being in synchronization mode, the test-related data is sent to the reference platform end through the subprocess.
[0260] In a possible implementation, the first sending module 73 is used to:
[0261] The test-related data is stored in a designated storage system.
[0262] In a possible implementation, the first sending module 73 is used to:
[0263] In response to the environment variable of the designated platform end being in asynchronous mode, the test-related data is stored in a designated storage system.
[0264] In a possible implementation, the first sending module 73 is used to:
[0265] Serializing the test-related data to obtain serialized data corresponding to the test-related data;
[0266] The serialized data is sent to the reference platform end.
[0267] In a possible implementation manner, the device further includes:
[0268] The second sending module is used to send a test end message to the reference platform end in response to the completion of the GPU test to be verified.
[0269] In a possible implementation, the designated platform end is configured with a CPU of a designated model and is equipped with a designated operating system.
[0270] Figure 8 Another block diagram of the GPU verification device provided by the embodiment of the present disclosure is shown. The GPU verification device is applied to the reference platform end. Figure 8 As shown, the GPU verification device includes:
[0271] The acquisition module 81 is used to acquire the test related data of the specified platform end;
[0272] A determination module 82, configured to determine a test case according to the test-related data, and obtain a test result of the test case on the designated platform end from the test-related data;
[0273] A second running module 83 is used to run the test case to obtain a first reference result of the test case on the reference platform end;
[0274] The comparison module 84 is used to compare the first reference result with the test result to obtain a first verification result corresponding to the GPU to be verified.
[0275] In a possible implementation manner, the device further includes:
[0276] The monitoring module is used to monitor the test related data from the designated platform end in response to the environment variable of the reference platform end being in assertion mode.
[0277] In a possible implementation, the second operation module 83 is used to:
[0278] The test case executes the test task in the test case based on the CPU of the reference platform end, so as to obtain the first reference result of the test case on the reference platform end.
[0279] In a possible implementation, the reference platform is also configured with the GPU to be verified;
[0280] The device also includes: a third running module, which is used to re-run the test case in response to the first verification result indicating that the difference between the first reference result and the test result exceeds a preset error range, and execute the test task in the test case based on the GPU to be verified through the test case to obtain a second reference result of the test case on the reference platform end, and compare the second reference result with the test result to obtain a second verification result corresponding to the GPU to be verified.
[0281] In a possible implementation manner, the device further includes:
[0282] A modification module is used to modify the environment variable of the reference platform end to a default mode in response to the first verification result indicating that the difference between the first reference result and the test result exceeds the preset error range.
[0283] In a possible implementation, the acquisition module 81 is used to: deserialize the serialized data to obtain the test-related data.
[0284] In a possible implementation manner, the device further includes:
[0285] A generating module is used to generate a verification report corresponding to the GPU to be verified in response to the test end message at least according to the first verification result.
[0286] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. Its specific implementation and technical effects can refer to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.
[0287] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium.
[0288] The embodiment of the present disclosure further provides a computer program, including a computer-readable code. When the computer-readable code is executed in an electronic device, a processor in the electronic device executes the above method.
[0289] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0290] An embodiment of the present disclosure also provides an electronic device, comprising: one or more processors; and a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0291] The electronic device may be provided as a terminal, a server, or a device in other forms.
[0292] Fig. 9 1 is a block diagram of an electronic device 1900 provided in an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal. Fig. 9 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0293] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (MacOS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open source Unix-like operating system (FreeBSD TM ) or similar.
[0294] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0295] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0296] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0297] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0298] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via 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., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0299] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0300] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0301] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0302] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0303] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0304] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0305] If the technical solution of the embodiments of the present disclosure involves personal information, the product using the technical solution of the embodiments of the present disclosure has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of the embodiments of the present disclosure involves sensitive personal information, the product using the technical solution of the embodiments of the present disclosure has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the requirement of "explicit consent". For example, at the personal information collection device such as the camera, a clear and obvious sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to collect his or her personal information; or on the device for processing personal information, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0306] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A GPU verification system, characterized in that: The system includes a designated platform end and a reference platform end, wherein the designated platform end is configured with a GPU to be verified; The designated platform end is used to run the test case, execute the test task in the test case based on the GPU to be verified through the test case, obtain the test result of the test case on the designated platform end, and send the test related data of the designated platform end to the reference platform end, wherein the test related data at least includes the information of the test case and the test result; The reference platform end is used to determine the test case according to the test-related data, obtain the test result from the test-related data, run the test case, obtain a first reference result of the test case on the reference platform end, and compare the first reference result with the test result to obtain a first verification result corresponding to the GPU to be verified.
2. The system according to claim 1, characterized in that The designated platform end is specifically used for: The test related data is sent to the reference platform end in a non-blocking manner.
3. The system according to claim 2, characterized in that The designated platform end is specifically used for: Create a subprocess to handle data sending tasks; The test related data is sent to the reference platform end through the sub-process.
4. The system according to claim 3, characterized in that The designated platform end is specifically used for: In response to the environment variable of the designated platform end being in synchronization mode, the test-related data is sent to the reference platform end through the subprocess.
5. The system according to claim 2, characterized in that The designated platform end is specifically used to: store the test-related data in a designated storage system; The reference platform end is also used to: obtain the test related data from the designated storage system.
6. The system according to claim 5, characterized in that The designated platform end is specifically used for: In response to the environment variable of the designated platform end being in asynchronous mode, the test-related data is stored in a designated storage system.
7. The system according to any one of claims 1 to 4, characterized in that: The reference platform is also used for: In response to the environment variable of the reference platform being in assertion mode, monitoring the test-related data from the designated platform.
8. The system according to any one of claims 1 to 4, characterized in that: The reference platform is specifically used for: The test case executes the test task in the test case based on the CPU of the reference platform end, so as to obtain the first reference result of the test case on the reference platform end.
9. The system according to claim 8, characterized in that The reference platform is also configured with the GPU to be verified; The reference platform end is also used for: in response to the first verification result indicating that the difference between the first reference result and the test result exceeds a preset error range, re-running the test case, executing the test task in the test case based on the GPU to be verified through the test case, obtaining a second reference result of the test case on the reference platform end, and comparing the second reference result with the test result to obtain a second verification result corresponding to the GPU to be verified.
10. The system according to claim 9, characterized in that The reference platform is also used for: In response to the first verification result indicating that the difference between the first reference result and the test result exceeds the preset error range, the environmental variables of the reference platform are modified to a default mode.
11. The system according to any one of claims 1 to 4, characterized in that: The designated platform end is specifically used for: serializing the test-related data to obtain serialized data corresponding to the test-related data; and sending the serialized data to the reference platform end; The reference platform end is specifically used to: deserialize the serialized data to obtain the test related data.
12. The system according to any one of claims 1 to 4, characterized in that: The designated platform end is further used for: in response to completion of the to-be-verified GPU test, sending a test end message to the reference platform end; The reference platform end is further used to: in response to the test end message, generate a verification report corresponding to the GPU to be verified at least according to the first verification result.
13. The system according to any one of claims 1 to 4, characterized in that: The designated platform end is configured with a designated model of CPU and is equipped with a designated operating system.
14. A GPU verification method, characterized in that: The method is applied to a designated platform end, the designated platform end is configured with a GPU to be verified, and the method includes: Run the test cases; Executing the test task in the test case based on the GPU to be verified by the test case to obtain the test result of the test case on the specified platform end; Send the test related data of the designated platform end to the reference platform end, so as to obtain a first verification result corresponding to the GPU to be verified through the reference platform end based on the test related data, wherein the test related data at least includes information of the test case and the test result.
15. A GPU verification method, characterized in that: The method is applied to a reference platform, and the method includes: Get test-related data on the specified platform; Determine a test case according to the test-related data, and obtain a test result of the test case on the designated platform end from the test-related data; Running the test case to obtain a first reference result of the test case on the reference platform end; The first reference result and the test result are compared to obtain a first verification result corresponding to the GPU to be verified.
16. A GPU verification device, characterized in that: The device is applied to a designated platform end, the designated platform end is configured with a GPU to be verified, and the device includes: The first running module is used to run the test case; A testing module, configured to execute the test task in the test case based on the GPU to be verified through the test case, and obtain the test result of the test case on the specified platform end; The first sending module is used to send the test related data of the specified platform end to the reference platform end, so as to obtain the first verification result corresponding to the GPU to be verified based on the test related data through the reference platform end, wherein the test related data at least includes the information of the test case and the test result.
17. A GPU verification device, characterized in that: The device is applied to a reference platform end, and the device comprises: The acquisition module is used to obtain test-related data from the specified platform; A determination module, configured to determine a test case according to the test-related data, and obtain a test result of the test case on the designated platform end from the test-related data; A second running module is used to run the test case to obtain a first reference result of the test case on the reference platform end; The comparison module is used to compare the first reference result and the test result to obtain a first verification result corresponding to the GPU to be verified.
18. An electronic device, characterized in that: include: one or more processors; a memory for storing executable instructions; The one or more processors are configured to call the executable instructions stored in the memory to execute the method of claim 14 or 15.
19. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to claim 14 or 15 is implemented.
20. A computer program product comprising computer readable code, or a non-volatile computer readable storage medium carrying computer readable code, characterized in that: When the computer readable code is executed in an electronic device, a processor in the electronic device executes the method of claim 14 or 15.
Citation Information
Patent Citations
Multi-mode GPU joint simulation system
CN115496034A
Joint simulation system for GPU IP verification
CN115686655A
Test method and device
CN117271335A
Communication test method and electronic equipment
CN117376225A
Processor function verification method and device and medium
CN117827563A
Cited By
Graphic processor testing method and device and storage medium
CN122387766A
A method, system, electronic device, and storage medium for testing and verifying computing libraries based on GPU architecture.
CN122673038A