Precision Propagation in Machine Learning Computation Graphs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Machine learning models and other numerical workloads face performance limitations due to limited memory capacity and bandwidth, as they often require higher precision numerical values that consume more resources, while using reduced-precision values can lead to less accurate computations.

Innovation Solution

A method is introduced to adjust operators in machine learning models to use reduced-precision values based on the precision of other operators, propagating reduced-precision values through the computation graph without affecting accuracy, by identifying downstream and upstream operators and adjusting their precision accordingly, and adding convert operators when necessary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If higher precision numerical values are used, then computation accuracy is improved, but memory capacity and bandwidth requirements increase

Engineering Contradiction:
Improvecomputation accuracyVSAvoidmemory capacity and bandwidth
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent applies local quality by assigning different precision levels to different operators within the computation graph based on their specific requirements. Instead of uniformly using high precision across all operators, the system identifies and applies reduced precision (e.g., bfloat16) to operators where it is sufficient, while maintaining higher precision only where necessary for accuracy-critical operations. This localized precision assignment reduces overall memory capacity and bandwidth requirements while preserving computation accuracy where needed.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the precision parameter of numerical values from a fixed high-precision setting to variable precision levels (e.g., transitioning from float32 to bfloat16 for certain operators). This parameter change allows the system to reduce memory capacity and bandwidth consumption by using lower precision representations, while the selective application strategy ensures that accuracy is maintained for operations where high precision is critical.

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If reduced-precision numerical values are used, then memory capacity and bandwidth requirements are reduced, but computation accuracy decreases

Engineering Contradiction:
Improvememory capacity and bandwidthVSAvoidcomputation accuracy
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The system applies reduced precision locally to specific operators where it is sufficient, rather than universally. By analyzing the computation graph and identifying operators that can tolerate lower precision (such as certain activation functions or non-critical intermediate computations), the system reduces memory and bandwidth usage in those specific locations while maintaining high precision for accuracy-critical operators, thus resolving the accuracy-loss problem.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent applies reduced precision partially to only those operators where it is appropriate, rather than excessively applying it to all operators. This selective partial application ensures that memory capacity and bandwidth are reduced while computation accuracy is preserved for operations that require it, balancing the trade-off between resource efficiency and computational correctness.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If precision is adjusted based on downstream operators, then more operators can use reduced-precision values, but the complexity of precision propagation increases

Engineering Contradiction:
Improvenumber of operators using reduced-precisionVSAvoidprecision propagation analysis
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent performs preliminary precision analysis by propagating precision requirements through the computation graph before execution. By pre-determining which operators can use reduced precision based on downstream operator requirements, the system enables more operators to use efficient reduced-precision formats. This preliminary action, performed during graph compilation or optimization, manages the complexity of precision propagation by resolving it in advance rather than during runtime.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The computation graph itself provides the information needed for precision propagation by analyzing its own structure and operator dependencies. The system uses the graph's inherent data flow information to automatically determine precision requirements, eliminating the need for external complex analysis tools. This self-service approach manages propagation complexity by leveraging the existing graph structure.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11972238B2Propagating reduced-precision on computation graphs
Publication Date: 2024.04.30 GOOGLE LLC
  • US11972238B2 patent drawing
  • US11972238B2 patent drawing
  • US11972238B2 patent drawing

AI summary

Methods, systems, and apparatus for propagating reduced-precision on computation graphs are described. In one aspect, a method includes receiving data specifying a directed graph that includes operators for a program. The operators include first operators that each represent a numerical operation performed on numerical values having a first level of precision and second operators that each represent a numerical operation performed on numerical values having a second level of precision. One or more downstream operators are identified for a first operator. A determination is made whether each downstream operator represents a numerical operation that is performed on input values having the second level of precision. Whenever each downstream operator represents a numerical operation that is performed on input values having the second level of precision, a precision of numerical values output by the operation represented by the first operator is adjusted to the second level of precision.