A branch merging system and branch merging method for multi-path parallel execution

By introducing the execution behavior decision logic module, branch merge prediction table, branch merge unit and branch information record stack into the branch merge system, the problem that the existing technology can only support parallel execution of warp under one branch path is solved, and multiple The parallel execution of warps under branch paths improves the execution performance of the GPGPU architecture.

CN113778529BActive Publication Date: 2024-09-20XIDIAN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111072116.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-14
Publication Date
2024-09-20
Estimated Expiration
2041-09-14

AI Technical Summary

Technical Problem

Existing branch merging technology can only support the parallel execution of warp under one branch path, and fails to realize the parallel execution of warp under multiple branch paths, which limits the execution performance of the GPGPU architecture.

Method used

A multi-path parallel execution branch merge system is designed, including an execution behavior decision logic module, a branch merge prediction table, a branch merge unit and a branch information recording stack. Through these modules, the merge information of the warp is predicted and recorded, and the issue module is controlled to complete the warp. Parallel scheduling enables parallel execution of warps under multi-branch paths.

Benefits of technology

It effectively realizes the parallel execution of warp under multi-branch paths and improves the execution performance of GPGPU architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113778529B
    Figure CN113778529B
Patent Text Reader

Abstract

The present invention relates to a branch merging system and a branch merging method for multi-path parallel execution. The present invention includes an execution behavior decision logic module, a branch merging prediction table, a branch merging unit and a branch information recording stack. The execution behavior decision logic module is respectively connected to the branch merging unit and the branch information recording stack, the branch merging unit is respectively connected to the branch merging prediction table and the branch information recording stack, the branch information recording stack is connected to the execution behavior decision logic module, and the branch merging prediction table is used to predict whether each warp currently executing the branch separation instruction needs to be merged; the branch merging unit completes the merging of warps under different branch paths when a branch instruction is executed; the branch information recording stack simultaneously records the execution information of warps under different branch paths; the execution behavior decision logic module simultaneously records the warps that can be scheduled for execution in parallel under the main branch path and the remaining branch paths, and controls the issue module to complete the warp parallel scheduling. The present invention effectively realizes the parallel execution of warps under multiple branch paths.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer system architecture, and in particular relates to a branch merging system and a branch merging method for multi-path parallel execution. Background Art

[0002] Branch merging technology merges low-parallelism warps under the same instruction path into a smaller number of high-parallelism warps, thereby improving the execution performance of the GPGPU architecture. Currently, public research includes branch merging technologies such as TBC and Lane-aware, but they are all based on the design of block-wide stack structure, thus only supporting the execution of warps under one branch path at a time, and no related content supporting the parallel execution of warps under multiple branch paths has been found. Summary of the invention

[0003] In order to solve the above technical problems existing in the background technology, the present invention provides a branch merging system and a branch merging method for multi-path parallel execution, which effectively realize the parallel execution of warps under multiple branch paths.

[0004] The technical solution of the present invention is: the present invention is a branch merging system for multi-path parallel execution, which is special in that: the system includes an execution behavior decision logic module, a branch merging prediction table, a branch merging unit and a branch information recording stack, the execution behavior decision logic module is respectively connected to the branch merging unit and the branch information recording stack, the branch merging unit is respectively connected to the branch merging prediction table and the branch information recording stack, the branch information recording stack is connected to the execution behavior decision logic module, and the branch merging prediction table is used to predict whether each warp currently executing the branch separation instruction needs to be merged; the branch merging unit completes the merging of warps under different branch paths when a branch instruction is executed; the branch information recording stack simultaneously records the execution information of warps under different branch paths; the execution behavior decision logic module simultaneously records the warps that can be scheduled for execution in parallel under the main branch path and the remaining branch paths, and controls the issue module to complete the parallel scheduling of warps.

