Presentation is loading. Please wait.

Presentation is loading. Please wait.

Static Translation of Stream Program to a Parallel System S. M. Farhad The University of Sydney.

Similar presentations


Presentation on theme: "Static Translation of Stream Program to a Parallel System S. M. Farhad The University of Sydney."— Presentation transcript:

1 Static Translation of Stream Program to a Parallel System S. M. Farhad The University of Sydney

2 2 The Free Lunch Is Over Uniprocessor hits the physical limit  Multicore, many core systems Programming challenges now  Multiple flows of control and memories  Finding algorithm that can run in parallel  Correctness of the program  Synchronization Issues  Debugging the program 2

3 3 Stream Programming Paradigm It expresses parallelism inherently It leverages program structure to discover parallelism and delivers high performance It is structured around notion of a “stream” A streaming computation represents  A sequence of transformations on the data streams  A stream program is the composition of filters into a stream graph Filter Input channels Output channels

4 4 StreamIt Language An implementation of stream programming It exposes parallelism It is architecture independent Modular parallel computation may be any StreamIt language construct joiner splitter pipeline feedback loop joiner splitter splitjoin filter

5 5 A Simple Filter in StreamIt int->int filter A { init { // empty } work pop 1 peek 2 push 1 { push(peek(0) + peek(1)); pop(); } A

6 StreamIt Example float->float pipeline Example() { add A(); add B(); add splitjoin { split duplicate; add D(); add E(); join roundrobin; } add G(); add H(); } 6 G H A B D split join E z

7 Research Question? How to parallelize the stream program  Optimize throughput Synchronous model  Describes bandwidths of streams in steady state Bottleneck actor  An actor constrains “z” 7 G H A B D split join E z 1 11 1 11 1 1

8 8 8 Static Translation of Stream Programs We propose  A simple quantitative analysis to resolve bottlenecks in stream programs  Actors mapping technique to a parallel system  Scheduling of mapped actors in each processor Our goal  To statically optimize the throughput of a stream program

9 Finding Closed Form We assume bandwidth functions are “linear functions” We have a system of simultaneous linear equations The output are shown as weights We express output of each actor as a function of “z” 9 G H A B D split join E z 1.0 0.5 1.0

10 10 Mapping Actors to Processors An NP-hard problem  Takes too long time Approximation algorithm  Much faster O(n log n)  Non-optimal solution We formulate Integer Linear Programming problem considering  Input, output and processing bandwidths of each actor  Processing capacity each processor  Inter processor communication bandwidths P1 P2 P3 G H A B D split join E z 1.0 0.5 1.0

11 11 Mapping Actors to Processors Condt. We develop a test for a given “z” We find a mapping using “Binary Search” 0 z qiven 1 Solution space mid

12 Resolve Bottleneck We find bottleneck by quantitative analysis  Actors constraining the system bandwidth Duplicate hot actors Then we run the whole process again Reason of considering bottleneck after mapping 12 0 z sys 1 < bw actor

13 Actor Scheduling for Processors 13 t Actor A Actor B Schedule of processor P 1

14 14 Entire Framework Finding a Closed Form Resolve Bottleneck Find Mapping by ILP/Approx. Schedule Actors for Processors

15 15 Execution Time of ILP Solver

16 Execution Time of a Variation of Bin-packing Algorithm 16

17 17 Optimal vs. Approximation

18 Summary We develop a synchronous model for stream programs Statically optimize the throughput of stream programs Resolving bottleneck by simple quantitative analysis Finding an approximation for the mapping problem 18

19 Related Works [1] Static Scheduling of SDF Programs for DSP [Lee ‘87] [2] StreamIt: A language for streaming applications [Thies ‘02] [3] Phased Scheduling of Stream Programs [Thies ’03] [4] Exploiting Coarse Grained Task, Data, and Pipeline Parallelism in Stream Programs [Thies ‘06] [5] Orchestrating the Execution of Stream Programs on Cell [Scott ’08] [6] Software Pipelined Execution of Stream Programs on GPUs [Udupa‘09] [7] Synergistic Execution of Stream Programs on Multicores with Accelerators [Udupa ‘09] 19


Download ppt "Static Translation of Stream Program to a Parallel System S. M. Farhad The University of Sydney."

Similar presentations


Ads by Google