Gang Synchronization for Low-Latency GPU Queue Coordination
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for synchronizing work between multiple queues in graphics processing units (GPUs) introduce significant latency due to reliance on slow synchronization objects that require round-trip communication between the CPU and GPU, limiting parallel processing and efficiency.
Innovation Solution
The implementation of gang submission, where multiple queues are treated as a single unit for synchronization, using fine-grained synchronization objects that operate internally within the GPU, allowing parallel execution and reducing latency by eliminating the need for CPU-mediated synchronization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If CPU-mediated synchronization using fence/barrier objects is used to synchronize work between multiple queues, then synchronization reliability is improved, but latency increases due to round-trip communication between CPU and GPU
Solution Approach 1:
The patent extracts the synchronization function from the CPU domain and relocates it to the GPU domain by introducing gatekeeper objects that reside in GPU memory and are managed by GPU-based gatekeeper threads. This extraction eliminates the need for CPU-GPU round-trip communication for synchronization operations, thereby reducing latency while maintaining reliability.
Solution Approach 2:
The patent introduces gatekeeper objects as intermediary synchronization primitives that mediate between multiple queues on the GPU. These gatekeeper objects act as local mediators that can signal and wait events without requiring CPU intervention, enabling efficient inter-queue synchronization while maintaining the reliability of synchronization operations.
2Loss of time
If fine-grained synchronization objects are used internally within the GPU, then synchronization latency is reduced, but device complexity increases
Solution Approach 1:
The patent implements self-service synchronization by enabling the GPU to manage its own synchronization operations through gatekeeper threads that execute on the GPU itself. The gatekeeper threads perform synchronization tasks autonomously without requiring external CPU management, allowing the GPU to service its own synchronization needs and reducing latency.
Solution Approach 2:
The gatekeeper objects serve multiple functions: they act as synchronization barriers, event signals, and coordination mechanisms for multiple queues simultaneously. This multi-functionality reduces the need for separate specialized synchronization structures, thereby managing complexity while providing fine-grained synchronization capabilities.
3Productivity
If multiple queues are treated as a single unit for synchronization, then parallel processing efficiency is improved, but queue independence is reduced
Solution Approach 1:
The patent merges multiple queues into a unified gang submission structure where they are scheduled and synchronized together as a single unit. This merging enables the queues to execute in parallel with coordinated synchronization through shared gatekeeper objects, improving overall parallel processing efficiency while maintaining individual queue functionality through the gatekeeper abstraction.
Solution Approach 2:
While merging queues for synchronization, the patent maintains logical segmentation by allowing individual queues to retain their independent command buffers and execution contexts. The gatekeeper objects provide segmentation at the synchronization level, enabling each queue to operate independently while participating in coordinated gang submissions when beneficial.
Data Source
AI summary
Systems, apparatuses, and methods for performing command buffer gang submission are disclosed. A system includes at least first and second processors and a memory. The first processor (e.g., CPU) generates a command buffer and stores the command buffer in the memory. A mechanism is implemented where a granularity of work provided to the second processor (e.g., GPU) is increased which, in turn, increases the opportunities for parallel work. In gang submission mode, the user-mode driver (UMD) specifies a set of multiple queues and command buffers to execute on those multiple queues, and that work is guaranteed to execute as a single unit from the GPU operating system scheduler point of view. Using gang submission, synchronization between command buffers executing on multiple queues in the same submit is safe. This opens up optimization opportunities for application use (explicit gang submission) and for internal driver use (implicit gang submission).