[0005] Furthermore, the execution behavior decision logic module determines the warps under different branch paths that can be scheduled for execution in the issue module at the same time through two internal block-wide flags; when the warp scheduled for execution in the issue module in this cycle encounters a branch instruction separation point or a branch instruction recovery point, it receives the reset signal sent by the issue module and resets the internal flag bit corresponding to this warp to 0; when all flag bits in warp_mask_t are 0, it is determined that if the current point is a branch instruction separation point, the branch merging unit is controlled to complete the branch merging operation; if the current point is a branch instruction recovery point, the top entry information of the branch information record stack is taken to set the internal flag mark to indicate the warps that can be scheduled for execution in parallel during the next execution.

[0006] Furthermore, the branch behavior prediction table receives the branch instruction PC value from the issue module, and returns the merge status corresponding to the PC value to the issue module; receives the PC value and merge status information from the branch merge unit, and when there is an entry corresponding to the PC inside, uses the merge status information from the branch merge unit to update the status information function domain corresponding to the entry; when there is no entry corresponding to the PC inside, a new entry is allocated in the table to record the current PC value and merge status information.

[0007] Furthermore, the branch merging unit stores the branch information generated from the issue unit when each warp executes to the branch instruction separation point; receives the merge control signal of the execution behavior determination logic module to complete the merge of warps under different instruction paths; when the branch merge brings benefits, the top of the branch information record stack is updated with the information of each instruction path after the merge is completed; when the branch merge does not bring performance benefits, the branch information before the merge is directly used to update the issue module; and the branch behavior prediction table is updated to record the synchronization status of the current instruction.

[0008] Furthermore, the branch information recording stack receives the instruction path information transmitted by the branch merging unit and updates the top entry of the stack; receives the flag signal issued by the execution behavior decision logic module and judges the status function domain at the top of the stack. If it is false, it means that the first path of the two branch paths is currently executed to the branch instruction recovery point, and thus the rightmask function domain at the top of the stack is used to update the leftmask function domain at the top of the stack and the flag in the execution behavior decision logic module; if the status function domain is true, the top entry of the stack is popped out, and the leftmask and rightmask at the new top of the stack are directly used to update the flag in the execution behavior decision logic module.

[0009] A branch merging method of the branch merging system for multi-path parallel execution is special in that the method comprises the following steps:

[0010] 1) The execution behavior decision logic module uses two internal block-wide flags to determine the warps under different branch paths that can be scheduled for execution in the issue module at the same time; when the warp scheduled for execution in the issue module in this cycle encounters a branch instruction separation point or a branch instruction recovery point, it receives the reset signal sent by the issue module and resets the internal flag bit corresponding to this warp to 0; when all flag bits in warp_mask_t are 0, it determines that if the current point is a branch instruction separation point, it controls the branch merging unit to complete the branch merging operation; if it determines that the current point is a branch instruction recovery point, it takes the top entry information of the branch information record stack to set the internal flag mark to indicate the warps that can be scheduled for execution in parallel during the next execution;

[0011] 2) The branch behavior prediction table receives the branch instruction PC value from the issue module and returns the merge status corresponding to the PC value to the issue module; receives the PC value and merge status information from the branch merge unit, and when there is an entry corresponding to the PC inside, uses the merge status information from the branch merge unit to update the status information function domain corresponding to the entry; when there is no entry corresponding to the PC inside, a new entry is allocated in the table to record the current PC value and merge status information;

[0012] 3) The branch merging unit stores the branch information generated by each warp when it executes to the branch instruction separation point from the issue unit; receives the merge control signal from the execution behavior decision logic module to complete the merging of warps under different instruction paths; when the branch merging brings benefits, the top of the branch information recording stack is updated with the information of each instruction path after the merging is completed; when the branch merging does not bring performance benefits, the branch information before the merging is directly used to update the issue module; and the branch behavior prediction table is updated to record the synchronization status of the current instruction;

[0013] 4) The branch information recording stack receives the instruction path information transmitted by the branch merging unit and updates the top entry of the stack; receives the flag signal sent by the execution behavior decision logic module and judges the status function domain at the top of the stack. If it is false, it means that the first path of the two branch paths is currently executed to the branch instruction recovery point, and thus the rightmask function domain at the top of the stack is used to update the leftmask function domain at the top of the stack and the flag in the execution behavior decision logic module; if the status function domain is true, the top entry of the stack is popped out, and the leftmask and rightmask at the new top of the stack are directly used to update the flag in the execution behavior decision logic module.

