In-Memory Computing Compilation via Intermediate Representation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional compiler architectures are unable to effectively compile algorithm models into In-Memory Computing systems, limiting the acceleration of algorithm operations using these systems.

Innovation Solution

A compilation method that acquires calculation information, converts it into intermediate representations suitable for In-Memory Computing apparatuses, maps these representations to hardware-specific operations, and compiles them into executable instruction information, enabling efficient execution of algorithms like neural networks on In-Memory Computing devices.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a traditional compiler architecture is used, then the compilation process is simple and well-established, but it cannot compile algorithm models into In-Memory Computing systems

Engineering Contradiction:
Improvecapability to compile algorithm modelsVSAvoidcompiler architecture complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The compilation process is divided into multiple distinct stages: parsing the algorithm model into an abstract syntax tree, converting to intermediate representation, optimizing the intermediate representation, and generating target code for the In-Memory Computing system. This segmentation allows each stage to handle specific transformation tasks independently, making the overall complex compilation process manageable and implementable.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An intermediate representation (IR) is introduced as a mediator between the source algorithm model and the target In-Memory Computing instructions. The IR serves as a common language that captures the computational logic in a way that can be both parsed from high-level algorithms and transformed into hardware-specific operations, bridging the gap between software algorithms and hardware implementation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Power

If In-Memory Computing system is used for algorithm acceleration, then computational power and energy efficiency are improved, but the system requires specialized compilation capabilities that do not exist

Engineering Contradiction:
Improvecomputational powerVSAvoidcompilation system availability
Core Design Contradiction:
PowerVSEase of manufacture

Solution Approach 1:

The compiler is designed to handle multiple types of algorithm models (neural networks, traditional algorithms, etc.) and transform them into a unified intermediate representation, which can then be optimized and generated into In-Memory Computing instructions. This universal approach allows the same compilation infrastructure to support diverse computational workloads, making the system broadly applicable.

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

Solution Approach 2:

The compilation process transforms algorithm parameters and computational operations into forms suitable for In-Memory Computing architecture. This includes converting high-level algorithmic descriptions into low-level operations that leverage the specific hardware characteristics of the In-Memory Computing system, such as in-place computation and analog matrix multiplication.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If algorithm models are transformed into In-Memory Computing instructions, then execution efficiency is improved, but the transformation process requires complex multi-stage compilation

Engineering Contradiction:
Improvealgorithm execution efficiencyVSAvoidcompilation process complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The algorithm model is parsed and converted into an intermediate representation before optimization and code generation. This preliminary transformation establishes a standardized form that captures the essential computational logic, making subsequent optimization and target code generation more systematic and efficient.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Traditional mechanical compilation approaches are replaced with a multi-stage software-based transformation process that uses intermediate representations and optimization passes. This substitution allows for more flexible and sophisticated transformations that can achieve better execution efficiency on the target hardware.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11803360B2Compilation method, apparatus, computing device and medium
Publication Date: 2023.10.31 TSINGHUA UNIVERSITY
  • US11803360B2 patent drawing
  • US11803360B2 patent drawing
  • US11803360B2 patent drawing

AI summary

A compilation method, a compilation apparatus suitable for an In-Memory Computing apparatus, a computing device and a storage medium. The compilation method includes: acquiring calculation information of an algorithm to be compiled; converting the algorithm to be compiled into the first intermediate representation according to the calculation information; mapping the first intermediate representation to the second intermediate representation; and compiling the algorithm to be compiled into instruction information recognized by the In-Memory Computing apparatus according to the hardware information, to make the In-Memory Computing apparatus execute the instruction information. The compilation method may compile the calculation information into instructions that may be directly executed by the In-Memory Computing apparatus, so as to realize the effect of accelerating the operations of various algorithms by using the In-Memory Computing apparatus.