Parallelization Compiler Task Fusion for Conditional Branch Overhead

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing parallelization compilers face challenges in efficiently converting sequential programs with conditional branches into parallel programs for multiprocessor systems, particularly when the execution time of tasks is short, leading to increased overhead and reduced parallel execution speed.

Innovation Solution

A method and apparatus for generating parallel programs that analyze data and control dependencies between tasks, fuse tasks with conditional branches and their subsequent tasks, and assign them to processing elements using static scheduling, thereby hiding the conditional branch within a single task to avoid dynamic scheduling overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If dynamic scheduling is used to assign tasks to processing elements at runtime, then the parallel program can handle conditional branches flexibly, but the scheduling overhead becomes relatively large when task execution time is short

Engineering Contradiction:
Improvehandling of conditional branchesVSAvoidscheduling overhead
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by performing task assignment to processing elements in advance during the compilation phase rather than at runtime. The parallelization compiler analyzes the sequential program, identifies conditional branches and subsequent tasks, and pre-determines the mapping between tasks and processing elements. This eliminates the need for runtime scheduling decisions, thereby reducing scheduling overhead while maintaining the ability to handle conditional branches through static analysis and task fusion strategies.

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If static scheduling is used to assign tasks to processing elements at compilation time, then scheduling overhead is eliminated at runtime, but it becomes difficult to handle sequential programs with conditional branches and function calls

Engineering Contradiction:
Improvescheduling overheadVSAvoidhandling of conditional branches
Core Design Contradiction:
Loss of timeVSAdaptability or versatility

Solution Approach 1:

The patent performs preliminary analysis during compilation to identify conditional branches and determine task fusion opportunities. By analyzing control flow and data dependencies in advance, the compiler can make informed decisions about which tasks to fuse and how to map them to processing elements, enabling static scheduling to handle programs with conditional branches effectively.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies merging by combining conditional branch tasks with their subsequent tasks into fused task groups. This fusion strategy allows the compiler to treat conditional branch sequences as unified execution units, making it easier to assign them to processing elements using static scheduling while preserving the conditional logic within the fused tasks.

Inventive Principle:
Principle #5Merging (Combining)

3Loss of time

If tasks including conditional branches are fused into one task for static scheduling, then the conditional branch is hidden and dynamic scheduling is not needed, but the possibility of extracting parallelly executable tasks may be reduced

Engineering Contradiction:
Improvescheduling overheadVSAvoidparallel execution speed
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The patent applies segmentation by dividing the program into tasks at multiple granularities. Instead of fusing all conditional branch sequences into single tasks, the compiler identifies suitable fusion points while maintaining smaller executable units where parallelism exists. This segmented approach allows static scheduling to reduce overhead while preserving opportunities for parallel execution among the segmented tasks.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by applying task fusion selectively rather than uniformly throughout the program. The compiler analyzes each conditional branch sequence locally to determine the optimal fusion strategy, fusing tasks only when it reduces overhead without significantly impacting parallelism, and leaving other sequences more granular to exploit parallelism. This localized optimization balances overhead reduction with parallel execution speed.

Inventive Principle:
Principle #3Local quality

Data Source

PatentEP3343351B1Parallel program generating method and parallelization compiling apparatus
Publication Date: 2023.04.26 WASEDA UNIV
  • EP3343351B1 patent drawingFigure 1
  • EP3343351B1 patent drawingFigure 2
  • EP3343351B1 patent drawingFigure 3

AI summary

There is provided a parallel program generating method capable of generating a static scheduling enabled parallel program without undermining the possibility of extracting parallelism. The parallel program generating method executed by the parallelization compiling apparatus 100 includes a fusion step (FIG. 2/STEP026) of fusing, as a new task, a task group including a reference task as a task having a conditional branch, and subsequent tasks as tasks control dependent, extended-control dependent, or indirect control dependent on respective of all branch directions of the conditional branch included in the reference task.