Device testing method, device and storage medium

By installing the test application on the electronic device, traversing the available frequency points of the GPU and comparing the image processing results, the problem of failing to effectively test the GPU in the existing technology is solved, achieving higher device quality and reducing the repair rate.

CN117707862BActive Publication Date: 2024-10-29HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310612728.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2024-10-29
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

Existing technology fails to effectively test graphics processing units (GPUs) during the production process of electronic equipment, making it difficult to intercept potential defects, leading to increased equipment failure and repair rates.

Method used

Provide a device testing method that installs a test application on an electronic device, responds to user operations, controls the GPU to perform test tasks, traverses its available frequency points, compares image processing results with expected results, determines the test results, and ensures that the GPU performs at different frequency points normal operation.

Benefits of technology

It is possible to intercept potentially defective GPUs in the production process, improve the factory quality of equipment, reduce maintenance rates, and improve test efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707862B_ABST
    Figure CN117707862B_ABST
Patent Text Reader

Abstract

The present application provides a device testing method, device and storage medium, and relates to the field of terminal technology. The method includes: by acquiring relevant resources for the graphics processing unit GPU test and the available frequency point information of the GPU, triggering the GPU to execute a preset number of test tasks to obtain the preset number of test results, and determining whether the aging test is successful or failed according to the preset number of test results. If the aging test fails, the GPU of the device needs to be replaced. The GPU needs to traverse the available frequency points of the GPU to execute a test task to verify the processing effect of the GPU on the image data at each available frequency point. The above-mentioned test method realizes stress testing of the GPU in the device, can more accurately detect GPUs with potential defects, can improve the factory quality of the equipment, and reduce the maintenance rate of the equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a device testing method, device and storage medium. Background Art

[0002] At present, among the faulty electronic devices with display functions, some faults are related to the graphics processing unit (GPU), including, for example, the device preview image is normal, but the image becomes mosaic after shooting and saving, the shutdown interface is distorted, and the shooting preview interface has spots, etc. These faults are usually difficult to find in the early stage of device use. Therefore, it is very necessary to test the GPU during the equipment production process. Summary of the invention

[0003] The embodiments of the present application provide a device testing method, device, and storage medium to implement stress testing of a GPU in a device, intercept GPUs with potential defects in the production process, and improve the factory quality of the device.

[0004] In a first aspect, an embodiment of the present application provides a device testing method, which is applied to an electronic device, wherein the electronic device includes a graphics processor and a test application is installed in the electronic device, and the method includes:

[0005] In response to an operation of turning on a test switch in the test application, controlling the graphics processor to execute at least one test task;

[0006] Displaying the test result of the graphics processor according to the test result of at least one test task;

[0007] Control the GPU to execute each test task, including:

[0008] Control the graphics processor to perform at least one image processing task, and use different available frequencies when performing each image processing task; and determine the test result of this test task by comparing the image processing results of the graphics processor at different available frequencies with the expected processing results.

[0009] The operation of turning on the test switch in the test application may be a touch operation of the user on the test application interface, for example, Figure 5 As shown in (a), after the user turns on the GPU aging test switch, he clicks the control to start the test.

[0010] One test task of the graphics processor includes one or more image processing tasks. In one example, the number of available frequency points of the graphics processor is M times, M is a positive integer greater than 1, and one test task may include M image processing tasks.

[0011] The test result of the graphics processor includes a test success or a test failure. A test success indicates that the graphics processor functions normally, and a test failure indicates that the graphics processor functions abnormally.

[0012] In the above scheme, the user can control the graphics processor in the electronic device to perform one or more test tasks through the test application installed on the electronic device. Each test task includes an image processing task of the graphics processor at at least one available frequency point, which is used to verify whether there are potential defects when the graphics processor works at different available frequencies, thereby intercepting graphics processors with potential defects during the production process, improving the quality of equipment leaving the factory, and reducing the maintenance rate of equipment.

[0013] In an optional embodiment of the first aspect, the electronic device further includes a test service and a graphics processor driver, the test application includes a main task of device testing and a subtask of graphics processor testing; in response to an operation of turning on a test switch in the test application, controlling the graphics processor to execute at least one test task, including:

[0014] In response to an operation of turning on a test switch in the test application, the main task determines whether the test switch of the graphics processor is turned on;

[0015] If it is determined that the test switch of the graphics processor is turned on, the main task controls the creation of a subtask;

[0016] The subtask triggers the graphics processor driver to control the graphics processor to execute at least one test task by calling the test service.

[0017] The test service is located in the system library of the electronic device, and the graphics processor driver is located in the kernel layer of the electronic device.

[0018] In the above scheme, after determining that the user turns on the switch for GPU testing, the test application creates a subtask for performing an aging test on the GPU. The subtask triggers the GPU driver by calling the test service, controlling the GPU to perform one or more test tasks to verify whether the GPU has potential defects.

[0019] In an optional embodiment of the first aspect, before controlling the graphics processor to execute each test task, the method further includes: determining, by a subtask of the graphics processor test in the test application, whether the number of tests of the graphics processor reaches a preset number of tests N, where N is a positive integer;

[0020] Controlling the graphics processor to execute each test task includes: if the number of tests of the graphics processor does not reach the preset number of tests N, the subtask triggers the graphics processor driver to control the graphics processor to execute a test task by calling the test service.

[0021] The subtask of the GPU test stores a preset test number N, which can be customized by the user, such as Figure 5 as shown in (b).

[0022] In the above scheme, after the subtask of the graphics processor test is created, before each call to the test service, it is necessary to determine whether the number of currently executed test tasks has reached the preset test number. If the preset test number is reached, the test process is terminated. If the test number is not reached, the test task continues to be executed to control the number of aging tests on the graphics processor.

[0023] In an optional embodiment of the first aspect, displaying the test result of the graphics processor according to the test result of at least one test task includes:

[0024] The subtask of the graphics processor test in the test application determines the test result of the graphics processor according to the test results of the N test tasks;

[0025] The subtask sends the test result of the graphics processor to the main task of the device test in the test application;

[0026] The main Task Control displays the test results of the graphics processor.

[0027] In the above scheme, the subtask needs to execute the test task according to the preset number of times, and determine the aging test result of the graphics processor based on the test results of the preset number of test tasks. In this way, the complete test data can be retained to obtain the number of test successes and test failures, making the test data traceable.

[0028] In an optional embodiment of the first aspect, a subtask of testing a graphics processor in a test application determines a test result of the graphics processor according to test results of N test tasks, including:

[0029] If one of the test results of the N test tasks fails, the test result of the graphics processor is the first test result, and the first test result is used to indicate that the graphics processor is abnormal; or

[0030] If the test results of the N test tasks are all successful, the test result of the graphics processor is the second test result, and the second test result is used to indicate that the graphics processor is normal.

[0031] In the above scheme, if one of the preset number of test tasks fails, the GPU is determined to be abnormal, which can effectively intercept GPUs with potential defects and improve the quality of equipment before delivery.

[0032] In an optional embodiment of the first aspect, displaying the test result of the graphics processor according to the test result of at least one test task includes:

[0033] If the test result of the first test task is a test failure, the subtask of the graphics processor test in the test application ends the test process and sends the test result of the first test task to the main task of the device test;

[0034] The main task displays the first test result based on the test result of the first test task, where the first test result is used to indicate that the graphics processor is abnormal.

[0035] The first test task is a task in which a test failure occurs for the first time among at least one test task.

[0036] In the above scheme, before calling the test service each time, it is necessary to judge the test result of the first test task currently executed. If the test result of the first test task is a test failure, it is not necessary to consider whether the number of currently executed test tasks has reached the preset number of tests. The test process can be ended directly, the abnormal graphics processor can be intercepted, the test efficiency can be improved, and the equipment testing overhead can be saved.

[0037] In an optional embodiment of the first aspect, controlling a graphics processor to perform at least one image processing task includes:

[0038] The graphics processor driver obtains available frequency point information of the graphics processor, where the available frequency point information includes M available frequency points, where M is a positive integer greater than 1;

[0039] The graphics processor driver traverses M available frequency points, controls the graphics processor to perform image processing on the target image at at least one available frequency point, and obtains at least one image processing result.

[0040] In one example, the graphics processor driver obtains the available frequency point information of the graphics processor by calling the query interface of the graphics processor.

[0041] In the above scheme, the graphics processor driver controls the graphics processor to operate at a certain available frequency point (frequency locking) to obtain the image processing result of the graphics processor at the available frequency point. By locking the frequency point, the image processing results of the graphics processor at different available frequency points can be obtained.

[0042] In an optional embodiment of the first aspect, the device control method further includes: a graphics processor driver obtains test resources from a memory of the electronic device, the test resources including a target image, an expected processing result of the target image, an executable file of a graphics processor test, and a model file for the graphics processor to perform image processing;

[0043] The graphics processor driver controls the graphics processor to perform image processing on the target image at at least one available frequency point to obtain at least one image processing result, including:

[0044] The graphics processor driver runs the executable file, controls the graphics processor to call the image processing algorithm in the model file at at least one available frequency point, performs image processing on the target image, and obtains at least one image processing result.

[0045] In the above scheme, before the graphics processor driver controls the graphics processing to process the target image, it is necessary to obtain relevant resources for the graphics processor to execute the test task from the memory. The memory can be pre-set with image resources including the target image and the expected processing result of the target image, executable files, and resources such as the image processing algorithm of the graphics processor for controlling the execution of the test task of the graphics processor.

[0046] In an optional embodiment of the first aspect, controlling a graphics processor to perform at least one image processing task includes:

[0047] The graphics processor drives and controls the graphics processor to perform image processing on the target image at a first available frequency point to obtain a first image processing result; the first available frequency point is one of the M available frequency points;

[0048] If the first image processing result is inconsistent with the expected processing result, the graphics processor driver sends a test result indicating that the test task failed to the subtask of the graphics processor test, so as to end the test task.

[0049] In the above scheme, the graphics processor driver determines whether to continue traversing the available frequency points by comparing the image processing results with the expected processing results. If it is determined that the image processing results at a certain available frequency point are inconsistent with the expected processing results, the traversal will not continue. This can improve test efficiency and save equipment testing costs.

[0050] In an optional embodiment of the first aspect, controlling a graphics processor to perform at least one image processing task includes:

[0051] The graphics processor driver traverses M available frequency points of the graphics processor to control the graphics processor to perform M image processing tasks, and the M image processing tasks use the same target image;

[0052] Obtain image processing results of the graphics processor at M available frequency points.

[0053] In an optional embodiment of the first aspect, determining the test result of the test task by comparing the image processing result of the graphics processor at different available frequency points with the expected processing result includes:

[0054] If the image processing results at the M available frequency points are all consistent with the expected processing results, the test task is determined to be successful; or, if at least one image processing result among the image processing results at the M available frequency points is inconsistent with the expected processing result, the test task is determined to have failed.

[0055] Based on the above two optional embodiments, there are two possible implementation methods:

[0056] In one possible implementation, after the graphics processor driver obtains the image processing result at each available frequency point, it performs a result comparison. Regardless of whether the comparison result is consistent or inconsistent, it will continue to traverse the next available frequency point until all available frequency points are traversed.

[0057] In one possible implementation, after the graphics processor driver obtains the image processing results at all available frequency points, it uniformly compares the results to determine whether the test task succeeds or fails.

[0058] In the above scheme, the GPU driver will control the GPU to execute M image processing tasks to obtain M image results, and will not end the test task in advance. In this way, the complete test data can be retained to obtain the number of test successes and test failures, making the test data traceable.

