GPU error event reporting method and device, equipment, storage medium and program product

By recording GPU error events in the kernel-mode driver's event log file and monitoring notification signals, a unified format for parsing and proactive reporting is achieved, solving the parsing difficulty caused by different log formats and improving the notification efficiency of GPU error events.

CN121523946APending Publication Date: 2026-02-13MOORE THREADS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511698410.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In existing technologies, the different log formats of GPU error events make parsing difficult and reduce the efficiency of error event notification.

Method used

GPU error events are recorded in a unified event logging format in the corresponding event logging file of the kernel-mode driver, and the target format data is actively read and parsed through monitoring notification signals to generate and report notification information.

Benefits of technology

It reduces the complexity of log parsing and improves the efficiency of GPU error event notification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121523946A_ABST
    Figure CN121523946A_ABST
Patent Text Reader

Abstract

The invention relates to a GPU error event reporting method and device, equipment, a storage medium and a program product. The method comprises the steps that in an event recording file, target format data of an error event of an image processor GPU are read, and the event recording file is a kernel mode driving file of the GPU; according to a preset event recording format, analyzing the target format data of the GPU error event to obtain error data of the GPU error event; and generating and reporting GPU error notification information according to the error data of the GPU error event. By adopting the method, the notification efficiency of the GPU error event can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the chip technical field, in particular to a GPU error event reporting method and device, equipment, storage medium and program product. BACKGROUND

[0002] The hardware and software of the image processor (Graphics Processing Unit, GPU) will cause some unexpected or contradictory error behaviors due to some defects or logical errors during the running process. The error events corresponding to these error behaviors are usually recorded or notified to the user in a specific form, so that the user can timely handle when encountering the corresponding error events.

[0003] In related technologies, the error events of the hardware and software of the GPU during the running process are saved in the form of logs. Correspondingly, in order to obtain the error events, the terminal device usually needs to actively read the logs generated by the hardware, software or system of the GPU, analyze the data in the logs, and retrieve the error event related data therein.

[0004] However, actively retrieving the GPU error event related data in each log is difficult due to the different formats of different logs, which greatly reduces the notification efficiency of the GPU error event. SUMMARY

[0005] Therefore, it is necessary to provide a GPU error event reporting method and device, equipment, storage medium and program product capable of improving the notification efficiency of the GPU error event.

[0006] In a first aspect, the present application provides a GPU error event reporting method applied to a terminal device, and the method comprises:

[0007] Reading target format data of an image processor (GPU) error event in an event record file, wherein the event record file is a kernel mode driver file of the GPU;

[0008] According to a preset event record format, the target format data of the GPU error event is analyzed to obtain error data of the GPU error event;

[0009] According to the error data of the GPU error event, GPU error notification information is generated and reported.

[0010] In one of the embodiments, the method further comprises:

[0011] Monitoring a notification signal of the event record file;

[0012] The method comprises: reading target format data of a GPU error event in an event record file according to the notification signal.

[0013] In one of the embodiments, after the reading of the target format data of the GPU error event in the event record file, the method further comprises:

[0014] updating a flag bit of the notification signal from a first value to a second value.

[0015] The notification signal is used to indicate that the event record file is readable when the flag bit is the first value, and the notification signal is used to indicate that the event record file is unreadable when the flag bit is the second value.

[0016] In one of the embodiments, the monitoring of the notification signal of the event record file comprises:

[0017] monitoring the notification signal of the event record file by a blocking event monitoring instance.

[0018] The blocking event monitoring instance switches a service program of the GPU error event from a blocking state to a wake-up state when the flag bit of the notification signal is detected to be the first value, and the service program of the GPU error event is used to read target format data of a GPU error event in the event record file in the wake-up state.

[0019] In one of the embodiments, the method further comprises:

[0020] acquiring error data of a GPU error event generated by a target object through the kernel mode driver.

[0021] converting the error data of the GPU error event into the target format data respectively through the kernel mode driver, and writing the target format data into the event record file.

[0022] In one of the embodiments, after the writing of the target format data into the event record file, the method further comprises:

[0023] updating a flag bit of the notification signal from a second value to a first value.

[0024] In one of the embodiments, the target object comprises the GPU, a kernel mode driver of the GPU, and a user program corresponding to the GPU.

[0025] In one of the embodiments, the parsing, according to the preset event record format, of the target format data of the GPU error event to obtain error data of the GPU error event comprises:

[0026] According to the preset event record format, the constituent information of the GPU error event and the extraction position of the constituent information in the target format data are determined;

