Tensor IR Highering for Reconstructing Optimized RNN Layers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The unidirectional nature of the 'lowering' process in intermediate representation (IR) systems, particularly in compilers like LLVM IR, restricts the ability to convert from higher-level IRs to lower-level IRs, leading to inefficiencies in optimizing computations, especially for complex operations like RNN layers, preventing the use of optimized implementations from libraries like CUDNN or DNNL.

Innovation Solution

A method for intermediate representation 'highering' that detects and replaces low-level sub-graphs with higher-level layers within computational graphs, allowing for bidirectional transformation and enabling high-level optimizations, including the use of specialized hardware and libraries like CUDNN or DNNL.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If unidirectional lowering process is used in intermediate representation systems, then implementation details and optimization strategies can be added progressively, but the ability to convert from lower-level IRs back to higher-level IRs is lost, preventing use of optimized library implementations

Engineering Contradiction:
Improveease of adding implementation detailsVSAvoidability to convert between IR levels
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The patent inverts the traditional unidirectional lowering process by implementing bidirectional conversion capabilities. Specifically, it enables conversion from lower-level IRs (like LLVM IR) back to higher-level IRs (like MLIR), allowing optimized library implementations to be utilized. This is achieved through graph extraction and matching techniques that identify patterns in lower-level IR and reconstruct corresponding higher-level operations.

Inventive Principle:
Principle #13The other way round (Inversion)

2Device complexity

If low-level IRs like LLVM IR are used, then detailed implementation control is achieved, but high-level mathematical optimizations become difficult to implement

Engineering Contradiction:
Improveimplementation control granularityVSAvoidease of implementing mathematical optimizations
Core Design Contradiction:
Device complexityVSEase of manufacture

Solution Approach 1:

The patent introduces an intermediary conversion process that bridges low-level and high-level IRs. By extracting computational graphs from low-level IR and matching them against patterns to reconstruct higher-level operations, the system enables mathematical optimizations at higher levels while maintaining the implementation control of low-level IRs. This intermediary step allows optimizations like ReLU→MaxPooling transformations that would be difficult to implement directly on low-level IR.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If bidirectional transformation between IR levels is enabled, then optimized library implementations can be utilized, but compilation complexity increases

Engineering Contradiction:
Improvecompilation speedVSAvoidcompilation system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the bidirectional transformation process into distinct, manageable components: graph extraction from lower-level IR, pattern matching to identify higher-level operations, and reconstruction of higher-level computational graphs. This segmentation manages compilation system complexity by breaking down the transformation into modular steps, enabling optimized library implementations to be utilized effectively.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20260057249A1Intermediate representation highering for tensor-like computations
Publication Date: 2026.02.26 NEC LAB EURO GMBH
  • US20260057249A1 patent drawing
  • US20260057249A1 patent drawing
  • US20260057249A1 patent drawing

AI summary

A method for intermediate representation highering includes detecting one or more types of higherable operations associated with one or more extracted sub-graphs or one or more hyperparameters within the one or more extracted sub-graphs. The one or more extracted sub-graphs are part of a computational graph associated with a first intermediate representation (IR) during a compiling process for converting source code to machine code. The method further includes replacing the one or more extracted sub-graphs with one or more higher level layers indicated by the higherable operations to generate a new computational graph.