[0059] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs any method as in the first aspect.

[0060] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

[0061] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes any method of the first aspect.

[0062] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute any method as described in the first aspect.

[0063] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0065] Figure 2 A software structure block diagram of an electronic device provided in an embodiment of the present application;

[0066] Figure 3 A schematic diagram of a device testing method provided in an embodiment of the present application;

[0067] Figure 4 A schematic diagram of a device testing method provided in an embodiment of the present application;

[0068] Figure 5 A schematic diagram of an interface of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0070] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0071] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.

[0072] First, the professional terms involved in the embodiments of the present application are briefly introduced.

[0073] RAW: An image format. RAW images are the raw data that a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor converts into digital signals using the captured light source signal.

[0074] Stress testing: refers to a testing method that simulates the real environment by designing various stress conditions to evaluate the reliability and performance of products or components.

[0075] In the processing of electronic equipment, due to the complex processing and the large-scale use of components and materials, both processing defects and component defects can be divided into obvious defects and potential defects. Obvious defects refer to those defects that cause the equipment to not work properly, such as short circuit and open circuit of the equipment. Potential defects refer to defects that can be used temporarily, but will be quickly exposed during use, causing the equipment to not work properly. Usually, potential defects cannot be discovered using conventional inspection methods. If components with potential defects are not detected, they will manifest themselves in the form of early failure or malfunction during equipment operation, resulting in an increase in the equipment return rate and maintenance costs.

[0076] Currently, there is no stress testing of the GPU in the electronic equipment during the production process, resulting in abnormal faulty GPU devices entering the market, increasing the product return rate and poor user experience.

[0077] In view of this, the embodiment of the present application proposes a device testing method, which adds a stress test on the GPU in the electronic device during the process of testing the basic functions of the electronic device, so as to intercept GPU-related faults. In the embodiment of the present application, the stress test on the GPU mainly refers to the aging test on the GPU, which checks the reliability of the GPU in the electronic device by running a preset aging test application on the electronic device. The potential defects of the GPU can be stimulated by applying stress, so that the early failures of the GPU are exposed in advance, so as to reduce the defect ratio of the device and improve the quality of the equipment shipped.

[0078] The device testing method provided in the embodiment of the present application can be applied to any electronic device with a display function, and the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile Internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a smart screen, an artificial intelligence (AI) speaker, a headset, a terminal in industrial control, a terminal in self-driving, a terminal in remote medical surgery, a terminal in a smart grid, a terminal in transportation safety, a terminal in a smart city, a terminal in a smart home, a personal digital assistant (PDA), etc., and the embodiment of the present application does not make any limitation to this.

[0079] For example, Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0080] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU) 111, an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a display processing unit (displayprocess unit, DPU), and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory, which avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the electronic device 100 system.

[0081] The device detection method of the embodiment of the present application involves testing of a graphics processor. In some embodiments, the processing results of the graphics processor on a preset image at different available frequencies can be obtained by traversing the available frequencies of the graphics processor. The image processing process can apply certain stresses such as temperature and humidity, and the number of image processing times can be set to stimulate potential defects of the graphics processor and intercept defective graphics processors.

[0082] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones and play audio through the headphones.

[0083] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0084] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.

[0085] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0086] The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0087] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier, etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0088] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0089] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0090] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and / or IR technology. The above-mentioned GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0091] The electronic device 100 can realize the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute instructions to generate or change display information.

[0092] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0093] The electronic device 100 can implement a shooting function through an ISP, one or more cameras 193, a video codec, a GPU, one or more display screens 194, and an application processor.

[0094] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0095] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, data files such as music, photos, and videos are stored in the external memory card.

[0096] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can enable the electronic device 100 to perform various functional applications and data processing by running the above instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system; the program storage area can also store one or more applications (such as a gallery, contacts, etc.). The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. In some embodiments, the processor 110 can enable the electronic device 100 to perform various functional applications and data processing by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor 110.

[0097] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0098] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0099] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0100] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0101] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0102] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130, a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0103] The sensor 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0104] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0105] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0106] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system as an example to illustrate the software structure of the electronic device.

[0107] Figure 2 A software structure block diagram of an electronic device provided in an embodiment of the present application. The layered architecture divides the software system of the electronic device into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into four layers, namely, the application layer (applications), the application framework layer (application framework), the Android runtime (Android runtime) and the system library, and the kernel layer (kernel).

[0108] The application layer can include a series of application packages, such as Figure 2 As shown, the application layer can be installed with applications such as camera, phone, video, music, gallery, calendar, map, navigation, Bluetooth, short message, etc. In the embodiment of the present application, the application layer also includes a test application, and the test application supports aging test of the GPU in the electronic device. In some embodiments, the test application also supports aging test of other components in the electronic device.

[0109] The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer.

[0110] In some embodiments, the application framework layer may include an input manager service (IMS). Of course, the application framework layer may also include a display policy service, a power management service (PMS), a display management service (DMS), an activity manager, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., which are not limited in the embodiments of the present application.

[0111] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0112] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0113] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0114] The system library may include multiple functional modules. For example: state monitoring service, surface manager, media library, three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. The state monitoring service is used to determine the specific orientation of the mobile phone, the physical state of the flexible screen, etc. according to the monitoring data reported by the kernel layer. The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications. The media library supports a variety of commonly used audio and video formats for playback and recording, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing. In an embodiment of the present application, the system library also includes a test service, and the test application can call the test service through the interface provided by the test service so that the test service triggers the GPU to perform an aging test. In some embodiments, the test service is also used to trigger aging testing of other components in the electronic device.

