FIFO Instruction Reordering for Latency Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing processors with long latency, high throughput hardware units face challenges in optimizing and scheduling instructions due to hardware FIFOs imposing ordering constraints, making it difficult to reduce latency in executing complex workloads like machine learning computations.

Innovation Solution

A method that reorders FIFO instructions at compile time by determining path length metrics and generating a new order for independent groups of FIFO instructions to reduce latency, allowing for improved scheduling and execution efficiency across multiple hardware processors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If hardware FIFOs are used to interface with long latency hardware units, then data flow control is simplified, but instruction scheduling flexibility is reduced due to ordering constraints

Engineering Contradiction:
Improvedata flow controlVSAvoidinstruction scheduling
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent segments FIFO instructions into independent groups based on whether they produce data needed by subsequent instructions. This segmentation allows flexible scheduling of independent groups while maintaining FIFO ordering within each group, resolving the contradiction between simple data flow control and complex instruction scheduling.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces dynamic scheduling where the order of independent FIFO instruction groups can be adjusted at runtime based on data dependencies and hardware availability. This dynamic approach maintains the simplicity of FIFO data flow control while providing the flexibility needed for optimized instruction scheduling.

Inventive Principle:
Principle #15Dynamics

2Device complexity

If FIFO instructions are executed in fixed order, then hardware implementation is simplified, but execution latency increases due to unnecessary waiting

Engineering Contradiction:
Improvehardware implementationVSAvoidexecution latency
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The patent performs preliminary analysis at compile time to identify independent groups of FIFO instructions and determine their execution order. This preliminary action allows the hardware to execute instructions in an optimized sequence that reduces waiting time while maintaining the simplicity of FIFO hardware implementation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the execution parameter from fixed order to dynamic order based on data dependencies. By analyzing which FIFO instructions produce data needed by subsequent instructions, the system adjusts execution timing to minimize latency while keeping hardware implementation simple.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If compilers optimize instruction scheduling, then execution efficiency improves, but complexity of handling hardware FIFO constraints increases

Engineering Contradiction:
Improveexecution efficiencyVSAvoidcompiler handling
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the scheduling complexity from the compiler by pre-computing independent groups and their optimal execution orders. This extraction allows the compiler to handle FIFO constraints more effectively by focusing only on grouping instructions rather than managing complex ordering constraints during compilation.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces an intermediary representation that separates FIFO instructions into independent groups based on data dependencies. This intermediary structure simplifies compiler handling by providing a clear framework for scheduling while maintaining the necessary hardware FIFO constraints.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Productivity

If hardware resources are allocated to threads with long latency instructions, then computation can proceed, but resource utilization decreases due to waiting

Engineering Contradiction:
Improvecomputation throughputVSAvoidresource utilization
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent implements dynamic resource allocation where hardware resources can be reallocated between threads based on the completion status of long latency instructions. By monitoring which FIFO instruction groups have completed, the system dynamically adjusts resource distribution to maximize utilization while maintaining computation throughput.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent enables discarding of hardware resource allocation to threads waiting for long latency instructions and recovering those resources for other productive work. This is achieved by identifying when FIFO instruction groups complete and reallocating resources accordingly, reducing waste while maintaining overall productivity.

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentEP3908920B1Optimizing hardware FIFO instructions
Publication Date: 2022.11.09 GOOGLE LLC
  • EP3908920B1 patent drawingFigure 1
  • EP3908920B1 patent drawingFigure 2
  • EP3908920B1 patent drawingFigure 3

AI summary

Methods, systems, and apparatus for scheduling first-in-first-out (FIFO) instructions are described. In one aspect, a method includes receiving data representing code of a program to be executed by a processing unit having hardware processors. For each of one or more hardware processors, an order of independent groups of FIFO instructions for execution by the hardware processor is identified in the data representing the code. For each independent group of FIFO instructions for execution by the hardware processor, a path length metric that represents how long it will take to reach an end of the program from the independent group of FIFO instructions is determined. A new order of the independent groups of FIFO instructions for execution by the hardware processor is generated based at least on the path length metric for each independent group of FIFO instructions for execution by the hardware processor.