SIMD Execution Mask Override for Diverged Control Flow
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing systems face inefficiencies when using GPUs for general computation due to challenges such as separate memory systems, inefficient scheduling, programming models, and power consumption, particularly when threads in a wavefront encounter conditional code, leading to performance loss as threads diverge and may never reconverge.
Innovation Solution
The method involves overriding the execution mask of SIMD hardware to enable specific lanes, responsive to data parallel computations and diverged control flows, allowing for efficient execution of software code by indicating which lanes to override using a mask parameter and resuming diverged execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If threads in a wavefront encounter conditional code, then threads may diverge and never reconverge, but this causes significant performance loss and reduces execution efficiency
Solution Approach 1:
The patent segments the wavefront into multiple lanes (e.g., lane 0-15, lane 16-31, lane 32-47, lane 48-63) and applies independent execution masks to each lane. This allows different lanes to execute different code paths based on their specific thread identifiers, preventing divergence while maintaining parallel execution. Each lane can be independently controlled through mask override instructions, resolving the contradiction between conditional code execution and performance efficiency.
2Reliability
If the processor executes only one thread at a time due to divergence, then conditional code can be handled correctly, but the processor operates at only 1/64 of peak performance
Solution Approach 1:
The patent introduces dynamic mask override instructions that can be executed at runtime to adjust the execution mask for different lanes. The mask override mechanism dynamically adapts the execution behavior based on the current thread identifier and control flow requirements. This allows the system to maintain peak performance by executing multiple threads simultaneously while correctly handling conditional code through dynamic mask adjustments, rather than falling back to sequential execution.
3Productivity
If execution mask is overridden to enable specific lanes, then concurrent execution of multiple threads is allowed, but control logic complexity increases
Solution Approach 1:
The patent implements self-service by allowing threads to automatically determine their own execution mask based on their thread identifier. The mask override instruction takes the thread identifier and automatically generates the appropriate mask without requiring complex external control logic. Each thread serves its own execution needs by using its identifier to determine which lanes should execute, eliminating the need for complex centralized scheduling while enabling concurrent execution.
Data Source
AI summary
Methods, and media, and computer systems are provided. The method includes, the media includes control logic for, and the computer system includes a processor with control logic for overriding an execution mask of SIMD hardware to enable at least one of a plurality of lanes of the SIMD hardware. Overriding the execution mask is responsive to a data parallel computation and a diverged control flow of a workgroup.


