Resume Counter-Based Subroutine Execution in SIMD Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Single Instruction, Multiple Data (SIMD) processing systems face challenges in executing subroutines efficiently due to divergent thread conditions, where some threads satisfy a conditional branch while others do not, leading to asynchronous execution and reduced throughput.
Innovation Solution
The implementation of a resume counter-based approach using program module-specific Minimum Resume Counters (MINRCs) to manage divergent threads, ensuring proper control flow by controlling the execution of control flow instructions and handling divergent branch conditions through subroutine-specific MINRCs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If SIMD processing systems execute multiple threads in parallel, then throughput is improved, but divergent branch conditions cause asynchronous execution and reduce throughput
Solution Approach 1:
The system dynamically adjusts thread execution by deactivating threads that take divergent branches and reactivating them when they converge back to the main program. The control flow module monitors thread states and activates/deactivates threads based on whether they are executing main program instructions or subroutine instructions, enabling flexible handling of divergent execution paths while maintaining overall synchronous operation
Solution Approach 2:
A control flow module is introduced as an intermediary between the instruction fetch/decode stages and the execution units. This module intercepts control flow instructions, determines whether they are subroutine calls or returns, and manages thread activation/deactivation accordingly. The module also maintains a stack of minimum resume counters to track convergence points, acting as a mediator that coordinates thread synchronization without requiring stack-less execution
2Device complexity
If stack-less execution is used to reduce complexity, then device complexity is reduced, but handling of nested subroutines and control flow becomes difficult
Solution Approach 1:
The control flow module segments control flow instructions into two distinct categories: subroutine call instructions and subroutine return instructions. By identifying and separately handling these instruction types, the system can manage nested subroutines and control flow without requiring a traditional execution stack. Each segment of control flow is processed according to its specific requirements, enabling versatile subroutine handling with reduced complexity
Solution Approach 2:
The control flow module performs multiple functions: it identifies control flow instructions, determines their type (call or return), manages thread activation/deactivation, maintains minimum resume counters, and handles both main program and subroutine execution. This multi-functional approach eliminates the need for separate stack mechanisms while maintaining full subroutine handling capability
3Ease of operation
If threads are deactivated during divergent branches, then control flow is simplified, but thread reactivation overhead increases execution time
Solution Approach 1:
The system performs preliminary actions by pre-calculating and storing minimum resume counters that indicate when deactivated threads should be reactivated. These resume counters are pushed onto a stack during subroutine execution, allowing threads to be reactivated at the correct convergence point without requiring complex runtime analysis. The preliminary setup of resume information enables efficient thread reactivation with minimal overhead
Data Source
Figure 1
Figure 2
Figure 3
AI summary
This disclosure is directed to techniques for executing subroutines in a single instruction, multiple data (SIMD) processing system that is subject to divergent thread conditions. In particular, a resume counter-based approach for managing divergent thread state is described that utilizes program module-specific minimum resume counters (MINRCs) for the efficient processing of control flow instructions. In some examples, the techniques of this disclosure may include using a main program MINRC to control the execution of a main program module and subroutine-specific MINRCs to control the execution of subroutine program modules. Techniques are also described for managing the main program MINRC and subroutine-specific MINRCs when subroutine call and return instructions are executed. Techniques are also described for updating a subroutine-specific MINRC to ensure that the updated MINRC value for the subroutine-specific MINRC is within the program space allocated for the subroutine.