[0115] The kernel layer is a layer between hardware and software. In an embodiment of the present application, the kernel layer includes a GPU driver, which is used to obtain relevant information of the GPU and resources related to image processing, and drives the GPU to work based on the relevant information of the GPU and resources related to image processing. The relevant information of the GPU includes the available frequency points of the GPU, and the number and value of the available frequency points of different GPU chips are usually different. Resources related to image processing include RAW image data, image processing algorithms (including image processing algorithms based on deep convolutional neural networks), etc.

[0116] In some embodiments, the kernel layer may also include a display driver, a camera driver, an audio driver, a sensor driver, etc., and the embodiments of the present application do not impose any restrictions on this.

[0117] The device testing method provided by the present application is described in detail below in conjunction with specific embodiments. It should be noted that the technical solution provided by the present application may include part or all of the following contents, and the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0118] The device testing method of the following embodiment mainly involves an aging test of a GPU in an electronic device. The aging test usually requires the GPU to perform multiple test tasks, and the device can be placed in different test environments as needed (different temperatures, humidity, image processing durations or times, etc. can be set). The GPU test task is used to simulate the image processing tasks of the GPU in actual applications, including, for example, the GPU performing image processing on RAW image data.

[0119] It should be noted that before performing an aging test on a GPU in an electronic device, a tester needs to install a test application on the electronic device to be tested, and the test application provides GPU aging test items.

[0120] For example, Figure 3 A schematic diagram of a device testing method provided in an embodiment of the present application. Figure 3 As shown, the tester turns on the GPU aging test item of the test application, and the GPU aging test begins. The electronic device triggers the GPU to execute N test tasks and obtains N test results of the GPU, where N is a positive integer, for example, N is 50. The electronic device determines the aging test result of the GPU based on the N test results of the GPU, and finally displays the aging test result. The aging test result includes a test success or a test failure. The following is a detailed description of the process of the GPU executing a test task.

[0121] like Figure 3 As shown, the process includes the following steps:

[0122] Step 1: The electronic device obtains test resources, including preset executable files, trained model files, and preset image resources.

[0123] The electronic device obtains the above test resources from the memory. Among them, the preset executable file is used to control the GPU to use the model file for image processing. The trained model file includes an image processing algorithm based on a deep convolutional neural network. The preset image resources include RAW image data and the expected processing results corresponding to the RAW image data.

[0124] Step 2: The electronic device obtains available frequency information of the GPU.

[0125] The electronic device obtains the available frequency point information of the GPU through the GPU driver. The available frequency point information includes the number and value of the available frequency points. The number of available frequency points is recorded as M, and M is a positive integer greater than 1.

[0126] Step 3: The electronic device traverses the available frequency points of the GPU, runs the GPU after locking the frequency, and the GPU performs image processing on the RAW image data to obtain an image processing result.

[0127] The electronic device selects available frequencies one by one from the available frequency information of the GPU. Exemplarily, the available frequency information includes available frequency 1 to available frequency 8, the electronic device currently selects available frequency 1, and the GPU operates at available frequency 1 (i.e., the GPU is locked at available frequency 1) to perform image processing on the RAW image data to obtain an image processing result.

[0128] Step 4: The electronic device obtains a test result by comparing the image processing result with the expected processing result.

[0129] The electronic device obtains the expected processing result corresponding to the RAW image data from the preset image resource, and determines the test result by comparing the image processing result with the expected processing result. If the image processing result is consistent with the expected processing result, it indicates that the GPU image processing is normal, and the test result indicates that the test is successful; if the image processing result is inconsistent with the expected processing result, it indicates that the GPU image processing is abnormal, and the test result indicates that the test failed. Exemplarily, the test result is 0 or 1, 0 indicates that the test is successful, and 1 indicates that the test failed.

[0130] In an optional embodiment, after step 4, the following steps are performed: if the number of traversals is less than the number of available frequency points M, then jump back to step 3. Alternatively, if the number of traversals is equal to the number of available frequency points M, then step 5 is performed.

[0131] Step 5: Determine the test result of this test task based on the M test results.

[0132] In this embodiment, the test task will not be terminated due to an image processing exception. It is necessary to analyze the image processing results of the GPU at each available frequency point to obtain complete aging test data. When the test results are presented, the number of successful tests and the number of failed tests can be displayed.

[0133] In one example, if at least one test result among the M test results indicates a test failure, the test result of the test task is a test failure.