[0027] According to the extraction position, the constituent information is extracted from the target format data;

[0028] According to the constituent information, the error data of the GPU error event is obtained.

[0029] In one of the embodiments, the generating and reporting, according to the error data of the GPU error event, of GPU error notification information comprises:

[0030] According to the error data of the GPU error event, the error type of the GPU error event is determined and the occurrence frequency of the GPU error event is updated;

[0031] In the case that the error type of the GPU error event is a target error type or the occurrence frequency of the GPU error event is greater than a frequency threshold, the GPU error notification information of the GPU error event is generated and reported.

[0032] In a second aspect, the application further provides a GPU error event reporting device applied to a terminal device, the device comprising:

[0033] A read-write module configured to read target format data of a GPU error event in an event record file, the event record file being a kernel mode driver file of a GPU;

[0034] A parsing module configured to parse, according to a preset event record format, the target format data of the GPU error event to obtain error data of the GPU error event;

[0035] A reporting module configured to generate and report GPU error notification information according to the error data of the GPU error event.

[0036] In one of the embodiments, the read-write module is further configured to monitor a notification signal of the event record file, and in the case that the notification signal indicates that the event record file is readable, read the target format data of the GPU error event in the event record file.

[0037] In one of the embodiments, the read-write module is further configured to update a flag bit of the notification signal from a first value to a second value.

[0038] wherein the notification signal is used to indicate that the event record file is readable when the flag bit is the first value, and is used to indicate that the event record file is unreadable when the flag bit is the second value.

[0039] In one of the embodiments, the read-write module is further configured to monitor the notification signal of the event record file by blocking the event monitoring instance.

[0040] wherein the blocking event monitoring instance switches the service program of the GPU error event from the blocking state to the wake-up state when the flag bit of the notification signal is detected to be the first value; and in the wake-up state, the service program of the GPU error event is used to read the target format data of the GPU error event in the event record file.

[0041] In one of the embodiments, the read-write module is further configured to acquire error data of a GPU error event generated by the target object through the kernel mode driver; convert the error data of the GPU error event into the target format data respectively through the kernel mode driver, and write the target format data into the event record file.

[0042] In one of the embodiments, the read-write module is further configured to update the flag bit of the notification signal from the second value to the first value.

[0043] In one of the embodiments, the target object includes the GPU, the kernel mode driver of the GPU, and a user program corresponding to the GPU.

[0044] In one of the embodiments, the analysis module is further configured to determine the component information of the GPU error event and an extraction position of the component information in the target format data according to the preset event record format; extract the component information in the target format data according to the extraction position; and obtain error data of the GPU error event according to the component information.

[0045] In one of the embodiments, the reporting module is further configured to determine an error type of the GPU error event and update a number of occurrences of the GPU error event according to the error data of the GPU error event; and generate and report GPU error notification information of the GPU error event when the error type of the GPU error event is a target error type or the number of occurrences of the GPU error event is greater than a number threshold.

[0046] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the GPU error event reporting method in the first aspect when executing the computer program.

[0047] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program implements the GPU error event reporting method in the first aspect when executed by a processor.

[0048] In a fifth aspect, the present application also provides a computer program product comprising a computer program, and the computer program implements the GPU error event reporting method in the first aspect when executed by a processor.

[0049] The GPU error event reporting method, device, equipment, storage medium and program product described above, in the event record file, read the target format data of the GPU error event, and the event record file is the kernel mode driver file of the GPU; according to the preset event record format, the target format data of the GPU error event is parsed to obtain the error data of the GPU error event; according to the error data of the GPU error event, the GPU error notification information is generated and reported. Since the GPU error event is recorded in the event record file corresponding to the kernel mode driver in a unified event record format, the target format data read from the event record file can be parsed in a unified event record format, which greatly reduces the parsing complexity and improves the notification efficiency of the GPU error event. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0051] Figure 1 A software architecture diagram of a terminal device provided by the embodiments of the present application;

[0052] Figure 2 A flowchart of a GPU error event reporting method provided by the embodiments of the present application;

[0053] Figure 3 A read-write diagram of an event record file provided by the embodiments of the present application;

[0054] Figure 4 A flowchart of another GPU error event reporting method provided by the embodiments of the present application;

[0055] Figure 5 A structural block diagram of a GPU error event reporting device provided by an embodiment of the present application is shown in FIG. 1.

[0056] Figure 6 An internal structure diagram of a computer device provided by an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION

[0057] In order to make the objectives, technical solutions and advantages of the present application clearer and more comprehensible, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0058] First, the related art is described below.

