Compilation Cache Keys for Optimization Profile Reuse

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compilation systems lack efficient methods to associate compilation outputs with optimization profiles, leading to unnecessary recompilation and reduced computational efficiency, particularly in just-in-time compilation of machine-learning models.

Innovation Solution

Implement a compilation cache that stores compilation outputs and associates them with optimization profiles using cache keys, allowing systems to determine if a computer program has already been compiled with a specific optimization profile without performing partial compilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If the system recompiles the computer program at each execution stage to ensure optimal performance, then the execution efficiency is improved, but the compilation time and computational overhead increase significantly

Engineering Contradiction:
Improveexecution efficiencyVSAvoidcompilation time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs compilation in advance and stores the compilation output in a compilation cache. At subsequent execution stages, the system retrieves pre-compiled outputs from the cache using cache keys that encode optimization profile information, eliminating the need to recompile and thus resolving the contradiction between execution efficiency and compilation time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system changes the parameter representation by encoding optimization profile information into the cache key itself. This allows the system to efficiently match and retrieve compilation outputs corresponding to specific optimization profiles without performing partial compilation or extensive comparisons, thereby reducing compilation time while maintaining execution efficiency.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If the system performs partial compilation to determine the optimization profile, then the adaptability to different optimization profiles is improved, but the computational overhead and complexity increase

Engineering Contradiction:
Improveadaptability to optimization profilesVSAvoidcomputational overhead
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The system creates a cache key that is a simplified representation or copy of the optimization profile information. This cache key can be generated and compared without performing actual compilation operations, allowing the system to determine the appropriate optimization profile while minimizing computational overhead and avoiding the complexity of partial compilation.

Inventive Principle:
Principle #26Copying

3Productivity

If the system stores multiple compilation outputs for different optimization profiles in the compilation cache, then the productivity is improved by avoiding recompilation, but the device complexity increases due to cache management

Engineering Contradiction:
Improvecompilation efficiencyVSAvoidcache management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system transforms the cache key into a compact representation that encodes optimization profile information directly. This parameter transformation simplifies cache management by enabling efficient storage, retrieval, and matching of compilation outputs with their corresponding optimization profiles, thereby improving productivity while minimizing the increase in device complexity.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250355805A1Caching compilation outputs using optimization profiles
Publication Date: 2025.11.20 GOOGLE LLC
  • US20250355805A1 patent drawing
  • US20250355805A1 patent drawing
  • US20250355805A1 patent drawing

AI summary

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for caching compilation outputs using optimization profiles. One of the methods includes identifying a computer program; and at each of a plurality of execution stages: identifying an optimization profile that is to be used when compiling the computer program; generating, from the computer program and from the optimization profile, a cache key; determining whether the cache key has an entry in a compilation cache that stores compilation outputs generated by a just-in-time compiler; obtaining, based on whether the cache key is determined to have an entry in the compilation cache, a compilation output that either (i) was previously generated during a prior execution stage or (ii) is newly generated by the just-in-time compiler during the current execution stage; and providing the compilation output for execution of the computer program.