[0134] In another optional embodiment, after step 4, the following steps are performed: if the test result indicates that the test fails, the process ends, and the electronic device directly displays the GPU aging test result as aging test failure ( Figure 3 (not shown). In this embodiment, as long as an image processing anomaly occurs during the GPU aging test, the aging test failure is directly reported, and there is no need to perform subsequent test tasks on the GPU, which can save equipment overhead.

[0135] Based on the above steps, the electronic device can obtain the test result of the GPU executing a test task. The GPU aging test usually sets the GPU to execute N test tasks. The process of the GPU executing each test task is the same, and the above steps can be referred to. It should be noted that the image data of the GPU executing N test tasks is usually the same image data, which can be pre-specified image data, and the image data can well detect the multiple image processing capabilities of the GPU.

[0136] The device testing method shown in the embodiment of the present application is used to perform an aging test on the GPU in an electronic device. By obtaining the relevant resources of the preset GPU test and the available frequency point information of the GPU, the GPU is triggered to execute a preset number of test tasks to obtain the preset number of test results, and the success or failure of the aging test is determined according to the preset number of test results. Usually, as long as there is a test failure, it is necessary to intercept the GPU, perform fault analysis, and replace the GPU of the device. The GPU needs to traverse the available frequency points of the GPU to execute a test task to verify the processing effect of the GPU on the image data at each available frequency point. The same image data is used for the entire test task. The above-mentioned test method implements stress testing of the GPU in the device, can more accurately detect GPUs with potential defects, can improve the factory quality of the equipment, and reduce the maintenance rate of the equipment.

[0137] Based on the above embodiments, the internal interaction process of the device testing method is described in detail below through a specific embodiment. Figure 4 A schematic diagram of a device testing method provided in an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:

[0138] Step 401: In response to a first operation, the test application starts a main task of a device test.

[0139] In one example, the first operation is a click operation. In response to the user's click operation on the target control on the test application interface, the test application starts the main task of the device test. In another example, the first operation is a voice control operation, for example, after the user starts the test application, by speaking a voice control instruction, the test application is controlled to start the main task of the device test.

[0140] For example, Figure 5 This is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application. Figure 5 As shown in (a), the test application interface 501 displays device component test items, such as GPU aging test. The user can click the GPU aging test item, or click multiple test items at the same time, and then click the "Start Test" control at the bottom of the interface 501 to trigger the test application to start the main task of the device test. The main task of the device test is used to manage and control one or more test subtasks, including managing and controlling the subtask of the GPU aging test.

[0141] In other embodiments, Figure 5 The test application interface 502 shown in (b) shows a GPU aging test switch 503, which the user can control to turn on or off. After the GPU aging test switch is turned on, the user can also set the number of GPU aging tests in the input box 504, for example, setting the number of GPU aging tests to 50 times.

[0142] Step 402: The main task of the device test determines whether the GPU aging test switch is turned on.

[0143] If the main task of the device test determines that the GPU aging test switch is not turned on, step 403 is executed.

[0144] If the main task of the device test determines that the GPU aging test switch is turned on, step 404 is executed.

[0145] Step 403: The main task of the device test controls the execution of the test tasks of other devices.

[0146] Step 404: The main task of the device test controls the creation of a subtask of the GPU aging test.

[0147] In one example, the main task of the device test controls the execution of the test tasks of other devices, specifically including: the main task of the device test controls the creation of subtasks of other device tests, and the tests of other devices are executed in the subtasks. The other devices include display screens, camera modules, memory, etc.

[0148] In one example, the user only clicks on the GPU aging test item. After the test application starts the main task of the device test, the main task of the device test determines that the GPU aging test switch is turned on, and the main task of the device test controls the creation of a subtask of the GPU aging test.

[0149] In one example, a user clicks on multiple test items. For example, the user clicks on two test items, for example, the user clicks on the GPU aging test item and the display aging test item. After the test application starts the main task of the device test, the main task of the device test determines that the GPU aging test switch and the display aging test switch are both turned on. The main task of the device test controls the creation of a GPU aging test subtask and a display aging test subtask. The two test subtasks are independent of each other and can be executed in parallel.

[0150] Step 405: The GPU aging test subtask determines whether the preset test times N have been reached.

[0151] If the subtask of the GPU aging test is determined not to have reached the preset test times N, step 406 is executed.

[0152] Before the GPU aging test subtask calls the test service, it obtains the preset test times N of the GPU aging test and determines whether the current test times reaches the preset test times N, where N is a positive integer. It is understandable that each time the GPU aging test subtask calls the test service, the test times increases by one, and the initial test times is 0.

[0153] Step 406: The GPU aging test subtask calls the test service.

[0154] Step 407: The test service triggers the GPU driver to perform a GPU aging test.

[0155] Step 408: The GPU driver obtains test resources from the memory, where the test resources include a target image, an executable file of the GPU test task, a model file, and an expected processing result of the target image.

[0156] The target image is a preset image for the GPU aging test. This image is used throughout the aging test process. The image is usually a RAW format image. The GPU uses this image for image processing, which can detect multiple image processing capabilities of the GPU. The executable file is used to control the GPU to use the model file for image processing. The model file includes image processing algorithms that can be used by the GPU, including, for example, image processing algorithms based on deep convolutional neural networks. The expected processing results of the target image are used for comparison of image processing results.

[0157] The above information is stored in a preset space (preset storage path) of the electronic device memory, and the GPU driver can obtain the above information by accessing the preset space.

[0158] Step 409: The GPU driver obtains M available frequency points of the GPU.

[0159] Wherein, M is a positive integer greater than 1. In one example, the GPU driver obtains the available frequency point information of the GPU by calling the query interface of the GPU, and the available frequency point information includes the number and value of the available frequency points.

[0160] It should be noted that the above steps 408 and 409 may be executed sequentially or in parallel, and step 409 may be executed first and then step 410. This application does not specifically limit the execution order.

[0161] Step 410: The GPU driver traverses M available frequency points, runs the GPU after locking the frequency, and obtains the graphics processing result.

[0162] In one example, the GPU driver selects one of the available frequency points from M available frequency points, controls the GPU to work at the available frequency point (locks the frequency to avoid GPU working frequency jumps), and the GPU driver runs the executable file obtained from the memory, controls the GPU to use the image processing algorithm in the model file, performs image processing on the target image, and obtains the image processing result. After obtaining the image processing result of the target image by the GPU at the currently selected available frequency point, a new available frequency point is selected from the M available frequency points, and the GPU is controlled to work at the new available frequency point. The GPU driver runs the executable file, controls the GPU to use the image processing algorithm in the model file, performs image processing on the same target image, and obtains the image processing result of the target image by the GPU at the new available frequency point, until all available frequency points are traversed.

[0163] Step 411: The GPU driver determines a test result based on the M image processing results and the expected processing result of the target image. The test result is used to indicate whether the test task succeeds or fails.

[0164] In this embodiment, the GPU driver compares each image processing result with the expected processing result of the target image. If all M image processing results are consistent with the expected processing result of the target image, it is determined that this test task is successful. If at least one of the M image processing results is inconsistent with the expected processing result of the target image, it is determined that this test task has failed.

[0165] During the above test process, after obtaining the image processing results at all available frequency points, the GPU driver compares them with the expected processing results of the target image respectively, so as to obtain the number of test successes and test failures, retain the complete test data, and make the test data traceable.

[0166] In other embodiments, after step 410, the following steps may be performed: the GPU driver compares the image processing result with the expected processing result of the target image, determines the test result, and then continues to traverse the next available frequency point until all available frequency points have been traversed, determines the test result of this test task, and executes step 412.

[0167] During the above test process, each time an image processing result is obtained, a result comparison is performed. After the comparison, regardless of whether the test result is success or failure, the next available frequency point is traversed until all available frequency points are traversed. The number of successful tests and the number of failed tests can be obtained, and the complete test data is retained, making the test data traceable.

[0168] In other embodiments, when the GPU driver is traversing the M available frequency points, if it is determined that the image processing result of the GPU at a certain available frequency point is inconsistent with the expected processing result of the target image, the traversal is terminated and step 412 is executed.

[0169] During the above test process, as long as the GPU driver detects that the image processing result of the GPU for the target image at a certain available frequency point is abnormal (that is, inconsistent with the expected processing result of the target image), the test task will be terminated, which can save equipment overhead and improve test efficiency.

[0170] Step 412: The GPU driver sends the test result to the test service.

[0171] Step 413: The test service sends the test result to the GPU aging test subtask.

[0172] Step 414: The GPU aging test subtask stores the test results.

[0173] After step 414 , jump back to step 405 .

[0174] If the subtask of the GPU aging test is determined not to have reached the preset test times N, steps 406 to 414 are executed again.

[0175] If the subtask of the GPU aging test is determined to have completed the preset test times N, step 415 is executed.

[0176] Step 415: The GPU aging test subtask determines the GPU aging test result according to the N test results.

[0177] In this embodiment, if the N test results obtained by the subtask of the GPU aging test all indicate that the test task is successful, the aging test result of the GPU is a test success. If at least one of the N test results obtained by the subtask of the GPU aging test indicates that the test task fails, the aging test result of the GPU is a test failure.

[0178] During the above test process, the GPU aging test needs to complete all the preset N tests, then determine the final aging test results, obtain the number of successful tests and the number of failed tests in the aging test, and retain complete test data.

[0179] In other embodiments, the subtask of the GPU aging test can end the test process when the test result indicating the test failure is obtained for the first time. That is, even if the preset number of tests N is not reached, as long as one test result indicates that the test failed, the subtask of the GPU aging test directly sends the GPU aging test result to the main task of the device test, and the aging test result indicates that the aging test failed. This can save equipment overhead and improve testing efficiency.

[0180] Step 416: The GPU aging test subtask sends the GPU aging test result to the device test main task.

[0181] Step 417 , the main task of the device test controls and displays the aging test result of the GPU.

[0182] The aging test result of the GPU includes an aging test success or an aging test failure.

[0183] The device testing method shown in the embodiment of the present application, when the user's trigger operation in the test application interface is detected, the test application starts the main task of the device test, and based on the on state of the test item switch in the test application, creates one or more test subtasks, and the test subtasks are executed independently and in parallel. If it is detected that the GPU aging test item switch is turned on, a subtask of the GPU aging test is created, and the GPU driver is triggered to execute a preset number of test tasks by calling the underlying test service. The GPU driver can obtain resources related to the GPU aging test from the library of the GPU chip, including the target image, the expected processing results of the target image, executable files and model files, etc., by traversing multiple available frequency points of the GPU, and determining the test results of each test task based on these resources, and reporting the test results to the subtask of the GPU aging test. After completing the preset number of test tasks, the subtask of the GPU aging test can send the final aging test results to the main task of the device test, so that the main task of the device test controls the display of the final aging test results in the test application interface.

[0184] The above-mentioned testing method realizes stress testing of the GPU in the device, and can more accurately detect GPUs with potential defects, thereby improving the factory quality of the device and reducing the maintenance rate of the device.

[0185] Based on the above embodiments, an embodiment of the present application provides a device testing method, which is applied to an electronic device, the electronic device includes a graphics processor, and the electronic device is installed with a test application, the method comprising:

[0186] In response to an operation of turning on a test switch in the test application, controlling the graphics processor to execute at least one test task;

[0187] Displaying the test result of the graphics processor according to the test result of at least one test task;

[0188] Control the GPU to execute each test task, including:

[0189] Control the graphics processor to perform at least one image processing task, and use different available frequencies when performing each image processing task; and determine the test result of this test task by comparing the image processing results of the graphics processor at different available frequencies with the expected processing results.

[0190] In this embodiment, the user can control the graphics processor in the electronic device to perform one or more test tasks through a test application installed on the electronic device. Each test task includes an image processing task of the graphics processor at at least one available frequency point, so as to verify whether there are potential defects when the graphics processor works at different available frequencies, thereby intercepting graphics processors with potential defects during the production process, improving the quality of equipment leaving the factory, and reducing the maintenance rate of the equipment.

[0191] In an optional embodiment, the electronic device further includes a test service and a graphics processor driver, the test application includes a main task of device testing and a subtask of graphics processor testing; in response to the operation of turning on a test switch in the test application, controlling the graphics processor to execute at least one test task, including:

[0192] In response to an operation of turning on a test switch in the test application, the main task determines whether the test switch of the graphics processor is turned on;

[0193] If it is determined that the test switch of the graphics processor is turned on, the main task controls the creation of a subtask;

[0194] The subtask triggers the graphics processor driver to control the graphics processor to execute at least one test task by calling the test service.

[0195] In this embodiment, after determining that the user turns on the switch for the graphics processor test, the test application creates a subtask for performing an aging test on the graphics processor. The subtask triggers the graphics processor driver by calling the test service, and controls the graphics processor to perform one or more test tasks to verify whether the graphics processor has potential defects.

[0196] In an optional embodiment, before controlling the graphics processor to execute each test task, the method further includes: testing the subtask of the graphics processor test in the application to determine whether the number of tests of the graphics processor reaches a preset number of tests N, where N is a positive integer;

[0197] Controlling the graphics processor to execute each test task includes: if the number of tests of the graphics processor does not reach the preset number of tests N, the subtask triggers the graphics processor driver to control the graphics processor to execute a test task by calling the test service.

[0198] In this embodiment, after the subtask of the graphics processor test is created, before each call to the test service, it is necessary to determine whether the number of times the test task has been executed has reached the preset test number. If the preset test number is reached, the test process is terminated. If the test number is not reached, the test task continues to be executed to control the number of times the graphics processor is aged.

[0199] In an optional embodiment, displaying the test result of the graphics processor according to the test result of at least one test task includes: determining the test result of the graphics processor according to the test results of N test tasks by a subtask of the graphics processor test in the test application;

[0200] The subtask sends the test result of the graphics processor to the main task of the device test in the test application;

[0201] The main Task Control displays the test results of the graphics processor.

[0202] In this embodiment, the subtask needs to execute the test task according to the preset number of times, and determine the aging test result of the graphics processor based on the test results of the preset number of test tasks. In this way, the complete test data can be retained to obtain the number of test successes and test failures, making the test data traceable.

[0203] In an optional embodiment, the subtask of the graphics processor test in the test application determines the test result of the graphics processor according to the test results of N test tasks, including:

[0204] If one of the test results of N test tasks fails, the test result of the graphics processor is the first test result, and the first test result is used to indicate that the graphics processor is abnormal; or, if the test results of N test tasks are all successful, the test result of the graphics processor is the second test result, and the second test result is used to indicate that the graphics processor is normal.

[0205] In this embodiment, if one of the test tasks among the preset number of test tasks fails, the graphics processor is determined to be abnormal, which can effectively intercept the graphics processor with potential defects and improve the factory quality of the equipment.

[0206] In an optional embodiment, the test result of the graphics processor is displayed according to the test result of at least one test task, including: if the test result of the first test task is a test failure, the subtask of the graphics processor test in the test application ends the test process and sends the test result of the first test task to the main task of the device test;

[0207] The main task displays the first test result based on the test result of the first test task, where the first test result is used to indicate that the graphics processor is abnormal.

[0208] The first test task is any test task among at least one test task.

[0209] In this embodiment, before each call to the test service, it is necessary to determine the test result of the first test task currently being executed. If the test result of the first test task is a test failure, it is not necessary to consider whether the number of currently executed test tasks has reached the preset number of tests. The test process can be ended directly to intercept the abnormal graphics processor, improve test efficiency, and save equipment testing overhead.

[0210] In an optional embodiment, controlling a graphics processor to perform at least one image processing task includes:

[0211] The graphics processor driver obtains available frequency point information of the graphics processor, where the available frequency point information includes M available frequency points, where M is a positive integer greater than 1;

[0212] The graphics processor driver traverses M available frequency points, controls the graphics processor to perform image processing on the target image at at least one available frequency point, and obtains at least one image processing result.

[0213] In this embodiment, the graphics processor drives and controls the graphics processor to operate at a certain available frequency point (frequency locking) to obtain the image processing result of the graphics processor at the available frequency point. By locking the frequency point, the image processing results of the graphics processor at different available frequency points can be obtained.

[0214] In an optional embodiment, the method further includes: the graphics processor driver obtains test resources from the memory of the electronic device, the test resources including the target image, the expected processing result of the target image, the executable file of the graphics processor test, and the model file of the graphics processor performing image processing;

[0215] The graphics processor driver controls the graphics processor to perform image processing on the target image at at least one available frequency point to obtain at least one image processing result, including:

[0216] The graphics processor driver runs the executable file, controls the graphics processor to call the image processing algorithm in the model file at at least one available frequency point, performs image processing on the target image, and obtains at least one image processing result.

[0217] In this embodiment, before the graphics processor drives and controls the graphics processor to perform image processing on the target image, it is necessary to obtain relevant resources for the graphics processor to execute the test task from the memory. The memory can be pre-set with image resources including the target image and the expected processing result of the target image, executable files, and resources such as the image processing algorithm of the image processor for controlling the execution of the test task of the graphics processor.

[0218] In an optional embodiment, controlling a graphics processor to perform at least one image processing task includes:

[0219] The graphics processor drives and controls the graphics processor to perform image processing on the target image at a first available frequency point to obtain a first image processing result; the first available frequency point is one of the M available frequency points;

[0220] If the first image processing result is inconsistent with the expected processing result, the graphics processor driver sends a test result indicating that the test task failed to the subtask of the graphics processor test, so as to end the test task.

[0221] In this embodiment, the graphics processor driver determines whether to continue traversing the available frequency points by comparing the image processing result with the expected processing result. If it is determined that the image processing result at a certain available frequency point is inconsistent with the expected processing result, the traversal is no longer continued. This can improve test efficiency and save equipment testing expenses.

[0222] In an optional embodiment, controlling a graphics processor to perform at least one image processing task includes:

[0223] The graphics processor driver traverses M available frequency points of the graphics processor to control the graphics processor to perform M image processing tasks, and the M image processing tasks use the same target image;

[0224] Obtain image processing results of the graphics processor at M available frequency points.

[0225] In an optional embodiment, the test result of this test task is determined by comparing the image processing result of the graphics processor at different available frequency points with the expected processing result, including:

[0226] If the image processing results at the M available frequency points are all consistent with the expected processing results, the test task is determined to be successful; or, if at least one image processing result among the image processing results at the M available frequency points is inconsistent with the expected processing result, the test task is determined to have failed.

[0227] Based on the above two optional embodiments, there are two possible implementation methods:

[0228] In one possible implementation, after the graphics processor driver obtains the image processing result at each available frequency point, it performs a result comparison. Regardless of whether the comparison result is consistent or inconsistent, it will continue to traverse the next available frequency point until all available frequency points are traversed.

[0229] In one possible implementation, after the graphics processor driver obtains the image processing results at all available frequency points, it uniformly compares the results to determine whether the test task succeeds or fails.

[0230] In the above two optional embodiments, the graphics processor driver will control the graphics processor to perform M image processing tasks to obtain M image results, and will not end the test task in advance. In this way, complete test data can be retained to obtain the number of test successes and test failures, making the test data traceable.

[0231] The embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the technical solution of the above method embodiment. Its implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0232] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0233] The embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the technical solution of the above method embodiment is implemented. Its implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0234] The embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the technical solution of the above method embodiment. Its implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0235] The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

