Thread Group Synchronization via Fork-Join Operations in General Purpose Shaders

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing graphics processing systems face inefficiencies in thread synchronization and communication, particularly in multi-threaded applications like video games, due to bandwidth and memory-intensive synchronization operations, which hinder performance and increase CPU cycles.

Innovation Solution

Implementing a method and system for thread synchronization in a general-purpose shader using fork and join operations to manage thread groups, allowing for concurrent execution and reducing overhead by leveraging inter-thread communication and shared data, with a thread counter to track execution and synchronize threads at predetermined points.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional synchronization operations are used in multi-threaded compute shaders, then thread ordering is achieved, but bandwidth and memory usage increase significantly

Engineering Contradiction:
Improvethread orderingVSAvoidbandwidth and memory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts the synchronization logic from traditional memory-intensive operations and implements it through fork/join operations that operate within the shader's execution flow. The fork operation spawns thread groups that execute independently, and the join operation synchronizes them without requiring extensive memory bandwidth, thus achieving thread ordering with reduced resource consumption.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces fork and join operations as intermediary mechanisms that mediate between thread execution and synchronization. These operations act as intermediaries that coordinate thread groups without requiring direct memory-intensive communication, thereby maintaining reliability while reducing bandwidth and memory usage.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If multiple thread groups are executed in parallel, then processing throughput increases, but synchronization overhead increases

Engineering Contradiction:
Improveprocessing throughputVSAvoidsynchronization overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments the computation into multiple independent thread groups that can execute in parallel between join operations. By dividing the work into discrete segments that can be processed concurrently and then synchronized efficiently through join, the system achieves high throughput while minimizing synchronization overhead.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent employs periodic fork-join cycles where thread groups are dispatched in waves. Each fork operation initiates a new wave of parallel thread groups, and subsequent join operations synchronize them periodically. This periodic structure enables sustained high throughput while keeping synchronization overhead manageable through regular, predictable synchronization points.

Inventive Principle:
Principle #19Periodic action

3Reliability

If thread synchronization is implemented using traditional methods, then thread coordination is achieved, but CPU cycles are consumed

Engineering Contradiction:
Improvethread coordinationVSAvoidCPU cycles
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent implements self-service synchronization where thread groups manage their own coordination through fork and join operations embedded in the shader code. The GPU's execution engine handles the synchronization logic internally without requiring CPU intervention, allowing thread coordination to occur autonomously and efficiently, thus reducing CPU cycle consumption while maintaining reliability.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8499305B2Systems and methods for performing multi-program general purpose shader kickoff
Publication Date: 2013.07.30 VIA TECH INC
  • US8499305B2 patent drawing
  • US8499305B2 patent drawing
  • US8499305B2 patent drawing

AI summary

Systems and methods for thread group kickoff and thread synchronization are described. One method is directed to synchronizing a plurality of threads in a general purpose shader in a graphics processor. The method comprises determining an entry point for execution of the threads in the general purpose shader, performing a fork operation at the entry point, whereby the plurality of threads are dispatched, wherein the plurality of threads comprise a main thread and one or more sub-threads. The method further comprises performing a join operation whereby the plurality of threads are synchronized upon the main thread reaching a synchronization point. Upon completion of the join operation, a second fork operation is performed to resume parallel execution of the plurality of threads.