GPU Work Queue Management via Local Command Blocks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current GPU architectures are limited by CPU-to-GPU communication channels, such as PCI-E, which prevent the GPU from modifying the GP_PUT pointer, necessitating CPU intervention for nested work generation, leading to inefficiencies.

Innovation Solution

A method is introduced where threads on the GPU locally generate work by creating command blocks, using semaphores to manage the GP_GET and GP_PUT pointers, allowing the GPU to autonomously manage its work queue and execute nested tasks without CPU authorization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the GPU relies on the CPU to generate and execute nested work, then the system can maintain proper work queue management through the GP_PUT pointer, but the processing efficiency decreases and CPU workload increases

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidwork queue management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The GPU is enabled to autonomously generate nested work and update the GP_PUT pointer without CPU intervention. The GPU independently manages its own work queue by allocating command blocks and updating pointers, thereby serving itself rather than relying on the CPU for these operations.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The work queue management is segmented into distinct components: the GP_GET pointer managed by the GPU for tracking completed work, and the GP_PUT pointer updated by the GPU for submitting new work. This segmentation allows the GPU to independently control both pointers without CPU involvement, resolving the contradiction between efficiency and management complexity.

Inventive Principle:
Principle #1Segmentation

2Productivity

If the GPU autonomously manages the work queue and updates the GP_PUT pointer, then processing efficiency improves and CPU workload reduces, but hardware limitations of CPU-to-GPU communication channels prevent this capability

Engineering Contradiction:
Improvenested work execution efficiencyVSAvoidhardware compatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

A command block structure is introduced as an intermediary data structure that the GPU uses to submit nested work to itself. The command blocks contain instructions and parameters that enable the GPU to autonomously manage the work queue without requiring direct CPU-GPU communication for pointer updates, thereby working around hardware limitations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system transitions from a single-dimensional CPU-controlled work submission model to a multi-dimensional model where the GPU operates in its own dimension, independently generating and submitting nested work through command blocks while the CPU handles only top-level work submission.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Reliability

If the CPU generates all GPU work entries, then proper work queue management is ensured, but bandwidth consumption across CPU-GPU communication paths increases

Engineering Contradiction:
Improvework queue management reliabilityVSAvoidcommunication bandwidth consumption
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The GPU performs self-service by generating nested work entries and updating the GP_PUT pointer autonomously. This eliminates the need for continuous CPU-GPU communication for work queue management, significantly reducing bandwidth consumption while maintaining reliability through the GPU's independent control of the work queue.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The GPU prepares and submits nested work entries in advance without waiting for CPU authorization. By performing the work generation and queue update actions preliminarily and autonomously, the system reduces communication overhead while ensuring work queue integrity through the GPU's direct control.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9489245B2Work-queue-based graphics processing unit work creation
Publication Date: 2016.11.08 NVIDIA CORP
  • US9489245B2 patent drawing
  • US9489245B2 patent drawing
  • US9489245B2 patent drawing

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.