[0236] Computer readable media may include random access memory (RAM), read-only memory (ROM), compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium designed to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer. Also, any connection is appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include optical disc, laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer readable media.

[0237] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0238] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A device testing method, characterized in that: Applied to an electronic device, the electronic device includes a graphics processor, and the electronic device is installed with a test application, the method includes: In response to an operation of turning on a test switch in the test application, controlling the graphics processor to execute at least one test task; Displaying a test result of the graphics processor according to the test result of the at least one test task, wherein the test result includes a first test result or a second test result, wherein the first test result is used to indicate that the graphics processor is abnormal, and the second test result is used to indicate that the graphics processor is normal; Controlling the graphics processor to execute each test task includes: Control the graphics processor to perform at least one image processing task, wherein the graphics processor uses different available frequencies when performing each image processing task; and determine a test result of this test task by comparing the image processing results of the graphics processor at different available frequencies with expected processing results.

2. The method according to claim 1, characterized in that: The electronic device further comprises a test service and a graphics processor driver, wherein the test application comprises a main task of device testing and a subtask of graphics processor testing; In response to the operation of turning on the test switch in the test application, controlling the graphics processor to execute at least one test task, including: In response to an operation of turning on a test switch in the test application, the main task determines whether the test switch of the graphics processor is turned on; If it is determined that the test switch of the graphics processor is turned on, the main task controls the creation of the subtask; The subtask triggers the graphics processor driver to control the graphics processor to execute at least one test task by calling the test service.

