A GPU interrupt reporting method, device, equipment and medium
Through cross-clock domain processing and flexible configuration of interrupt reporting methods, the problem of GPU interrupt processing burden and adaptability to multiple interrupt methods is solved, and efficient interrupt processing and efficiency improvement are achieved.
Patent Information
- Application Number
- CN202410790657.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-19
AI Technical Summary
In existing GPU designs, frequent interrupt requests increase the burden on the host HOST under high load conditions, and cannot effectively respond to multiple interrupt methods, resulting in low interrupt processing efficiency.
By responding to the interrupt signal, processing across clock domains, and configuring the interrupt reporting method based on the type of interrupt source, deciding whether to report it to the coprocessor controller first for processing and then reporting it to the host, configuring the scheduling method according to the number and priority of the interrupt source, and through the interrupt The context information message is reported to the host, and a new message is sent after receiving the confirmation.
It implements a flexible interrupt processing strategy, reduces interrupt burden, improves interrupt processing efficiency, adapts to scenarios with multiple interrupt sources and different interrupt processing methods, and improves the flexibility of chip design and the balance of performance, power consumption, and area.
Smart Images

Figure CN118363737B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a GPU interrupt reporting method, device, equipment and medium. Background Art
[0002] In computer systems, GPUs (Graphics Processing Units) are typically used to process graphics and parallel computing tasks. GPUs can report events or status changes to the host system through the Interrupt mechanism. These interrupts can be used to notify the host about task completion, error conditions, data transfer, etc., which require HOST intervention or recovery.
[0003] IRQ (interrupt request) is a mechanism used to notify the HOST that an event needs to be processed. It can be issued by a hardware device or a software program. Interrupt scheduling refers to the process of determining which interrupt should be processed according to certain priority rules when multiple interrupt requests occur at the same time. Interrupts are usually divided into different priorities, and high-priority interrupt requests should be responded to earlier to ensure the timeliness and reliability of the system. Interrupt processing burden: Frequent interrupts may increase the burden on the host HOST, especially under high load conditions. Handling a large number of interrupts may cause the HOST's time to be consumed on the interrupt handler rather than on the actual application. In addition, there is only one hardware interrupt reporting method in common GPU designs, which is directly reported to the HOST after the interrupt is generated, but this method cannot cope with the situation where there are multiple interrupt methods, and a new interrupt reporting mechanism is needed to deal with this situation.
[0004] Therefore, when there are multiple interrupt sources in the GPU and different interrupt processing methods are used, how to flexibly configure them according to the requirements of different scenarios, reduce the interrupt burden, and improve interrupt processing efficiency is an urgent problem to be solved. Summary of the invention
[0005] The object of the present invention is to provide a GPU interrupt reporting method, apparatus, device and medium, so as to at least partially solve the above-mentioned problem.
[0006] According to one aspect of the present disclosure, a GPU interrupt reporting method is proposed, comprising:
[0007] Step S1, in response to receiving an interrupt signal from an interrupt source, processing the external interrupt signal across clock domains,
[0008] Step S2, configuring the interrupt reporting mode based on at least the interrupt source type, wherein the reporting mode includes whether to report to the host, whether to report to the coprocessor controller for processing first and then report to the host,
[0009] Step S3, determining the scheduling method according to the number of interrupt sources and the interrupt source priority configuration,
[0010] Step S4, reporting the interrupt context information message to the host,
[0011] Step S5, in response to receiving a confirmation response from the host, sending a new interrupt context information message to the host.
[0012] In some embodiments, the method also includes configuring the interrupt reporting mode based at least on the interrupt source type, specifically, configuring the enable register of the interrupt source, wherein each interrupt source has an independent enable bit to control whether to report to the host, and an independent enable bit to control whether to report to the coprocessor controller.
[0013] In some embodiments, the method further includes, for a situation where the information is first reported to the coprocessor controller for processing and then reported to the host, the coprocessor controller triggers an interrupt through firmware software after processing.
[0014] In some embodiments, the method further includes: the interrupt context information message includes at least an interrupt source identifier, a terminal type identifier, specific site information of the interrupt occurrence time, and timestamp information.
[0015] According to another aspect of the present disclosure, a GPU interrupt reporting device is provided, comprising:
[0016] The interrupt signal response module is used to respond to the interrupt signal received from the interrupt source and process the external interrupt signal across the clock domain.
[0017] An interrupt mode configuration module is used to configure an interrupt reporting mode based on at least the interrupt source type, wherein the reporting mode includes whether to report to the host, whether to report to the coprocessor controller for processing first and then report to the host,
[0018] The scheduling mode configuration module is used to determine the scheduling mode according to the number of interrupt sources and the interrupt source priority configuration.
[0019] The interrupt message reporting module is used to report the interrupt context information message to the host.
[0020] The new message sending module is used to send a new interrupt context information message to the host in response to receiving a confirmation response from the host.
[0021] In some embodiments, the interrupt mode configuration module is further used to configure the enable register of the interrupt source, wherein each interrupt source has an independent enable bit to control whether to report to the host, and an independent enable bit to control whether to report to the coprocessor controller.
[0022] In some embodiments, the interrupt mode configuration module is also used for triggering an interrupt through firmware software in the case where the signal is first reported to the coprocessor controller for processing and then reported to the host.
[0023] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps in the method of any of the above embodiments by calling the computer program stored in the memory.
[0024] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program executes the steps in any of the above method embodiments when executed by a processor.
[0025] The present disclosure provides a GPU interrupt reporting method, device, equipment and medium, the method comprising, in response to receiving an interrupt signal from an interrupt source, processing an external interrupt signal therein across clock domains, configuring an interrupt reporting mode based at least on the interrupt source type, the reporting mode including whether to report to a host, whether to report to a coprocessor controller for processing before reporting to the host, determining a scheduling mode according to the number of interrupt sources and the interrupt source priority configuration, reporting to the host via an interrupt context information message, and sending a new interrupt context information message to the host in response to receiving a confirmation response from the host. This method uses a custom interrupt context information protocol to notify the host to handle the corresponding transactions, especially solving the interrupt reporting problem when there are multiple interrupt sources and different interrupt processing methods. For example, some interrupts require the internal coprocessor to perform some preprocessing before the FW (Firmware) software triggers the interrupt to notify the host for subsequent processing; at the same time, the control module can also be flexibly configured according to the requirements of different scenarios to reduce the interrupt burden, and use RR (Round-Robin) scheduling for multiple interrupt sources, which improves the flexibility of chip design and the balance of PPA (Performance, Power, Area). BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a GPU interrupt reporting method provided in an embodiment of the present application.
[0027] Figure 2 A schematic diagram of the system structure provided in an embodiment of the present application.
[0028] Figure 3 A schematic diagram of the interrupt control and scheduling module structure provided in an embodiment of the present application.
[0029] Figure 4 A schematic diagram of the structure of a GPU interrupt reporting device provided in an embodiment of the present application.
[0030] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0032] Embodiment 1
[0033] Specifically, see Figure 1 , is a GPU interrupt reporting method provided by the present disclosure. The basic implementation process of this embodiment is as follows:
[0034] Step S1, in response to receiving an interrupt signal from an interrupt source, processing the external interrupt signal across clock domains.
[0035] Because different interrupt sources may come from different clock domains, CDC (Clock Domain Crossing) processing is required to cross to the destination clock domain of the processing module.
[0036] Step S2, configuring the interrupt reporting mode based on at least the interrupt source type, wherein the reporting mode includes whether to report to the HOST, and whether to report to the coprocessor controller for processing first and then report to the HOST.
[0037] In some embodiments, the interrupt sources of multiple sub-blocks configure the ENABLE registers of internal and external interrupt sources according to the actual application scenarios to determine which ones need to be reported to the HOST. At the same time, the ENABLE registers of external and internal interrupt sources are configured to determine which ones need to be reported to the coprocessor controller first. After the coprocessor controller handles the necessary tasks, the software triggers the interrupt COOKIE (interrupt context information) report. In some embodiments, the coprocessor is integrated in the GPU and adopts the RISC-V architecture. In some embodiments, the interrupt preprocessed by the coprocessor is triggered by the FW (Firmware) software to notify the HOST for subsequent processing.
[0038] Step S3, determining the scheduling method according to the number of interrupt sources and the interrupt source priority configuration.
[0039] After configuration is completed, the interrupt sources of multiple sub-blocks may be triggered at the same time. You need to keep a record and then send it to the scheduling module for processing. The scheduling module will select an interrupt source to process through the time slice RR (Round-Robin) scheduling. In some embodiments, according to certain scenarios, if software needs to trigger an interrupt, the priority of the triggered interrupt is increased and sent first.
[0040] Step S4: Report to the HOST via a COOKIE (interrupt context information) message.
[0041] The interrupt information is assembled into a COOKIE (interrupt context information) message through the message processing module, and then reported to the HOST (host) through the NOC (on-chip network) bus. In one embodiment, the COOKIE (interrupt context information) protocol used includes 256 bits of data, which is sent in 8 clock cycles. Since there are multiple interrupt sources and different types of interrupts in multiple sources, the most basic thing in the protocol is to distinguish the interrupt source ID (identity identifier) and the specific interrupt type. At the same time, it also needs to include the timestamp information sent. The timestamp is generated by a special timestamp module. The specific protocol of the message can define some specific on-site information of the interruption time as needed. The interruption may be a functional interruption or an abnormal interruption, which can help to understand the on-site information of the interruption more quickly.
[0042] Step S5, in response to receiving the ACK (acknowledgement) from the HOST (host), a new COOKIE (interrupt context information) message is sent to the HOST (host).
[0043] Waiting for the ACK (response) from the HOST (host). After receiving it, you can start the next transmission. The GPU starts a new round of interrupt COOKIE (interrupt context information) reporting processing, in which the hardware is used to detect whether the confirmation ACK (response) from the HOST (host) is received.
[0044] A specific example of the GPU interrupt reporting method provided by this embodiment is described below with reference to the accompanying drawings.
[0045] like Figure 2 As shown in the figure, the position of INT_CTRL_SCH_MODULE (interrupt control and scheduling module) in the whole system is described. This module is the interrupt source module (INT_SRC) that processes the interrupts of multiple subsystems inside the GPU, and then reports them to the HOST (host) through the NOC (network on chip) channel.
[0046] The interrupt control and scheduling module needs to receive interrupt signals from different clock domains, so it is necessary to add CDC (cross-clock) processing, which is completed by hardware. At the same time, the number of interrupt sources is used to determine whether to use one-level RR (polling) or multi-level RR (polling) scheduling, which can be passed to the interrupt control and scheduling module through parameters.
[0047] like Figure 3 As shown in the INT_CTRL_SCH_MODULE (interrupt control and scheduling module) structure diagram, in the Pre-processing module, assuming that there are three external interrupt sources, each interrupt source has a 16-bit interrupt, corresponding to EXT_INT_SRC0[15:0], EXT_INT_SRC1[15:0], EXT_INT_SRC2[15:0], so the two-level RR (polling) scheduling method is selected. Assuming that each interrupt source has only 4 bits of interrupt, corresponding to EXT_INT_SRC0[3:0], EXT_INT_SRC1[3:0], EXT_INT_SRC2[3:0], you can choose the first-level RR (polling) method, which can be selected through parameters according to the actual application scenario.
[0048] Because the internal interrupt sources are in the same clock domain as the interrupt control and scheduling modules, they do not require CDC (cross-clock) processing. These are mainly interrupts generated by other internal communication mechanisms, such as mailbox communications, which can be used for communication within the GPU subsystems and are directly handed over to the coprocessor RISC-V for processing.
[0049] In the Pre-processing module, it is necessary to determine which interrupt sources need to be reported directly to the HOST based on the actual application scenario, so that the corresponding ENABLE register can be configured to only enable the bits corresponding to the interrupts that need to be reported, which can reduce power consumption.
[0050] like Figure 3 As shown, taking the above-mentioned two-level RR (polling) as an example, the corresponding ENABLE0[15:0], ENABLE1[15:0], ENABLE2[15:0], assuming that the three interrupt sources are all low 8 bits (bits) and need to be reported directly to the HOST (host), the corresponding ENABLE can be configured to be 0xFFFF.
[0051] At the same time, in the Pre-processing module, it is necessary to determine which ones need to be processed by RISC-V before being reported to the HOST according to the actual application scenario, so that the corresponding ENABLE register can be configured. Similarly, only enabling the bits corresponding to the interrupts that need to be reported can reduce power consumption.
[0052] In one embodiment, taking the above-mentioned two-level RR (polling) as an example, assuming that the internal interrupt source INNER_INT_SRC has 20 bits, all of which need to be reported to RISC-V for processing, the corresponding ENABLE00[19:0], ENABLE01[15:0], ENABLE02[15:0], assuming that the three interrupt sources are all low 8 bits and need to be reported directly to the HOST, the corresponding ENABLE00 can be configured to 0xFFFFF, ENABLE01 and ENABLE02 are both 0xFFFF.
[0053] When the previous enable signal configuration is completed, when multiple interrupts are triggered or triggered simultaneously, the scheduling module will record the interrupt source and select an interrupt source to process through time slice RR (polling) scheduling. This process is completed by hardware.
[0054] When there is an interrupt that requires RISC-V to perform relevant processing before notifying the HOST (host), after RISC-V completes, FW (firmware) will use software to trigger the report, and enter the RR (polling) scheduling through INT_SW_Trigger (interrupt software trigger). If it is detected that this needs to be increased in priority, it will be sent first. If the previous interrupt ACK (response) has not been received, it will wait for the previous one to complete before starting this transmission.
[0055] The interrupt information is assembled into a COOKIE (interrupt context information) message through the COOKIE Processing (message processing module), and then reported to the HOST (host) through the NOC (on-chip network) bus via the COOKIE SEND (COOKIE sending) unit. In one embodiment, the COOKIE Protocol processing unit (COOKIE protocol processing unit) is used to process the COOKIE (interrupt context information) protocol. The protocol includes 256 bits of data, which is sent in 8 clock cycles. Since there are multiple sources and different types of interrupts in multiple sources, the most basic thing in the protocol is to distinguish the source ID (identity identifier) and the specific interrupt type. At the same time, it is also necessary to include the timestamp information sent. The timestamp is generated by a special timestamp module. The specific protocol of the message can define some specific on-site information of the interruption time as needed. The interruption may be a functional interruption or an abnormal interruption, which can help to understand the on-site information of the interruption more quickly.
[0056] Waiting for the ACK (response) from the HOST (host). After receiving it, you can start the next transmission. The GPU starts a new round of interrupt COOKIE (interrupt context information) reporting processing. This is done by the hardware to detect whether the confirmation ACK (response) from the HOST (host) is received.
[0057] In summary, the embodiment of the present invention provides a flexible and efficient interrupt COOKIE (interrupt context information) reporting method for GPU. Based on a certain interrupt control scheduling strategy, the method solves the interrupt reporting problem when there are multiple hardware interrupt sources with different interrupt processing methods. The interrupt control scheduling module can also be flexibly configured according to different scenario requirements, which improves the flexibility of chip design, realizes fair and efficient scheduling, and achieves PPA (Performance, Power, Area) balance.
[0058] Embodiment 2
[0059] To achieve the above purpose, this embodiment proposes a GPU interrupt reporting device. For details, please refer to Figure 4 ,include,
[0060] The interrupt signal response module is used to respond to the interrupt signal received from the interrupt source and process the external interrupt signal across the clock domain.
[0061] An interrupt mode configuration module is used to configure an interrupt reporting mode based on at least the interrupt source type, wherein the reporting mode includes whether to report to the HOST, whether to report to the coprocessor controller for processing first and then report to the HOST,
[0062] The scheduling mode configuration module is used to determine the scheduling mode according to the number of interrupt sources and the interrupt source priority configuration.
[0063] The interrupt message reporting module is used to form a COOKIE (interrupt context information) message through the interrupt information and report it to the HOST (host).
[0064] The new message sending module is used for sending a new COOKIE (interrupt context information) message to the HOST (host) in response to receiving an ACK (acknowledgement) from the HOST (host).
[0065] In some embodiments, the device also includes configuring the interrupt reporting method at least based on the interrupt source type, specifically, configuring the ENABLE register (enable register) of the interrupt source, wherein each interrupt source has an independent ENABLE bit (enable bit) to control whether to report to the HOST (host), and an independent ENABLE bit (enable bit) to control whether to report to the coprocessor controller.
[0066] In some embodiments, the device further includes, for a situation where the information is first reported to the coprocessor controller for processing and then reported to the HOST, the coprocessor controller triggers an interrupt through the Firmware software after processing.
[0067] In some embodiments, the COOKIE (interruption context information) message includes at least an interruption source identifier, a terminal type identifier, specific site information at the time when the interruption occurs, and timestamp information.
[0068] Embodiment 3
[0069] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal or a server. Figure 5 As shown, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0070] The electronic device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0071] The processor 501 is the control center of the electronic device 500. It uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes various functions of the electronic device 500 and processes data by running or loading software programs (computer programs) and / or units stored in the memory 502, and calling data stored in the memory 502, thereby monitoring the electronic device 500 as a whole.
[0072] In the embodiment of the present application, the processor 501 in the electronic device 500 will load instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:
[0073] Step S1, in response to receiving an interrupt signal from an interrupt source, processing the external interrupt signal across clock domains,
[0074] Step S2, configuring the interrupt reporting mode based on at least the interrupt source type, the reporting mode including whether to report to the HOST, whether to report to the coprocessor controller for processing first and then report to the HOST,
[0075] Step S3, determining the scheduling method according to the number of interrupt sources and the interrupt source priority configuration,
[0076] Step S4, the interrupt information is used to form a COOKIE (interrupt context information) message and report it to the HOST (host).
[0077] Step S5, in response to receiving the ACK (acknowledgement) from the HOST (host), a new COOKIE (interrupt context information) message is sent to the HOST (host).
[0078] The specific implementation of the above operations can be found in the aforementioned embodiments, which will not be described in detail here.
[0079] Optional, such as Figure 5 As shown, the electronic device 500 further includes: an interrupt reporting module 503, a communication module 504, an input unit 505 and a power supply 506. The processor 501 is electrically connected to the interrupt reporting module 503, the communication module 504, the input unit 505 and the power supply 506 respectively. Those skilled in the art can understand that Figure 5 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0080] The interrupt reporting module 503 may be used to implement reporting of GPU interrupt information.
[0081] The communication module 504 may be used to communicate with other devices.
[0082] The input unit 505 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0083] The power supply 506 is used to supply power to various components of the electronic device 500. Optionally, the power supply 506 can be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 506 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0084] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] Embodiment 4
[0086] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0087] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps of a GPU interrupt reporting method provided in an embodiment of the present application. For example, the computer program can execute the following steps:
[0088] Step S1, in response to receiving an interrupt signal from an interrupt source, processing the external interrupt signal across clock domains,
[0089] Step S2, configuring the interrupt reporting mode based on at least the interrupt source type, the reporting mode including whether to report to the HOST, whether to report to the coprocessor controller for processing first and then report to the HOST,
[0090] Step S3, determining the scheduling method according to the number of interrupt sources and the interrupt source priority configuration,
[0091] Step S4, the interrupt information is used to form a COOKIE (interrupt context information) message and report it to the HOST (host).
[0092] Step S5, in response to receiving the ACK (acknowledgement) from the HOST (host), a new COOKIE (interrupt context information) message is sent to the HOST (host).
[0093] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0094] The computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), a magnetic disk or an optical disk, etc.
[0095] Since the computer program stored in the storage medium can execute the steps in any GPU interrupt reporting method provided in the embodiments of the present application, the beneficial effects that can be achieved by any GPU interrupt reporting method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0096] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor 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.
[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0099] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.
Claims
1. A GPU interrupt reporting method, characterized in that: The method comprises: Step S1, in response to receiving an interrupt signal from an interrupt source, processing the external interrupt signal across clock domains, Step S2, configuring the interrupt reporting mode based on at least the interrupt source type, the reporting mode including whether to report to the host, whether to report to the coprocessor controller for processing first and then report to the host, for the situation that it needs to be reported to the coprocessor controller for processing first and then reported to the host, the coprocessor controller triggers the interrupt through firmware or software after processing, if the coprocessor can handle the interrupt by itself, there is no need to trigger the interrupt to notify the host, Step S3, determine the scheduling mode according to the number of interrupt sources and the interrupt source priority configuration, and configure the first-level polling or multi-level polling, Step S4, reporting the interrupt context information message to the host, Step S5, in response to receiving a confirmation response from the host, sending a new interrupt context information message to the host.
2. The method according to claim 1, characterized in that: The interrupt reporting mode is configured at least based on the interrupt source type, specifically, configuring the enable register of the interrupt source, wherein each interrupt source has an independent enable bit to control whether to report to the host, and an independent enable bit to control whether to report to the coprocessor controller.
3. The method according to any one of claims 1-2, characterized in that: The interruption context information message includes at least an interruption source identifier, a terminal type identifier, specific site information of the interruption occurrence time, and timestamp information.
4. A GPU interrupt reporting device, characterized in that: The device comprises: The interrupt signal response module is used to respond to the interrupt signal received from the interrupt source and process the external interrupt signal across the clock domain. The interrupt mode configuration module is used to configure the interrupt reporting mode based on at least the interrupt source type, and the reporting mode includes whether to report to the host, whether to report to the coprocessor controller for processing before reporting to the host. For the situation where the interrupt needs to be reported to the coprocessor controller for processing before reporting to the host, the coprocessor controller triggers the interrupt through firmware or software after processing. If the coprocessor can handle the interrupt by itself, there is no need to trigger the interrupt to notify the host. The scheduling mode configuration module is used to determine the scheduling mode according to the number of interrupt sources and the interrupt source priority configuration, and configure the first-level polling or multi-level polling. The interrupt message reporting module is used to report the interrupt context information message to the host. The new message sending module is used to send a new interrupt context information message to the host in response to receiving a confirmation response from the host.
5. The device according to claim 4, characterized in that The device also includes: The interrupt mode configuration module is also used to configure the enable register of the interrupt source, wherein each interrupt source has an independent enable bit to control whether to report to the host, and an independent enable bit to control whether to report to the coprocessor controller.
6. The device according to any one of claims 4-5, characterized in that: The interruption context information message includes at least an interruption source identifier, a terminal type identifier, specific site information of the interruption occurrence time, and timestamp information.
7. An electronic device, characterized in that: It comprises a memory storing executable program code and a processor coupled to the memory; wherein the processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 3.
8. 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 3 is performed.
Citation Information
Patent Citations
Centralized control interrupt control method, interrupt control system and chip
CN116089026A
Process synchronization method, system and equipment based on active interrupt instruction and medium
CN117389625A
