Code Partitioning via DAG Pattern Matching on Heterogeneous Cores

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies face challenges in efficiently offloading complex code segments to auxiliary processors like DSPs and GPUs due to limitations in code partitioning techniques, which hinder optimal power management and performance in mobile devices.

Innovation Solution

A method involving the generation of directed acyclic graphs (DAGs) to represent code, comparing nodes to predefined grammar patterns, and offloading segments with the best cumulative effect, allowing for automatic identification and optimization of code portions suited for auxiliary processors without requiring special pre-processing or developer intervention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Use of energy by moving object

If automatic code partitioning techniques are used to offload code to auxiliary processors, then power consumption is reduced and performance is improved, but the complexity of determining optimal partitioning increases significantly

Engineering Contradiction:
Improvepower consumptionVSAvoidpartitioning determination complexity
Core Design Contradiction:
Use of energy by moving objectVSDevice complexity

Solution Approach 1:

The system performs self-service by automatically analyzing code segments and determining optimal partitioning without requiring developer intervention. The compiler backend autonomously identifies suitable code portions for offloading to auxiliary processors based on predefined grammar patterns and cost metrics, eliminating the need for manual annotation or configuration while achieving energy-efficient code distribution across heterogeneous cores.

Inventive Principle:
Principle #25Self-service

2Measurement precision

If existing code analysis techniques are used, then simple patterns can be detected, but complex graph-based code representations cannot be effectively matched

Engineering Contradiction:
Improvepattern detection accuracyVSAvoidcode representation compatibility
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The system achieves universality by creating a grammar-based pattern matching framework that can handle multiple code representation formats. The predefined grammar patterns are designed to match various graph-based code structures (such as control flow graphs and data flow graphs) while maintaining a unified matching algorithm, enabling the same system to effectively analyze and partition code regardless of the specific graph representation used.

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

3Manufacturing precision

If manual code partitioning is performed by developers, then precise control over code distribution is achieved, but the burden on developers increases and scalability is reduced

Engineering Contradiction:
Improvecode distribution controlVSAvoiddeveloper burden
Core Design Contradiction:
Manufacturing precisionVSEase of operation

Solution Approach 1:

The system performs self-service by automatically analyzing code segments and determining optimal partitioning without requiring developer intervention. The compiler backend autonomously identifies suitable code portions for offloading to auxiliary processors based on predefined grammar patterns and cost metrics, eliminating the need for manual annotation or configuration while achieving energy-efficient code distribution across heterogeneous cores.

Inventive Principle:
Principle #25Self-service

4Productivity

If fine-grained code partitioning is implemented, then processing efficiency on auxiliary processors is maximized, but the overhead of partitioning analysis increases

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidpartitioning analysis time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system applies local quality by analyzing and partitioning code at the appropriate granularity level for each specific code segment. Rather than uniformly applying fine-grained or coarse-grained partitioning throughout, the grammar-based approach allows the system to identify the optimal partitioning granularity for each local code region based on its structural characteristics and computational properties, achieving high processing efficiency without excessive analysis overhead.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9201659B2Efficient directed acyclic graph pattern matching to enable code partitioning and execution on heterogeneous processor cores
Publication Date: 2015.12.01 QUALCOMM INC
  • US9201659B2 patent drawing
  • US9201659B2 patent drawing
  • US9201659B2 patent drawing

AI summary

Methods, devices, and systems for automatically determining how an application program may be partitioned and offloaded for execution by a general purpose applications processor and an auxiliary processor (e.g., a DSP, GPU, etc.) within a mobile device. The mobile device may determine the portions of the application code that are best suited for execution on the auxiliary processor based on pattern-matching of directed acyclic graphs (DAGS). In particular, the mobile device may identify one or more patterns in the code, particularly in a data flow graph of the code, comparing each identified code pattern to predefined graph patterns known to have a certain benefit when executed on the auxiliary processor (e.g., a DSP). The mobile device may determine the costs and/or benefits of executing the portions of code on the auxiliary processor, and may offload portions that have low costs and/or high benefits related to the auxiliary processor.