Code Partitioning via DAG Pattern Matching on Heterogeneous Cores
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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
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.
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
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.
4Productivity
If fine-grained code partitioning is implemented, then processing efficiency on auxiliary processors is maximized, but the overhead of partitioning analysis increases
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.
Data Source
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.