[0059] The hardware and software of a graphics processing unit (GPU) may, in the process of running, cause some defects or logical errors, resulting in some unexpected or contrary-to-expected error behaviors. The error events corresponding to these error behaviors are usually recorded or notified to the user in a specific form, so that the user can timely handle the corresponding error events when encountering them.

[0060] For example, the entire process of the GPU hardware to the kernel mode driver (KMD) program, the user mode driver (UMD) program and the computing program often involves numerous hardware and software, and different error events occurring at different stages may cause the user application program to malfunction, and even when some error events occur, a chain reaction often accompanies. Therefore, it is crucial to monitor the error events related to the GPU.

[0061] In the related art, when an unpredictable error event occurs, the error event is recorded in the form of a log. When the system cannot continue to run, the error events recorded in the log during system running are checked, which may cause a series of error events to occur due to one error event, affecting the running of the user program. If the user can timely receive the corresponding error event, the time cost in the error event response process can be reduced. However, in the related art, in order to obtain the error event, the terminal device usually actively reads the logs generated by the hardware, software or system of the GPU, parses the data in the logs, and retrieves the data related to the error event. Actively retrieving the data related to the GPU error event in each log is difficult due to the different formats of different logs, greatly reducing the notification efficiency of the GPU error event.

[0062] To solve the above technical problems, the embodiment of the present application provides a GPU error event reporting method, device, equipment, storage medium and program product, which records GPU error events in a unified event record format in the event record file corresponding to the kernel mode driver, so that the target format data read from the event record file can be parsed in the unified event record format, which greatly reduces the parsing complexity and improves the notification efficiency of the GPU error event.

[0063] The GPU error event reporting provided by the embodiment of the present application can be applied to a GPU error event reporting device, which can be any terminal device containing a GPU. The terminal device can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc.

[0064] For example, Figure 1 A software architecture diagram of a terminal device provided by the embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the software architecture of the terminal device can include a GPU driver unit, a KMD unit, a server program (Server APP) unit and a user program (User APP) unit. The KMD unit interacts with the GPU driver unit, the server program unit and the user program unit respectively.

[0065] Continuing to refer to Figure 1 , the user program unit can perform matrix operation and interact with the GPU driver unit through the KMD unit to complete parallel computing of the GPU. The KMD unit can obtain GPU error events generated by a user program corresponding to the GPU from the user program unit, obtain GPU error events generated by the kernel mode driver of the GPU from the KMD itself, and obtain GPU error events generated by the GPU hardware from the GPU driver unit. Then, the KMD unit converts error data of the GPU error events into target format data corresponding to a preset event record format, and writes the target format data into an event record file. The server program reads the target format data of the GPU error events in the event record file corresponding to the kernel mode driver. Finally, the server program parses the target format data of the GPU error events according to the preset event record format to obtain error data of the GPU error events, and generates and reports GPU error notification information according to the error data of the GPU error events.

[0066] In one exemplary embodiment, as shown in Figure 2 FIG. 1, a GPU error event reporting method is provided. The method is applied to a terminal device in Figure 1 for example, and includes S201-S203. In this regard:

[0067] S201, in the event record file, read the target format data of the GPU error event.

[0068] In this application, the service program of the terminal device can read the target format data of the GPU error event in the event record file.

[0069] The event record file is the kernel mode driver file of the GPU. The above-mentioned target format data can be the error data of the GPU error event converted from the preset event record format.

[0070] For example, the above-mentioned kernel mode driver is a software component running in the kernel space of the operating system, which can directly control the GPU and provide an interface for interacting with the kernel. The above-mentioned event record file can be a file in the buffer of the kernel mode driver, which is used to record the GPU error events obtained by the kernel mode driver.

[0071] It should be understood that the kernel mode driver, as the hub connecting the underlying hardware and the upper software, can obtain error events occurring in the hardware (GPU), software (user program corresponding to the GPU), or itself (kernel mode driver itself) running process. Accordingly, after the kernel mode driver is loaded in the Linux server, it can initialize the components related to the GPU error event reporting, and create an event record file (event records) in the buffer after the device initialization is completed, thereby recording the GPU error events obtained by the kernel mode driver.

[0072] In some embodiments, after the creation of the event record file is completed, the terminal device can obtain the error data of the GPU error event generated by the target object through the kernel mode driver. Subsequently, the terminal device converts the error data of the GPU error event into target format data through the kernel mode driver, and writes the target format data into the event record file.