[0014] The present invention provides a branch merging system and a branch merging method for multi-path parallel execution, wherein the branch merging system comprises an execution behavior decision logic module, a branch merging prediction table, a branch merging unit and a branch information recording stack. The branch merging prediction table is used to predict whether each warp currently executing a branch separation instruction needs to be merged; the branch merging logic is used to complete the merging of warps under different branch paths when a branch instruction is executed; the branch information recording stack is used to simultaneously record the execution information of warps under different branch paths; the execution behavior decision logic is used to simultaneously record the warps that can be scheduled for execution in parallel under the main branch path and the remaining branch paths, and the issue module is controlled to complete the warp parallel scheduling, thereby effectively realizing the parallel execution of warps under multiple instruction paths. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic diagram of the modules of the present invention. DETAILED DESCRIPTION

[0016] The technical solution of the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0017] See Figure 1 The structure of a specific embodiment of the branch merging system for multi-path parallel execution of the present invention includes an execution behavior decision logic module, a branch merging prediction table, a branch merging unit and a branch information recording stack. The execution behavior decision logic module is respectively connected to the branch merging unit and the branch information recording stack, the branch merging unit is respectively connected to the branch merging prediction table and the branch information recording stack, the branch information recording stack is connected to the execution behavior decision logic module, and the issue module is respectively connected to the execution behavior decision logic module, the branch merging prediction table and the branch merging unit. The branch merging prediction table is used to predict whether each warp currently executing the branch separation instruction needs to be merged; the branch merging unit completes the merging of warps under different branch paths when a branch instruction is executed; the branch information recording stack simultaneously records the execution information of warps under different branch paths; the execution behavior decision logic module simultaneously records the warps that can be scheduled for execution in parallel under the main branch path and the remaining branch paths, and controls the issue module to complete the parallel scheduling of warps. Among them:

[0018] The execution behavior decision logic module uses two internal block-wide flags to determine the warps under different branch paths that can be scheduled for execution in the issue module at the same time. When the warp scheduled for execution in the issue module in this cycle encounters a branch instruction separation point or a branch instruction recovery point, it receives the reset signal sent by the issue module and resets the internal flag bit corresponding to this warp to 0. When all flag bits in warp_mask_t are 0, it is determined that if the current point is a branch instruction separation point, the branch merging unit is controlled to complete the branch merging operation. If the current point is a branch instruction recovery point, the top entry information of the branch information record stack is taken to set the internal flag mark to indicate the warps that can be scheduled for execution in parallel during the next execution.

[0019] The branch behavior prediction table receives the branch instruction PC value from the issue module and returns the merge status corresponding to this PC value to the issue module; it receives the PC value and merge status information from the branch merge unit, and when there is an entry corresponding to this PC inside, it uses the merge status information from the branch merge unit to update the status information function domain corresponding to the entry; when there is no entry corresponding to this PC inside, a new entry is allocated in the table to record the current PC value and merge status information.

[0020] The branch merging unit stores the branch information generated by each warp when it executes to the branch instruction separation point from the issue unit; receives the merge control signal of the execution behavior decision logic module to complete the merging of warps under different instruction paths; when the branch merging brings benefits, the top of the branch information recording stack is updated with the information of each instruction path after the merging is completed; when the branch merging does not bring performance benefits, the branch information before the merging is directly used to update the issue module; and the branch behavior prediction table is updated to record the synchronization status of the current instruction.

[0021] The branch information recording stack receives the instruction path information transmitted by the branch merging unit and updates the top entry of the stack; receives the flag signal sent by the execution behavior decision logic module and judges the status function domain at the top of the stack. If it is false, it means that the first path of the two branch paths is currently executed to the branch instruction recovery point, and thus the rightmask function domain at the top of the stack is used to update the leftmask function domain at the top of the stack and the flag in the execution behavior decision logic module; if the status function domain is true, the top entry of the stack is popped out, and the leftmask and rightmask at the new top of the stack are directly used to update the flag in the execution behavior decision logic module.

[0022] The present invention also provides a branch merging method for multi-path parallel execution, the method comprising the following steps:

[0023] 1) The execution behavior decision logic module uses two internal block-wide flags to determine the warps under different branch paths that can be scheduled for execution in the issue module at the same time; when the warp scheduled for execution in the issue module in this cycle encounters a branch instruction separation point or a branch instruction recovery point, it receives the reset signal sent by the issue module and resets the internal flag bit corresponding to this warp to 0; when all flag bits in warp_mask_t are 0, it determines that if the current point is a branch instruction separation point, it controls the branch merging unit to complete the branch merging operation; if it determines that the current point is a branch instruction recovery point, it takes the top entry information of the branch information record stack to set the internal flag mark to indicate the warps that can be scheduled for execution in parallel during the next execution;

[0024] 2) The branch behavior prediction table receives the branch instruction PC value from the issue module and returns the merge status corresponding to the PC value to the issue module; receives the PC value and merge status information from the branch merge unit, and when there is an entry corresponding to the PC inside, uses the merge status information from the branch merge unit to update the status information function domain corresponding to the entry; when there is no entry corresponding to the PC inside, a new entry is allocated in the table to record the current PC value and merge status information;

[0025] 3) The branch merging unit stores the branch information generated by each warp when it executes to the branch instruction separation point from the issue unit; receives the merge control signal from the execution behavior decision logic module to complete the merging of warps under different instruction paths; when the branch merging brings benefits, the top of the branch information recording stack is updated with the information of each instruction path after the merging is completed; when the branch merging does not bring performance benefits, the branch information before the merging is directly used to update the issue module; and the branch behavior prediction table is updated to record the synchronization status of the current instruction;

[0026] 4) The branch information recording stack receives the instruction path information transmitted by the branch merging unit and updates the top entry of the stack; receives the flag signal sent by the execution behavior decision logic module and judges the status function domain at the top of the stack. If it is false, it means that the first path of the two branch paths is currently executed to the branch instruction recovery point, and thus the rightmask function domain at the top of the stack is used to update the leftmask function domain at the top of the stack and the flag in the execution behavior decision logic module; if the status function domain is true, the top entry of the stack is popped out, and the leftmask and rightmask at the new top of the stack are directly used to update the flag in the execution behavior decision logic module.

[0027] The content of the present invention and the technical content not specifically described in the above embodiments are the same as the prior art.

[0028] The above are only specific embodiments disclosed in the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A branch merging system for multi-path parallel execution, characterized in that: The system includes an execution behavior decision logic module, a branch merge prediction table, a branch merge unit and a branch information recording stack, wherein the issue module is respectively connected to the execution behavior decision logic module, the branch merge prediction table and the branch merge unit, the execution behavior decision logic module is respectively connected to the branch merge unit and the branch information recording stack, the branch merge unit is respectively connected to the branch merge prediction table and the branch information recording stack, the branch information recording stack is connected to the execution behavior decision logic module, the branch merge prediction table is used to predict whether each warp currently executing the branch separation instruction needs to be merged; the branch merge unit completes the merger of warps under different branch paths when a branch instruction is executed; the branch information recording stack simultaneously records the execution information of warps under different branch paths; the execution behavior decision logic module simultaneously records the warps that can be scheduled for execution in parallel under the main branch path and the remaining branch paths, and controls the iss The ue module completes the parallel scheduling of warps. The execution behavior decision logic module determines the warps under different branch paths that can be scheduled for execution in the issue module at the same time through two internal block-wide flag tags. When the warp scheduled for execution in the current cycle in the issue module encounters a branch instruction separation point or a branch instruction recovery point, it receives the reset signal sent by the issue module and resets the internal flag bit corresponding to this warp to 0. When all the flag bits in one of the block-wide flag tags warp_mask_t are 0, it is determined that if the current point is a branch instruction separation point, the branch merging unit is controlled to complete the branch merging operation. If it is determined that the current point is a branch instruction recovery point, the top entry information of the branch information record stack is taken to set the internal flag tag to indicate the warps that can be scheduled for execution in parallel during the next execution.

