Gang Preemption for GPU Workload Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing preemption schemes in graphics processing units (GPUs) introduce delays and can negatively affect dependent workloads due to the lack of consideration for interdependencies between workloads executing on different pipelines, leading to inconsistent state resumption.

Innovation Solution

The 'gang preemption' technique allows for low-latency switching between workloads by suspending and resuming dependent workloads on GPUs without draining pipelines, using a suspend memory to store state information and ensuring precise state restoration across multiple pipelines, including persistent storage for power management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If existing preemption schemes are used to switch between workloads, then workload switching can be performed, but delays are introduced and processing efficiency deteriorates

Engineering Contradiction:
Improveworkload switching speedVSAvoidpreemption delay
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs preliminary actions by pre-calculating and storing state information of workloads in suspend memory before preemption occurs. This allows the GPU to rapidly restore workload state without performing lengthy save operations during the actual preemption event, thereby reducing preemption delay while maintaining switching capability.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If pipelines are drained before preemption to save state information, then state can be preserved, but processing time increases and productivity decreases

Engineering Contradiction:
Improvestate preservation accuracyVSAvoidprocessing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The invention extracts only the essential state information needed for workload resumption from the pipeline and stores it in suspend memory, rather than draining the entire pipeline. This selective extraction maintains state preservation accuracy while avoiding the productivity loss associated with complete pipeline draining.

Inventive Principle:
Principle #2Taking out (Extraction)

3Device complexity

If preemption does not consider interdependencies between workloads, then switching is simpler, but dependent workloads are negatively affected and reliability decreases

Engineering Contradiction:
Improvepreemption management complexityVSAvoiddependent workload execution reliability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The system implements feedback mechanisms that monitor dependencies between workloads executing on different pipelines. When a preemption event occurs, the system checks for dependent workloads and adjusts the preemption timing or state saving strategy accordingly, ensuring that dependent workloads are not adversely affected while maintaining manageable system complexity.

Inventive Principle:
Principle #23Feedback

4Quantity of substance

If state information is stored in external off-chip memory, then more state can be saved, but access time increases and latency increases

Engineering Contradiction:
Improvestate information storage capacityVSAvoidmemory access latency
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The invention implements a nested memory structure where suspend memory is integrated within or closely coupled to the GPU chip, forming an intermediate layer between on-chip resources and external off-chip memory. This nested arrangement provides sufficient storage capacity for state information while maintaining fast access times, thereby reducing latency compared to purely external storage solutions.

Inventive Principle:
Principle #7Nested doll (Nesting)

Data Source

PatentUS11609791B2Precise suspend and resume of workloads in a processing unit
Publication Date: 2023.03.21 ADVANCED MICRO DEVICES INC
  • US11609791B2 patent drawing
  • US11609791B2 patent drawing
  • US11609791B2 patent drawing

AI summary

A first workload is executed in a first subset of pipelines of a processing unit. A second workload is executed in a second subset of the pipelines of the processing unit. The second workload is dependent upon the first workload. The first and second workloads are suspended and state information for the first and second workloads is stored in a first memory in response to suspending the first and second workloads. In some cases, a third workload executes in a third subset of the pipelines of the processing unit concurrently with executing the first and second workloads. In some cases, a fourth workload is executed in the first and second pipelines after suspending the first and second workloads. The first and second pipelines are resumed on the basis of the stored state information in response to completion or suspension of the fourth workload.