Ordered Atomic Operations in GPU L2 Cache

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing graphics processing unit (GPU) technologies face challenges in achieving deterministic results due to inconsistent ordering of atomic operations, leading to visual artifacts like 'Z-fighting' in 3D rendering, which are exacerbated by long latencies caused by software-based solutions that rely on frequent cache memory round-trips.

Innovation Solution

A system that employs a content-addressable memory (CAM) and an atomic processing circuit within an L2 slice to store and manage ordered atomic operations, allowing for efficient execution of atomic operations in a consistent order, reducing latency and increasing throughput by processing ordered atomic operations directly within the hardware.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If software-based solutions are used to ensure consistent ordering of atomic operations, then deterministic results are achieved, but latency increases due to frequent cache memory round-trips

Engineering Contradiction:
Improvedeterministic resultsVSAvoidlatency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent replaces the software-based ordering mechanism with a hardware-based atomic processing circuit. This circuit includes a comparison unit that directly compares the current ordering number with the expected ordering number in hardware, eliminating the need for software loops and cache round-trips. The hardware circuit processes ordering decisions in a single clock cycle, reducing latency from several hundred cycles to one cycle while maintaining deterministic results.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent introduces an intermediary ordering number mechanism that acts as a synchronization signal between parallel threads. Each thread receives an ordering number from a global counter, and the hardware comparison unit uses this ordering number to enforce consistent ordering without requiring threads to poll or wait for cache updates. This intermediary mechanism coordinates thread execution order efficiently in hardware.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of time

If hardware-based atomic processing is implemented, then latency is reduced, but ensuring consistent ordering across parallel threads becomes more complex

Engineering Contradiction:
ImprovelatencyVSAvoidordering mechanism complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent changes the parameter being monitored from memory content to an ordering number. Instead of checking memory states or data values to determine execution order, the system uses a simple integer ordering number that increments with each atomic operation. This parameter change simplifies the hardware comparison logic, as it only needs to compare two integers rather than analyze complex memory states, reducing circuit complexity while maintaining fast ordering enforcement.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If atomic operations are executed in parallel without ordering, then throughput is maximized, but visual artifacts occur due to inconsistent ordering

Engineering Contradiction:
ImprovethroughputVSAvoidvisual artifacts
Core Design Contradiction:
ProductivityVSObject-generated harmful factors

Solution Approach 1:

The patent implements dynamic ordering where the execution order of atomic operations is determined at runtime based on the current ordering number, rather than being statically predetermined. Parallel threads can issue atomic operations simultaneously, and the hardware dynamically enforces ordering by comparing the current ordering number with the expected number for each operation. This dynamic approach maintains high throughput while preventing visual artifacts caused by inconsistent ordering.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11016802B2Techniques for ordering atomic operations
Publication Date: 2021.05.25 NVIDIA CORP
  • US11016802B2 patent drawing
  • US11016802B2 patent drawing
  • US11016802B2 patent drawing

AI summary

In various embodiments, an ordered atomic operation enables a parallel processing subsystem to executes an atomic operation associated with a memory location in a specified order relative to other ordered atomic operations associated with the memory location. A level 2 (L2) cache slice includes an atomic processing circuit and a content-addressable memory (CAM). The CAM stores an ordered atomic operation specifying at least a memory address, an atomic operation, and an ordering number. In operation, the atomic processing circuit performs a look-up operation on the CAM, where the look-up operation specifies the memory address. After the atomic processing circuit determines that the ordering number is equal to a current ordering number associated with the memory address, the atomic processing circuit executes the atomic operation and returns the result to a processor executing an algorithm. Advantageously, the ordered atomic operation enables the algorithm to achieve a deterministic result while optimizing latency.