[0073] The target object includes the GPU, the kernel mode driver of the GPU, and the user program corresponding to the GPU. That is, the kernel mode driver can summarize the GPU error events generated in the GPU, the kernel mode driver of the GPU, and the user program corresponding to the GPU in the event record file.

[0074] For example, during the running of the kernel mode driver, if an error event occurs when a user program in an upper layer performs matrix operation, the kernel mode driver receives the error event corresponding to the matrix operation, converts error data of the error event corresponding to the matrix operation into target format data, and writes the target format data into the event record file.

[0075] It should be understood that the embodiments of the present application do not limit how to read the target format data of the GPU error event in the event record file. In some embodiments, a service program of the terminal device can monitor a notification signal of the event record file. When the notification signal indicates that the event record file is readable, the target format data of the GPU error event is read in the event record file.

[0076] It should be understood that the event record file is provided with a corresponding notification signal, and a flag bit of the notification signal is dynamically updated with writing and reading of the target format data in the event record file.

[0077] For example, after the target format data is written into the event record file, the flag bit of the notification signal can be updated from the second value to the first value. After the target format data of the GPU error event is read in the event record file, the flag bit of the notification signal can be updated from the first value to the second value.

[0078] In the case where the flag bit is the first value, the notification signal is used to indicate that the event record file is readable, and in the case where the flag bit is the second value, the notification signal is used to indicate that the event record file is not readable.

[0079] For example, the first value of the flag bit of the notification signal can be 1, and the second value of the flag bit of the notification signal can be 0. After the target format data is written into the event record file, the flag bit of the notification signal is set to 1, indicating that the event record file is readable. After the target format data is read in the event record file, the flag bit of the notification signal is set to 0, indicating that the event record file is not readable.

[0080] According to the embodiments of the present application, the notification efficiency of the GPU error event is improved by monitoring the notification signal of the event record file.

[0081] It should be understood that the embodiments of the present application do not limit how to monitor the notification signal of the event record file corresponding to the kernel mode driver of the GPU. In some embodiments, the notification signal of the event record file corresponding to the kernel mode driver of the GPU can be monitored by blocking an event monitoring instance.

[0082] The above blocking event monitoring instance can run on a user-mode service program, and is used to let the kernel assist in monitoring a notification signal. When the kernel monitors that the notification signal is in a target state (the flag bit is the first value), the kernel wakes up the user-mode service program.

[0083] In some embodiments, the blocking event monitoring instance switches the service program of the GPU error event from a blocking state to a wake-up state when the flag bit of the notification signal is detected to be the first value; in the wake-up state, the service program of the GPU error event is used to read the target format data of the GPU error event in the event record file.

[0084] It should be noted that the epoll function corresponding to the above blocking event monitoring instance can be provided by the Linux kernel, and the communication between the kernel-mode driver and the service program can be realized through the epoll function terminal device. Correspondingly, the service program can initialize the epoll function when starting, so as to subsequently monitor the notification signal of the event record file corresponding to the kernel-mode driver of the GPU through the blocking event monitoring instance.

[0085] In some embodiments, the target format data can be written in the event record file based on a write position, and the target format data can be read in the event record file based on a read position, wherein the write position and the read position can be completed through a read pointer and a write pointer in the event record file.

[0086] An exemplary Figure 3 A read-write schematic diagram of an event record file is provided for the embodiments of the present application. As Figure 3 shown, after the error data of the new GPU error event is converted into the target format data in the kernel-mode driver, the target format data can be written into the event record file. The write pointer of the event record file moves to the tail of the event record file, thereby indicating that the target format data is written into the tail of the event record file. At the same time, the read pointer moves to the write position of the target format data, and the flag bit of the notification signal of the event record file is set to 1, indicating that the event record file is readable. After the service program monitors that the flag bit of the notification signal is set to 1, the target format data is read from the position indicated by the read pointer in the event record file, and the flag bit of the notification signal of the event record file is set to 0, indicating that the event record file is not readable.

[0087] S202, according to the preset event record format, the target format data of the GPU error event is analyzed, and the error data of the GPU error event is obtained.

[0088] For example, before the kernel mode driver writes the error data of the GPU error event into the event record file, the kernel mode driver converts the error data of the GPU error event into target format data in a preset event record format. Correspondingly, after the service program obtains the target format data, the service program can parse the target format data into the error data of the GPU error event based on the preset event record format.

[0089] In some embodiments, the service program can first determine the component information of the GPU error event and the extraction position of the component information in the target format data according to the preset event record format. Then, the service program extracts the component information from the target format data according to the extraction position. Finally, the service program obtains the error data of the GPU error event according to the component information.