3. The method according to claim 1 or 2, characterized in that: Before controlling the graphics processor to execute each test task, the method further includes: The subtask of the GPU test in the test application determines whether the number of tests of the GPU reaches a preset number of tests N, where N is a positive integer; Controlling the graphics processor to execute each test task includes: If the test times of the graphics processor do not reach the preset test times N, the subtask triggers the graphics processor to drive and control the graphics processor to execute a test task by calling a test service.

4. The method according to any one of claims 1 to 3, characterized in that: Displaying the test result of the graphics processor according to the test result of the at least one test task includes: The subtask of the graphics processor test in the test application determines the test result of the graphics processor according to the test results of N test tasks; The subtask sends the test result of the graphics processor to the main task of device testing in the test application; The main task controls the display of the test result of the graphics processor.

5. The method according to claim 4, characterized in that The subtask of the graphics processor test in the test application determines the test result of the graphics processor according to the test results of the N test tasks, including: If one of the test results of the N test tasks fails, the test result of the graphics processor is the first test result; or If the test results of the N test tasks are all successful, the test result of the graphics processor is the second test result.

6. The method according to any one of claims 1 to 3, characterized in that: Displaying the test result of the graphics processor according to the test result of the at least one test task includes: If the test result of the first test task is a test failure, the subtask of the graphics processor test in the test application ends the test process and sends the test result of the first test task to the main task of the device test; The main task displays a first test result based on the test result of the first test task.

