GPU Work Queue Local Thread Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current GPU architectures are limited by CPU-to-GPU communication hardware, preventing the GPU from modifying the GP_PUT pointer and thus relying on the CPU to generate and execute nested work, which is inefficient.
Innovation Solution
A method is implemented to configure a work queue within the GPU, using accessible pointers to enable threads to generate and execute work locally by employing semaphores to control the advancement of pointers and loading work into the queue, allowing the GPU to create and process nested work independently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the GPU relies on the CPU to generate and execute nested work due to hardware limitations in CPU-to-GPU communication channels, then the system maintains compatibility with existing communication protocols, but the processing efficiency decreases and CPU workload increases
Solution Approach 1:
The GPU is enabled to generate and execute nested work autonomously without requiring CPU intervention. The GPU threads can directly manipulate work queue entries and increment the GP_PUT pointer, allowing the GPU to serve itself for work generation tasks that previously required CPU involvement, thereby improving processing efficiency while maintaining protocol compatibility
Solution Approach 2:
The work queue management is segmented into CPU-controlled operations and GPU-controlled operations. The CPU maintains control over the overall work queue structure and GP_GET pointer, while the GPU is granted specific permissions to manipulate the GP_PUT pointer and insert work entries. This segmentation allows both components to operate efficiently within their designated roles without conflict
2Device complexity
If the CPU generates and executes all nested work, then the system maintains simple control logic, but the CPU workload increases and bandwidth is consumed
Solution Approach 1:
The GPU threads directly insert work entries into the work queue and increment the GP_PUT pointer themselves, eliminating the need for CPU involvement in these operations. This self-service capability reduces CPU workload and bandwidth consumption while maintaining controlled access through the semaphore mechanism
Solution Approach 2:
The semaphore mechanism provides feedback control between GPU work generation and CPU execution. The GPU acquires a semaphore before inserting work entries, ensuring synchronized access to the work queue. This feedback mechanism maintains control logic simplicity while enabling efficient GPU-driven work generation
Data Source
AI summary
One embodiment of the present invention enables threads executing on a processor to locally generate and execute work within that processor by way of work queues and command blocks. A device driver, as an initialization procedure for establishing memory objects that enable the threads to locally generate and execute work, generates a work queue, and sets a GP_GET pointer of the work queue to the first entry in the work queue. The device driver also, during the initialization procedure, sets a GP_PUT pointer of the work queue to the last free entry included in the work queue, thereby establishing a range of entries in the work queue into which new work generated by the threads can be loaded and subsequently executed by the processor. The threads then populate command blocks with generated work and point entries in the work queue to the command blocks to effect processor execution of the work stored in the command blocks.