[0090] It should be understood that the embodiments of the present application do not limit the event record format, which can be set according to actual conditions. For example, the event record format can be set to include component information of multiple GPU error events, and each component information is set with a corresponding extraction position.

[0091] For example, the component information can include at least one of the following:

[0092] an identifier (ID) of the error event, a name of the error event, an error type of the error event, an error level of the error event, an error domain (Device or Host) of the error event, a bus device function (BDF) identifier of a peripheral component interconnect express (PCIe) interface, a universally unique identifier (UUID) of a GPU, a timestamp of triggering the error event, a process identifier (PID) of the error event, and description information of the error event.

[0093] For example, the kernel mode driver can extract multiple component information of GPU error events specified by the event record format from the error data of the GPU error event, and then combine the multiple component information of GPU error events into target format data according to the extraction position specified by the event record format. Correspondingly, the service program can also parse the multiple component information of GPU error events from the target format data based on the extraction position, and restore the multiple component information of GPU error events into the error data of the GPU error event.

[0094] S203, generating and reporting GPU error notification information according to error data of the GPU error event.

[0095] In this step, when the service program parses the target format data of the GPU error event according to the preset event record format, obtains the error data of the GPU error event, and generates and reports the GPU error notification information according to the error data of the GPU error event.

[0096] It should be understood that the embodiments of the present application do not limit how to generate and report the GPU error notification information according to the error data of the GPU error event. One GPU error notification information can be generated and reported for each error data of the GPU error event, or the GPU error notification information can be generated and reported under certain conditions.

[0097] In some embodiments, the error type of the GPU error event can be determined and the occurrence number of the GPU error event can be updated according to the error data of the GPU error event. In the case that the error type of the GPU error event is the target error type or the occurrence number of the GPU error event is greater than the number threshold, the GPU error notification information of the GPU error event is generated and reported.

[0098] In the case that the error type of the GPU error event is not the target error type and the occurrence number of the GPU error event is less than or equal to the number threshold, the error data of the GPU error event is stored first, and the GPU error notification information is not generated and reported temporarily.

[0099] The target error type can be a preset error that needs to be focused on, which can be dynamically adjusted by configuration information. The number threshold can be set according to actual conditions. Different error levels can be set with different number thresholds, for example, the number threshold of the GPU error event of error level 1 can be 2, the number threshold of the GPU error event of error level 2 can be 2, and the number threshold of the GPU error event of error level 3 can be 3.

[0100] In some embodiments, the GPU error notification information can be displayed on the display interface of the terminal device to remind the user to process the GPU error event. The terminal device can also push the GPU error notification information to other management terminals.

[0101] In the present application, the kernel driver continuously obtains error events of each object and records them in the event record file. The service program continuously reads the event record file to obtain error data of the error event, and generates and reports the GPU error notification information to realize the rapid notification of the GPU error event.

[0102] The GPU error event reporting method provided by the embodiments of the present application comprises the following steps: reading target format data of a GPU error event in an event record file, the event record file being a kernel mode driver file of a GPU; analyzing the target format data of the GPU error event according to a preset event record format to obtain error data of the GPU error event; and generating and reporting GPU error notification information according to the error data of the GPU error event. Since the GPU error event is recorded in the event record file corresponding to the kernel mode driver in a unified event record format, the target format data read from the event record file can be analyzed in the unified event record format, which greatly reduces the analysis complexity and improves the notification efficiency of the GPU error event.

[0103] Figure 4 The flowchart of another GPU error event reporting method provided by the embodiments of the present application is shown in FIG. 3, which is described below by taking the GPU error event reporting method applied to the terminal device as an example. The terminal device comprises a kernel mode driver and a service program, and the GPU error event reporting method comprises steps S301 to S307. Figure 4

[0104] S301, the kernel mode driver obtains error data of a GPU error event generated by a target object.

[0105] The target object comprises a GPU, a kernel mode driver of the GPU and a user program corresponding to the GPU.

[0106] S302, the kernel mode driver converts the error data of the GPU error event into target format data respectively, and writes the target format data into an event record file.

[0107] S303, the service program monitors a notification signal of the event record file corresponding to the kernel mode driver of the GPU through a blocking event monitoring instance.

[0108] In some embodiments, a flag bit of the notification signal of the event record file is set to a first value after the target format data is written, and is set to a second value after the target format data is read.