7. The method according to any one of claims 1 to 6, characterized in that: Controlling the graphics processor to perform at least one image processing task, including: The graphics processor driver obtains available frequency point information of the graphics processor, where the available frequency point information includes M available frequency points, where M is a positive integer greater than 1; The graphics processor driver traverses the M available frequency points to control the graphics processor to perform image processing on the target image at at least one available frequency point to obtain at least one image processing result.

8. The method according to claim 7, characterized in that The method further includes: the graphics processor driver acquiring test resources from a memory of the electronic device, the test resources including the target image, an expected processing result of the target image, an executable file of the graphics processor test, and a model file for the graphics processor to perform image processing; The graphics processor drives and controls the graphics processor to perform image processing on a target image at at least one available frequency point to obtain at least one image processing result, including: The graphics processor driver runs the executable file, controls the graphics processor to call the image processing algorithm in the model file at the at least one available frequency point, performs image processing on the target image, and obtains the at least one image processing result.

9. The method according to any one of claims 1 to 8, characterized in that: Controlling the graphics processor to perform at least one image processing task, including: The graphics processor drives and controls the graphics processor to perform image processing on the target image at a first available frequency point to obtain a first image processing result; the first available frequency point is one of the M available frequency points; If the first image processing result is inconsistent with the expected processing result, the graphics processor driver sends a test result indicating that the test task failed to the subtask of the graphics processor test, so as to end the test task.

10. The method according to any one of claims 1 to 8, characterized in that: Controlling the graphics processor to perform at least one image processing task, including: The graphics processor driver controls the graphics processor to perform M image processing tasks by traversing M available frequency points of the graphics processor, wherein the same target image is used in the M image processing tasks; Obtain image processing results of the graphics processor at the M available frequency points.

11. The method according to any one of claims 1 to 10, characterized in that: By comparing the image processing results of the graphics processor at different available frequency points with the expected processing results, the test results of this test task are determined, including: If the image processing results at the M available frequency points are all consistent with the expected processing results, it is determined that this test task is successful; or, if at least one image processing result among the image processing results at the M available frequency points is inconsistent with the expected processing result, it is determined that this test task has failed.

12. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 11.

13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

14. A computer program product, characterized in that The invention comprises a computer program which, when being executed, causes a computer to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Frequency adjustment method and device of graphic processor, terminal and storage medium

    CN110209501A

  • Performance optimization method and related equipment

    CN115408210A