# US 2014/0196017 A1 · System and method for compiler assisted parallelization of a stream processing operator

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0196017 A1
- Document ID: US20140196017A1
- Status: Published application
- Kind: A1
- Application number: 13/525,917
- Filed: 2012-06-18
- Published: 2014-07-10
- Earliest claimed: 2012-06-18
- Assignees: International Business Machines Corporation
- Inventors: Nagui Halim; Vibhore Kumar; Kung-Lung Wu; Sai Wu
- Web page: https://patentgrep.com/patent/US20140196017A1

## CPC

- G06F 8/45: {Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of enabling compiler assisted parallelization of one or more stream processing operators in a stream processing application, which consists of a data flow graph with operators as vertices connected by streams. The method includes specifying a parallelized version of one or more of the operators, with a parameterized degree of parallelism, in the stream application, evaluating whether or not to use the parallelized operator, deciding the degree of parallelism of the parallelized operator, if there is a need for a parallelized operator.

## Claims

### Claim 1

A method of enabling compiler assisted parallelization of one or more stream processing operators in a stream processing application operating on a computer processing device, the method comprising:
creating a theoretical model of one or more operators in a compiler, wherein a theoretical model is based on a plurality of factors comprising at least one of: (i) an average processing time per tuple, (ii) an average number of accesses to a shared state per tuple, and (iii) a time to read/write to the shared state;
specifying a parallelized version of the one or more operators in said stream application based on the theoretical model;
evaluating whether the theoretical model improves the performance of the one or more operators;
computing a degree of parallelism if the theoretical model improves the performance of the one or more operators; and
replacing the one or more operators with the parallelized version of the one or more operators, in response to computing the degree of parallelism.

### Claim 2 (depends on 1)

The method of claim 1 wherein
evaluating whether the theoretical model improves the performance of the one or more operator comprises determining the greater of the throughput of a single operator and the throughput of said parallelized operator at compile time.

### Claim 3 (depends on 1)

The method of claim 1, wherein the step of specifying a parallelized version of the one ore more operators in said stream application based on the theoretical model comprises:
providing a parallelized version of the one or more operators as part of a library associated with said stream application.

### Claim 4 (depends on 1)

The method of claim 1, wherein the step of computing the degree of parallelism occurs at compile time.

### Claim 5 (depends on 1)

The method of claim 1, wherein the step of computing the degree of parallelism occurs at run time.

### Claim 6 (depends on 1)

The method of claim 1, wherein said parallelized version of the one or more operators utilizes a shared state.

### Claim 7

A computer readable storage medium tangibly embodying a computer readable program code having computer readable instructions which, when implemented, cause a computer to carry out a method of enabling compiler assisted parallelization of one or more stream processing operators in a stream processing application operating on a computer processing device, the method comprising:
creating a theoretical model of one or more operators in a compiler, wherein a theoretical model is based on a plurality of factors comprising at least one of: (i) an average processing time per tuple, (ii) an average number of accesses to a shared state per tuple, and (iii) a time to read/write to the shared state;
specifying a parallelized version of the one or more operators in said stream application based on the theoretical model;
evaluating whether the theoretical model improves the performance of the one or more operators;
computing the degree of parallelism if the theoretical model improves the performance of the one or more operators; and
replacing the one or more operators with the parallelized version of the one or more operators, in response to computing the degree of parallelism.

### Claim 8 (depends on 7)

The method of claim 7 wherein
evaluating whether the theoretical model improves the performance of the one or more operators comprises selecting the greater of the throughput of a single operator and the throughput of said parallelized operator at compile time.

### Claim 9 (depends on 7)

The method of claim 7, wherein the step of specifying a parallelized version of a the one ore more operators in said stream application based on the theoretical model comprises:
providing a parallelized version of the one or more processing operators as part of a library associated with said stream application.

### Claim 10 (depends on 7)

The method of claim 7, wherein the step of computing the degree of parallelism occurs at compile time.

### Claim 11 (depends on 7)

The method of claim 7, wherein the step of computing the degree of parallelism occurs at run time.

### Claim 12 (depends on 7)

The method of claim 7, wherein said parallelized version of the one or more operators utilizes a shared state.

### Claim 13

A system of enabling compiler assisted parallelization of one or more stream processing operators in a stream processing application operating on a computer processing device configured to:
creating a theoretical model of one or more operators in a compiler, wherein a theoretical model is based on a plurality of factors comprising at least one of: (i) an average processing time per tuple, (ii) an average number of accesses to a shared state per tuple, and (iii) a time to read/write to the shared state;
specify a parallelized version of the one or more operators in said stream application based on the theoretical model;
evaluate whether the theoretical model improves the performance of the one or more operators;
compute the degree of parallelism for the one ore more operators if the theoretical model improves the performance of the one or more operators; and
replace the one or more operators with the parallelized version of the one or more operators, in response to computing the degree of parallelism.

### Claim 14 (depends on 13)

The system of claim 13, wherein the processing device
evaluate whether the theoretical model improves the performance of the one or more operators comprises determining the greater of the throughput of a single operator and the throughput of said parallelized operator at compile time.

### Claim 15 (depends on 13)

The system of claim 13, wherein the processing device configured to specify a parallelized version of the one ore more operators is further configured to:
provide a parallelized version of the one or more operators as part of a library associated with said stream application.

### Claim 16 (depends on 13)

The system of claim 13, wherein the processing device configured to compute the degree of parallelism occurs at compile time.

### Claim 17 (depends on 13)

The system of claim 13, wherein the processing device configured to compute the degree of parallelism occurs at run time.

### Claim 18 (depends on 13)

The system of claim 13, wherein said parallelized version of the one or more operators utilizes a shared state.