[0109] In the case where the flag bit is the first value, the notification signal is used to indicate that the event record file is readable, and in the case where the flag bit is the second value, the notification signal is used to indicate that the event record file is not readable.

[0110] In some embodiments, the blocking event monitoring instance switches the service program of the GPU error event from a blocking state to a wake-up state in the case where the flag bit of the notification signal is detected to be the first value, and in the wake-up state, the service program of the GPU error event is used to read the target format data of the GPU error event in the event record file.​​

[0111] S304, in the case that the notification signal indicates that the event record file is readable, the service program reads target format data of the GPU error event in the event record file corresponding to the kernel mode driver.

[0112] S305, the service program parses the target format data of the GPU error event according to a preset event record format, to obtain error data of the GPU error event.

[0113] S306, the service program determines an error type of the GPU error event and updates a number of occurrences of the GPU error event according to the error data of the GPU error event.

[0114] S307, in the case that the error type of the GPU error event is a target error type or the number of occurrences of the GPU error event is greater than a number threshold, the service program generates and reports GPU error notification information of the GPU error event.

[0115] The GPU error event reporting method provided by the embodiments of the present application monitors a notification signal of an event record file corresponding to a kernel mode driver of an image processor GPU; in the case that the notification signal indicates that the event record file is readable, reads target format data of a GPU error event in the event record file corresponding to the kernel mode driver; parses the target format data of the GPU error event according to a preset event record format, to obtain error data of the GPU error event; and generates and reports GPU error notification information of the GPU error event according to the error data of the GPU error event. Since the GPU error event is recorded in the event record file corresponding to the kernel mode driver in a unified event record format, the target format data is read from the event record file by monitoring the notification signal of the event record file, and the error data of the GPU error event is obtained by parsing the target format data, so that the terminal device does not need to search for various error events of the GPU, the active reporting of the GPU error event is realized, and the unified event record format greatly reduces the parsing complexity, and thus the notification efficiency of the GPU error event is improved.

[0116] It should be understood that although each step in the flowchart involved in the above embodiments is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.

[0117] Based on the same inventive concept, the embodiments of the present application also provide a GPU error event reporting device for implementing the above-mentioned GPU error event reporting method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more GPU error event reporting device embodiments provided below can refer to the limitations of the GPU error event reporting method in the foregoing, which will not be repeated here.

[0118] In one exemplary embodiment, as shown in Figure 5 A GPU error event reporting device 400 is provided, comprising: a read-write module 401, an analysis module 402, and a reporting module 403, wherein:

[0119] The read-write module 401 is configured to read target format data of the GPU error event in the event record file, the event record file being a kernel mode driver file of the GPU

[0120] The analysis module 402 is configured to analyze the target format data of the GPU error event according to a preset event record format to obtain error data of the GPU error event

[0121] The reporting module 403 is configured to generate and report GPU error notification information according to the error data of the GPU error event.

[0122] In one embodiment, the read-write module 401 is further configured to monitor a notification signal of the event record file; and in a case where the notification signal indicates that the event record file is readable, read the target format data of the GPU error event in the event record file.

[0123] In one embodiment, the read-write module 401 is further configured to update a flag bit of the notification signal from a first value to a second value.

[0124] Wherein, the notification signal is used for indicating that the event record file is readable when the flag bit is the first value, and the notification signal is used for indicating that the event record file is unreadable when the flag bit is the second value.

[0125] In one of the embodiments, the read-write module 401 is further configured to monitor the notification signal of the event record file by blocking the event monitoring instance.

[0126] Wherein, the blocking event monitoring instance switches the service program of the GPU error event from the blocking state to the wake-up state when the flag bit of the notification signal is monitored to be the first value; in the wake-up state, the service program of the GPU error event is used for reading the target format data of the GPU error event in the event record file.

[0127] In one of the embodiments, the read-write module 401 is further configured to acquire the error data of the GPU error event generated by the target object through the kernel mode driver; convert the error data of the GPU error event into the target format data respectively through the kernel mode driver, and write the target format data into the event record file.

[0128] In one of the embodiments, the read-write module 401 is further configured to update the flag bit of the notification signal from the second value to the first value.

[0129] In one of the embodiments, the target object includes the GPU, the kernel mode driver of the GPU, and the user program corresponding to the GPU.

[0130] In one of the embodiments, the analysis module 402 is further configured to determine the component information of the GPU error event and the extraction position of the component information in the target format data according to the preset event record format; extract the component information in the target format data according to the extraction position; and obtain the error data of the GPU error event according to the component information.

