Automatic Code Parallelization via Execution Profiling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for automatic parallelization of code are not entirely automated, require access to the original source code, and often rely on traditional locking techniques that are not efficient, making it a tedious and error-prone process to improve processor performance through thread-level parallelism.

Innovation Solution

A system and method for automatically parallelizing code segments by executing a code segment to generate a profile, analyzing for parallelizable portions, and transforming them into parallelized code based on processor time and structure analysis, with verification to ensure functionality and performance optimization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional locking techniques are used for parallelization, then thread-level parallelism can be achieved, but the process becomes tedious and error-prone

Engineering Contradiction:
Improveprocessing performanceVSAvoidprogramming complexity
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The system performs self-service by automatically analyzing code segments, identifying parallelizable portions, and transforming them into parallelized code without requiring manual programmer intervention. The automated parallelization system executes code segments, generates profiles, and applies transformations autonomously, eliminating the need for programmers to manually implement locking techniques and parallelization logic.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system changes the state of code from sequential to parallel by automatically transforming its structure. It analyzes execution profiles and dynamically determines transformation strategies based on performance characteristics, changing the operational parameters of the code from single-threaded execution to multi-threaded parallel execution without manual intervention.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If manual parallelization is performed, then processor performance can be improved, but it requires access to original source code and is time-consuming

Engineering Contradiction:
Improveprocessor performanceVSAvoidparallelization time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by automatically executing code segments to generate execution profiles before applying parallelization transformations. It pre-analyzes the code structure, identifies parallelizable portions, and determines transformation strategies in advance, eliminating the need for time-consuming manual source code analysis and parallelization implementation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system replaces the mechanical process of manual source code analysis and parallelization with an automated computational system. It uses profile-based analysis and automatic transformation algorithms to substitute the manual mechanical process of examining source code and implementing parallelization, significantly reducing the time required.

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

3Ease of operation

If automatic parallelization is implemented, then programming effort is reduced, but traditional methods require access to source code which limits applicability

Engineering Contradiction:
Improveparallelization easeVSAvoidcode format compatibility
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The system achieves universality by being able to process code segments in multiple formats including binary code, source code, and compiled code. It performs multi-functional analysis that works across different code representations, making the automatic parallelization capability applicable to a wide range of code formats without requiring access to original source code in all cases.

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

Solution Approach 2:

The system uses execution profiles as an intermediary between the code and the parallelization transformation process. By analyzing code through profile generation during execution, it creates a mediator layer that enables automatic parallelization without direct access to source code, bridging the gap between different code formats and the transformation process.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11093372B2Systems and methods for automatically parallelizing sequential code
Publication Date: 2021.08.17 RAMPART AI INC
  • US11093372B2 patent drawing
  • US11093372B2 patent drawing
  • US11093372B2 patent drawing

AI summary

Systems, methods, and apparatus for automatically parallelizing code segments are provided. For example, an environment includes a profiling agent, a parallelization agent, and a verification agent. The profiling agent executes a code segment and generates a profile of the executed code segment. The parallelization agent analyzes the code segment to determine whether a parallelizable portion is present in the code segment. When a parallelizable portion is present, the parallelization agent determines, based on the profile of the executed code segment, whether to parallelize the parallelizable portion of the code segment. If it is determined to parallelize the parallelizable portion of the code segment, the parallelization agent automatically parallelizes the parallelizable portion of the code segment. The verification agent verifies the functionality and/or correctness of the parallelized code segment.