2. The branch merging system for multi-path parallel execution according to claim 1, characterized in that: The branch merge prediction table receives the branch instruction PC value from the issue module, and returns the merge status corresponding to the PC value to the issue module; receives the PC value and merge status information from the branch merge unit, and when there is an entry corresponding to the PC inside, uses the merge status information from the branch merge unit to update the status information function domain corresponding to the entry; when there is no entry corresponding to the PC inside, a new entry is allocated in the table to record the current PC value and merge status information.

3. The branch merging system for multi-path parallel execution according to claim 2, characterized in that: The branch merging unit stores branch information generated when each warp executes to the branch instruction separation point from the issue module; receives a merge control signal from the execution behavior decision logic module to complete the merging of warps under different instruction paths; when the branch merging brings benefits, the top of the branch information record stack is updated with the information of each instruction path after the merging is completed; when the branch merging does not bring performance benefits, the branch information before the merging is directly used to update the issue module; Update the branch merge prediction table to record the synchronization status of the current instruction.

4. The branch merging system for multi-path parallel execution according to claim 3, characterized in that: The branch information recording stack receives the instruction path information transmitted by the branch merging unit and updates the top entry of the stack; receives the flag signal sent by the execution behavior decision logic module and judges the status function domain at the top of the stack. If it is false, it means that the first path of the two branch paths is currently executed to the branch instruction recovery point, and thus the rightmask function domain at the top of the stack is used to update the leftmask function domain at the top of the stack and the flag in the execution behavior decision logic module; if the status function domain is true, the top entry of the stack is popped out, and the leftmask and rightmask at the new top of the stack are directly used to update the flag in the execution behavior decision logic module.

5. A branch merging method of a branch merging system for multi-path parallel execution according to claim 1, characterized in that: The method comprises the following steps: 1) The execution behavior decision logic module determines the warps under different branch paths that can be scheduled for execution in the issue module at the same time through two internal block-wide flags. When the warp scheduled for execution in the issue module in this cycle encounters a branch instruction separation point or a branch instruction recovery point, it receives the reset signal sent by the issue module and resets the internal flag bit corresponding to this warp to 0. When all the flag bits in one of the block-wide flags warp_mask_t are 0, it is determined that the current point is a branch instruction separation point, and the branch merging unit is controlled to complete the branch merging operation. If it is determined that the current point is a branch instruction recovery point, the top entry information of the branch information record stack is taken to set the internal flag to indicate the warps that can be scheduled for execution in parallel during the next execution. 2) The branch merge prediction table receives the branch instruction PC value from the issue module and returns the merge status corresponding to the PC value to the issue module; receives the PC value and merge status information from the branch merge unit, and when there is an entry corresponding to the PC inside, uses the merge status information from the branch merge unit to update the status information function domain corresponding to the entry; when there is no entry corresponding to the PC inside, a new entry is allocated in the table to record the current PC value and merge status information; 3) The branch merging unit stores the branch information generated by each warp when it reaches the branch instruction separation point from the issue module; receives the merge control signal from the execution behavior decision logic module to complete the merging of warps under different instruction paths; when the branch merging brings benefits, the top of the branch information recording stack is updated with the information of each instruction path after the merging is completed; when the branch merging does not bring performance benefits, the branch information before the merging is directly used to update the issue module; and the branch merging prediction table is updated to record the synchronization status of the current instruction; 4) The branch information recording stack receives the instruction path information transmitted by the branch merging unit and updates the top entry of the stack; receives the flag signal sent by the execution behavior decision logic module and judges the status function domain at the top of the stack. If it is false, it means that the first path of the two branch paths is currently executed to the branch instruction recovery point, and thus the rightmask function domain at the top of the stack is used to update the leftmask function domain at the top of the stack and the flag in the execution behavior decision logic module; if the status function domain is true, the top entry of the stack is popped out, and the leftmask and rightmask at the new top of the stack are directly used to update the flag in the execution behavior decision logic module.

Citation Information

Patent Citations

  • SIMT condition branch processing device and method

    CN112579164A

  • Execution efficiency in a single-program, multiple-data processor

    US20140164737A1

  • Uniform predicates in shaders for graphics processing units

    US20170243320A1

  • Control flow optimization in graphics processing unit

    WO2020181670A1