[0131] In one of the embodiments, the reporting module 403 is further configured to determine the error type of the GPU error event and update the occurrence frequency of the GPU error event according to the error data of the GPU error event; and generate and report the GPU error notification information of the GPU error event in the case that the error type of the GPU error event is the target error type or the occurrence frequency of the GPU error event is greater than the frequency threshold.

[0132] The above-mentioned modules in the GPU error event reporting device can be all or part realized by software, hardware and combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned modules.

[0133] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a GPU error event reporting method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0134] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0135] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0136] The event log file reads the target format data of the image processor GPU error events; the event log file is the GPU kernel-mode driver file.

[0137] According to the preset event recording format, the target format data of the GPU error event is parsed to obtain the error data of the GPU error event;

[0138] According to error data of the GPU error event, GPU error notification information is generated and reported.

[0139] In one of the embodiments, the method further comprises:

[0140] Monitoring the notification signal of the event record file;

[0141] The reading of the target format data of the GPU error event in the event record file comprises: reading the target format data of the GPU error event in the event record file when the notification signal indicates that the event record file is readable.

[0142] In one of the embodiments, after the reading of the target format data of the GPU error event in the event record file, the method further comprises:

[0143] Updating a flag bit of the notification signal from a first value to a second value;

[0144] Wherein, when the flag bit is the first value, the notification signal is used to indicate that the event record file is readable, and when the flag bit is the second value, the notification signal is used to indicate that the event record file is not readable.

[0145] In one of the embodiments, the monitoring of the notification signal of the event record file comprises:

[0146] Monitoring the notification signal of the event record file through a blocking event monitoring instance;

[0147] Wherein, the blocking event monitoring instance switches the service program of the GPU error event from a blocking state to a wake-up state when the flag bit of the notification signal is detected to be the first value; in the wake-up state, the service program of the GPU error event is used to read the target format data of the GPU error event in the event record file.

[0148] In one of the embodiments, the method further comprises:

[0149] Obtaining error data of a GPU error event generated by a target object through the kernel mode driver;

[0150] Converting the error data of the GPU error event into the target format data respectively through the kernel mode driver, and writing the target format data into the event record file.

[0151] In one of the embodiments, after the writing of the target format data into the event record file, the method further comprises:

[0152] updating a flag bit of the notification signal from a second value to a first value.

[0153] In one of the embodiments, the target object includes the GPU, a kernel mode driver of the GPU, and a user program corresponding to the GPU.

[0154] In one of the embodiments, the parsing the target format data of the GPU error event according to the preset event record format to obtain error data of the GPU error event includes:

[0155] determining, according to the preset event record format, component information of the GPU error event and an extraction position of the component information in the target format data;

[0156] extracting the component information from the target format data according to the extraction position;

[0157] obtaining the error data of the GPU error event according to the component information.

[0158] In one of the embodiments, the generating and reporting the GPU error notification information according to the error data of the GPU error event includes:

[0159] determining an error type of the GPU error event and updating a number of occurrences of the GPU error event according to the error data of the GPU error event;

[0160] generating and reporting the GPU error notification information of the GPU error event in a case where the error type of the GPU error event is a target error type or the number of occurrences of the GPU error event is greater than a threshold number.

[0161] In one of the embodiments, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the following steps:

[0162] reading target format data of an image processor GPU error event in an event record file, the event record file being a kernel mode driver file of the GPU;

[0163] parsing the target format data of the GPU error event according to a preset event record format to obtain error data of the GPU error event;

[0164] generating and reporting GPU error notification information according to the error data of the GPU error event.

[0165] In one of the embodiments, the method further includes:

[0166] monitoring a notification signal of the event record file;

[0167] The method further includes, after the monitoring the notification signal of the event record file, reading target format data of the GPU error event in the event record file.

[0168] In one embodiment, after the reading the target format data of the GPU error event in the event record file, the method further includes:

[0169] updating a flag bit of the notification signal from a first value to a second value.

[0170] The flag bit is the first value when the notification signal indicates that the event record file is readable, and the flag bit is the second value when the notification signal indicates that the event record file is not readable.

[0171] In one embodiment, the monitoring the notification signal of the event record file includes:

[0172] monitoring the notification signal of the event record file by blocking the event monitoring instance;

[0173] The blocking event monitoring instance switches the service program of the GPU error event from a blocked state to a woken-up state when the flag bit of the notification signal is detected to be the first value. In the woken-up state, the service program of the GPU error event is used to read the target format data of the GPU error event in the event record file.

