ML Accelerator Context Switching for Low-Latency Task Preemption

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing machine learning hardware accelerators struggle with efficiently handling long-running low-priority tasks to accommodate higher priority tasks with low latency requirements, leading to inefficiencies and delays.

Innovation Solution

A system and method for preempting long-running processes in a machine learning hardware accelerator by identifying preemption checkpoints, saving in-process values, switching contexts, and resuming execution to allow higher priority tasks to execute without serial execution, using a scalar core and job scheduler to manage resources and context switching.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the hardware accelerator executes long-running low-priority tasks continuously, then resource utilization is maintained, but higher priority tasks with low latency requirements experience delays

Engineering Contradiction:
Improvelatency requirementVSAvoidresource utilization
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system dynamically adjusts task execution priorities by implementing preemption checkpoints that allow the scheduler to interrupt low-priority tasks when high-priority tasks arrive. The context switching mechanism enables flexible transition between tasks based on real-time priority requirements, resolving the contradiction between maintaining resource utilization and meeting latency requirements.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

Preemption checkpoints are inserted at predetermined locations in the execution flow of low-priority tasks. These checkpoints prepare the system in advance for potential preemption by saving context information, enabling smooth transition when high-priority tasks require immediate execution, thus maintaining both resource utilization and latency requirements.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the hardware accelerator performs context switching to accommodate higher priority tasks, then latency requirements are met, but execution overhead increases

Engineering Contradiction:
Improvelatency requirementVSAvoidexecution overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Context information is saved to a data structure at preemption checkpoints before task interruption. This preliminary action prepares the system for quick restoration, minimizing the time required for context switching and reducing execution overhead while maintaining latency requirements.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates copies of context information (registers, program counters, data states) at preemption points and stores them in a dedicated data structure. This copying mechanism enables rapid context restoration without complex memory management, reducing the time penalty associated with context switching.

Inventive Principle:
Principle #26Copying

3Reliability

If the hardware accelerator interrupts long-running tasks for higher priority tasks, then latency is reduced, but task completion time increases

Engineering Contradiction:
Improvelatency requirementVSAvoidtask completion time
Core Design Contradiction:
ReliabilityVSDuration of action of moving object

Solution Approach 1:

The scheduler dynamically determines when to preempt low-priority tasks based on the arrival of high-priority tasks. By making preemption decisions only when necessary rather than at fixed intervals, the system reduces the overall impact on low-priority task completion time while still meeting latency requirements for high-priority tasks.

Inventive Principle:
Principle #15Dynamics

4Productivity

If the hardware accelerator implements preemption checkpoints, then context switching efficiency improves, but system complexity increases

Engineering Contradiction:
Improvecontext switching efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system segments the execution flow into distinct sections separated by preemption checkpoints. Each checkpoint is a discrete point where context can be saved and restored. This segmentation approach improves context switching efficiency by providing clear interruption points while managing complexity through modular, localized checkpoint implementation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The context data structure is designed to handle multiple types of context information (registers, program counters, data states) in a unified manner. This universal structure supports various preemption scenarios and task types without requiring separate mechanisms, improving switching efficiency while containing system complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentEP4229507B1Preemption in a machine learning hardware accelerator
Publication Date: 2026.02.18 GOOGLE LLC
  • EP4229507B1 patent drawingFigure 1
  • EP4229507B1 patent drawingFigure 2
  • EP4229507B1 patent drawingFigure 3

AI summary

The present disclosure describes a system and method for preempting a long-running process with a higher priority process in a machine learning system, such as a hardware accelerator. The machine learning hardware accelerator can be a multi-chip system including semiconductor chips that can be application-specific integrated circuits (ASIC) designed to perform machine learning operations. An ASIC is an integrated circuit (IC) that is customized for a particular use.