Modular Multistage Compiler Blocks for ML Hardware Adaptation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compilers for electronic devices, particularly in machine learning hardware, lack adaptability to rapidly changing environments and technologies, are static, and do not provide scalable debugging, verification, or optimization capabilities due to a lack of automatic generation of metadata for memory allocation and access.

Innovation Solution

A multi-layered compiler generates structured metadata at each stage of compilation, providing detailed information about data mapping, memory locations, and optimization decisions, allowing for flexible adaptation to different hardware architectures and technologies.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a static compiler is used, then the compilation process is simple and fast, but the compiler cannot adapt to rapidly changing environments and technologies

Engineering Contradiction:
Improveadaptability to changing environmentsVSAvoidcompiler structure complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The compiler is divided into multiple interchangeable blocks (frontend block, backend block, optimization block) that can be independently selected and combined. This modular segmentation allows the system to adapt to different compilation scenarios without requiring a completely new compiler, resolving the contradiction between adaptability and complexity by organizing complexity into manageable, reusable segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The compiler architecture transitions from a static structure to a dynamic one where blocks can be selectively replaced and reconfigured based on the specific compilation needs. The system can dynamically choose different frontend blocks for different programming languages or different backend blocks for different target hardware, enabling adaptability while maintaining a manageable core structure.

Inventive Principle:
Principle #15Dynamics

2Measurement precision

If manual spot checking is used for memory allocation and access, then the verification process is simple, but it is not scalable to the entire network or memory space

Engineering Contradiction:
Improveverification accuracyVSAvoidverification throughput
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The compiler automatically generates comprehensive metadata that documents all memory allocation and access operations throughout the entire computational graph. This self-generated metadata serves as complete verification information without requiring manual inspection, enabling both high accuracy coverage of the entire network and efficient automated verification processes.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system incorporates feedback mechanisms where the generated metadata can be used to verify and validate compilation decisions, memory mappings, and data flows. This feedback loop enables automated verification of the entire compilation process, improving both the comprehensiveness of verification and its efficiency through automated checking rather than manual spot checking.

Inventive Principle:
Principle #23Feedback

3Ease of operation

If a black box compiler is used, then the compilation process is simple and fast, but there is no feedback or suggestion to the user for debugging and optimization

Engineering Contradiction:
Improveuser-friendly debuggingVSAvoiddebugging time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The compiler generates detailed metadata that provides feedback about memory allocation, data flows, and optimization decisions made during compilation. This feedback is made accessible to users through structured information that can be inspected and analyzed, enabling users to understand compilation decisions, identify issues, and optimize their code without time-consuming manual debugging processes.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The compiler performs preliminary analysis and generates metadata during the compilation process itself, before the code is executed. This preliminary generation of diagnostic information allows users to identify potential issues and optimization opportunities early in the development cycle, reducing the time needed for debugging and verification by catching problems before they manifest during execution.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12430108B2Multistage compiler architecture
Publication Date: 2025.09.30 MARVELL ASIA PTE LTD
  • US12430108B2 patent drawing
  • US12430108B2 patent drawing
  • US12430108B2 patent drawing

AI summary

A system includes a compiler including a plurality of compiler blocks. The compiler blocks of the plurality of compiler blocks are compossible. The compiler is configured to identify one or more resources in a hardware to execute a set of low-level instructions that is generated from a high-level function in a high-level code. The compiler is further configured to determine one or more processing operations to be performed that is associated with the high-level function in the high-level code. The determining of the one or more processing operations occurs based on architecture of the hardware. The compiler is configured to compile the high-level function in the high-level code of the application into the set of low-level instructions to be executed on the hardware.