[0174] In one embodiment, the method further includes:

[0175] obtaining error data of the GPU error event generated by the target object through the kernel mode driver;

[0176] The kernel mode driver converts the error data of the GPU error event into the target format data respectively, and writes the target format data into the event record file.

[0177] In one embodiment, after the writing the target format data into the event record file, the method further includes:

[0178] updating the flag bit of the notification signal from the second value to the first value.

[0179] In one embodiment, the target object includes the GPU, the kernel mode driver of the GPU, and a user program corresponding to the GPU.

[0180] In one of the embodiments, the parsing of the target format data of the GPU error event according to the preset event record format to obtain error data of the GPU error event comprises:

[0181] According to the preset event record format, the composition information of the GPU error event and the extraction position of the composition information in the target format data are determined;

[0182] According to the extraction position, the composition information is extracted from the target format data;

[0183] According to the composition information, the error data of the GPU error event is obtained.

[0184] In one of the embodiments, the generation and reporting of the GPU error notification information according to the error data of the GPU error event comprises:

[0185] According to the error data of the GPU error event, the error type of the GPU error event is determined and the occurrence frequency of the GPU error event is updated;

[0186] In the case that the error type of the GPU error event is a target error type or the occurrence frequency of the GPU error event is greater than a frequency threshold, the GPU error notification information of the GPU error event is generated and reported.

[0187] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the related data need to comply with relevant regulations.

[0188] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing relevant hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the processes of the above-mentioned embodiment methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0189] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, it should be considered as the scope of the present application.

[0190] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for reporting GPU error events, characterized in that, Applied to a terminal device, the method includes: The event log file reads the target format data of the image processor GPU error events; the event log file is the GPU kernel-mode driver file. According to the preset event recording format, the target format data of the GPU error event is parsed to obtain the error data of the GPU error event; Based on the error data of the GPU error event, generate and report GPU error notification information.

2. The method according to claim 1, characterized in that, The method further includes: Monitor the notification signals of the event log file; The step of reading the target format data of the GPU error event in the event log file includes: reading the target format data of the GPU error event in the event log file when the notification signal indicates that the event log file is readable.

3. The method according to claim 2, characterized in that, After reading the target format data of the image processor GPU error event from the event log file, the method further includes: Update the flag bit of the notification signal from the first value to the second value; Wherein, when the flag bit is the first value, the notification signal is used to indicate that the event log file is readable, and when the flag bit is the second value, the notification signal is used to indicate that the event log file is unreadable.

4. The method according to claim 3, characterized in that, The notification signals of the monitoring event log file include: By using a blocking event monitoring instance, the notification signals of the event log file are monitored; Specifically, when the blocking event monitoring instance detects that the flag bit of the notification signal is the first value, it switches the GPU error event service program from a blocked state to a woken state; in the woken state, the GPU error event service program is used to read the target format data of the GPU error event from the event log file.

5. The method according to claim 2, characterized in that, The method further includes: The kernel-mode driver obtains error data of GPU error events generated by the target object. The kernel-mode driver converts the error data of the GPU error event into the target format data and writes the target format data into the event log file.

6. The method according to claim 5, characterized in that, After writing the target format data into the event log file, the method further includes: Update the flag bit of the notification signal from the second value to the first value.

7. The method according to claim 5, characterized in that, The target objects include the GPU, the GPU's kernel-mode driver, and the user program corresponding to the GPU.

8. The method according to claim 1, characterized in that, The step of parsing the target format data of the GPU error event according to a preset event recording format to obtain the error data of the GPU error event includes: Based on the preset event recording format, determine the component information of the GPU error event and the extraction location of the component information in the target format data; Based on the extraction location, extract the composition information from the target format data; Based on the composition information, the error data of the GPU error event is obtained.

9. The method according to claim 1, characterized in that, The step of generating and reporting GPU error notification information based on the error data of the GPU error event includes: Based on the error data of the GPU error event, determine the error type of the GPU error event and update the occurrence count of the GPU error event; If the error type of the GPU error event is the target error type or the number of occurrences of the GPU error event exceeds the number threshold, a GPU error notification message for the GPU error event is generated and reported.

10. A GPU error event reporting device, characterized in that, Applied to a terminal device, the device includes: The read / write module is used to read target format data of GPU error events from the event log file, which is the GPU kernel-mode driver file; The parsing module is used to parse the target format data of the GPU error event according to the preset event recording format to obtain the error data of the GPU error event; The reporting module is used to generate and report GPU error notification information based on the error data of the GPU error event.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.