Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow...

10
Dataflow Analysis Revisited Twan Basten [email protected] ‘Knowing is not understanding.’ Charles Kettering 2 Acknowledgements Joint work with: Marc Geilen Sander Stuijk AmirHossein Ghamarian Bart Theelen Projects: NWO PROMES EC FP6 Betsy EC FP7 MNEMEE 3 Overview Embedded Multi-media Analysis of Synchronous Dataflow Graphs Throughput Analysis Throughput-Storage Trade-off Analysis Parametric Throughput Analysis Scenario-aware Dataflow Multiprocessor System-on-Chip Design Looking Forward 4 Trends Concurrency Connectedness Interaction Variability Embedded Multi-media emb. mm throughput storage parameters mpsocs the future scenarios

Transcript of Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow...

Page 1: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

Dataflow Analysis Revisited

Twan Basten

[email protected]

‘Knowing is not understanding.’

Charles Kettering

2 Acknowledgements

Joint work with:

• Marc Geilen

• Sander Stuijk

• AmirHossein Ghamarian

• Bart Theelen

• …

Projects:

• NWO PROMES

• EC FP6 Betsy

• EC FP7 MNEMEE

3 Overview

• Embedded Multi-media

• Analysis of Synchronous Dataflow Graphs

• Throughput Analysis

• Throughput-Storage Trade-off Analysis

• Parametric Throughput Analysis

• Scenario-aware Dataflow

• Multiprocessor System-on-Chip Design

• Looking Forward

4

Trends

Concurrency

Connectedness

Interaction

Variability

Embedded Multi-media

emb. mm throughput storage parameters mpsocs the futurescenarios

Page 2: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

5 Embedded Multi-media

emb. mm throughput storage parameters mpsocs the futurescenarios

6 Embedded Multi-media

emb. mm throughput storage parameters mpsocs the futurescenarios

7 Embedded Multi-media

emb. mm throughput storage parameters mpsocs the futurescenarios

8 Approach: Models of Computation (MoCs)

functionality

concurrency

timing

energy

quality…

Basic dimensions

processing

communication

storage

functionality

concurrency

timing

energy

quality…

Aspects Derivatives

executiontime

energydissipation

perceivedquality

reconfigurationtime

essential for predictabilityon the interface between science and engineering

emb. mm throughput storage parameters mpsocs the futurescenarios

Page 3: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

9 Essential Challenges

predictability and efficiency

… are contradictory

emb. mm throughput storage parameters mpsocs the futurescenarios

10 Overview

• Embedded Multi-media

• Analysis of Synchronous Dataflow Graphs

• Throughput Analysis

• Throughput-Storage Trade-off Analysis

• Parametric Throughput Analysis

• Scenario-aware Dataflow

• Multiprocessor System-on-Chip Design

• Looking Forward

ACSD 2006

11 Synchronous Data Flow Graphs

A,1 B,2 C,22 3 1 2

2 3 1 2

1 1

1

1 1

1

1 1

1

4 2

channelratetoken

execution time

actor

Throughput: average number of actor firings over time

emb. mm throughput storage parameters

(SDFGs [Lee 1986])

mpsocs the futurescenarios

12 Self-timed Execution

• Each actor fires as soon as it can fire

• Known to maximize throughput

emb. mm throughput storage parameters mpsocs the futurescenarios

Page 4: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

13 Our Throughput Analysis Method

A,1 B,2 C,22 3 1 2

2 3 1 2

1 1

1

1 1

1

1 1

1

423

4213

21

21

1

A

A

A, C

A, CB

B

B

B

A

Periodic PhaseTransient Phase

State: distribution of tokens + remaining execution times

Throughput can be calculatedfrom the periodic phase

emb. mm throughput storage parameters ACSD 2006

Efficient implementationConsider a subset of the firings of one actor only to detect a recurrent state

mpsocs the futurescenarios

14 Traditional Throughput Analysis

• Convert the SDFG to a Homogeneous SDFG (HSDFG)

• Compute the throughput of the HSDFG

Disadvantage: conversion may lead to an explosionin the size of the graph

Dataflow graph H.263 decoder

HSDFG with 1190 actors

SDFG

HSDFG

emb. mm throughput storage parameters mpsocs the futurescenarios

15 Throughput Analysis: Our Result

1. 10-31. 10-31. 10-31. 10-3MP3 dec.

>1800>1800>180010. 10-3H.263 decoder

>1800>1800>180056. 10-3Satellite

>1800>1800>18002. 10-3Sample Rate

81. 10-381. 10-382. 10-31.10-3Modem

Young

Tarjan

Orlin

HowardDasdan

Gupta

State

Space

Runtimes of various throughput analysis methods (in seconds)

All use conversion to HSDFG

emb. mm throughput storage parameters mpsocs the futurescenarios

16 Conclusions Throughput Analysis

• The first method to perform throughput analysis directly on SDFGs

• Experimental results show that the state-space technique outperforms all other existing techniques

• Can be easily integrated in simulation tools

emb. mm throughput storage parameters mpsocs the futurescenarios

Page 5: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

17 Overview

• Embedded Multi-media

• Analysis of Synchronous Dataflow Graphs

• Throughput Analysis

• Throughput-Storage Trade-off Analysis

• Parametric Throughput Analysis

• Scenario-aware dataflow

• Multiprocessor System-on-Chip Design

• Looking Forward

DAC 2006, IEEE T on Comp 2008

18

`

5 6 7 8 9 10 110

0.05

0.1

0.15

0.2

0.25

thro

ug

hp

ut

storage

Trade-off: Storage vs. Throughput

DSP synthesis

multi-media

applications

emb. mm throughput storage parameters mpsocs the futurescenarios

19 Storage Distribution

• Separate memory for each channel.

• Backward channels used to model storage space.

A,1 B,2 C,22 3 1 2α β

Tokens on channels must be stored in memory.

A,1 B,2 C,22 3 1 2α β

2 3 1 2

Storage distribution ⟨α, β⟩ → ⟨4,2⟩

24

emb. mm throughput storage parameters

1 1

1

1 1

1

1 1

1

1 1

1

1 1

1

1 1

1

mpsocs the futurescenarios

20 Problem Definition

5 6 7 8 9 10 110

0.05

0.1

0.15

0.2

0.25

thro

ug

hp

ut

distribution size

⟨⟨⟨⟨4,2⟩⟩⟩⟩⟨⟨⟨⟨6,2⟩⟩⟩⟩

⟨⟨⟨⟨6,3⟩⟩⟩⟩

⟨⟨⟨⟨7,3⟩⟩⟩⟩

⟨⟨⟨⟨5,3⟩⟩⟩⟩

Find all minimal storage distributions for any possible throughput

1 1

1

1 1

1

1 1

1

A,1 B,2 C,22 3 1 2α β

emb. mm throughput storage parameters mpsocs the futurescenarios

Page 6: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

21

tk(α)

tk(β)

sp(α)

sp(β)

tk(A)

tk(α)sp(α)

Dependency Graph

A3 A4

B0

C0

A2 B1

C1C1B3B3A5B2B2A4A3

A7A6

C0C0B1B1A2B0B0A1A0

16151413121110987654321

A,1 B,2 C,2α β

cycles denotestorage

dependencies

emb. mm throughput storage parameters

sp - space

tk - token

2 3 1 2

mpsocs the futurescenarios

22

tk(α)

tk(β)

sp(α)

sp(β)

tk(A)

tk(α)sp(α)

Abstract Dependency Graph

A3 A4

B0

C0

A2 B1

tk(α) tk(β)

sp(β)

tk(A)

sp(α)

A B C

abstract dependency graph contains all storage

dependencies

emb. mm throughput storage parameters mpsocs the futurescenarios

23 Design-Space Exploration Algorithm

Given an SDFG G with storage distribution δ

1. Compute throughput and abstract dependency graph ∆ for G with δ

2. For each channel c with a storage dependency in ∆

3. Create new storage distribution by enlarging c

4. Repeat steps 1-2

All minimal storage distributions are found

when starting from storage distribution ⟨0,...,0⟩

emb. mm throughput storage parameters mpsocs the futurescenarios

24 Experimental Results

2ms

3

3

16

1/132

12

1/137

12

13

MP3

53min

3254

3254

8006

1/10000

4753

1/21876

3

4

H.263

7ms

2

2

1544

0.23

1542

0.18

26

22

Satellite

1msExec. time

5#Distributions

4#Pareto points

10Distr. size

1/4Max throughput

6Distr. size

1/7min throughput > 0

2#channels

3#actors

Example

Approximation

increase buffers with n times the minimal step size

emb. mm throughput storage parameters mpsocs the futurescenarios

Page 7: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

25 Conclusions Trade-off Analysis

• Exact minimum memory requirements for any possible throughput.

• Technique to search space of storage distributions efficiently.

• Experiments show feasibility of the approach.

• Technique can be combined with heuristics to prune the search space if necessary.

emb. mm throughput storage parameters mpsocs the futurescenarios

26 Overview

• Embedded Multi-media

• Analysis of Synchronous Dataflow Graphs

• Throughput Analysis

• Throughput-Storage Trade-off Analysis

• Parametric Throughput Analysis

• Scenario-aware dataflow

• Multiprocessor System-on-Chip Design

• Looking Forward

27 Parametric Throughput Analysis

H.263 decoder

throughput expression

(max {593 IQ + 594 IDCT + MC, VLD + 594 IQ + 593 IDCT})-1

Divide and Conquer: divide space in throughput regions

Parametric actor execution times

emb. mm throughput storage parameters DATE 2008mpsocs the futurescenarios

28 Overview

• Embedded Multi-media

• Analysis of Synchronous Dataflow Graphs

• Throughput Analysis

• Throughput-Storage Trade-off Analysis

• Parametric Throughput Analysis

• Scenario-aware dataflow

• Multiprocessor System-on-Chip Design

• Looking Forward

Page 8: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

29 Scenario-aware H.263 Decoder Model

1

1VLD IDCT

RCMCFD1

1

3

1 1

1

1

1

11

1 e

ddd

a

bc c

Detector

Kernel

Parameterized

rate

Control channelData

channel

Tokens

I P99 P99

P0

...

1

Fixed rate

Rate I Px P0

a 0 1 0

b 0 x 0

c 99 x 1

d 1 1 0

e 99 x 0

Execution time

VLDP0 0

others 40

IDCTP0 0

others 17

MC

I, P0 0

P30 90

P40 145

P50 190

P60 235

P70 265

P80 310

P99 390

RC

I 350

P0 0

P30, P40, P50 250

P60 300

P70, P80, P99 320

FD All 0

x={30,40,50,60,70,80,99}

mpsocs the futurescenariosemb. mm throughput storage parameters

(FSM-based Scenario-Aware DataFlow (SADF))

MEMOCODE 2006

30 Scenario-aware Performance Analysis

• SDF-based throughput analysis considers worst-case actor times

• Scenario-aware throughput analysis considers worst-case actor times per scenario, but it must consider scenario transitions

• Analyzing all scenario transitions separately can be avoided

• Separate scenario transitions with an invariant reference schedule

• For every scenario, our method allows to compute the bound on the completion time of an iteration

mpsocs the futurescenariosemb. mm throughput storage parameters Marc Geilen

31 Overview

• Embedded Multi-media

• Analysis of Synchronous Dataflow Graphs

• Throughput Analysis

• Throughput-Storage Trade-off Analysis

• Parametric Throughput Analysis

• Scenario-aware dataflow

• Multiprocessor System-on-Chip Design

• Looking Forward

32

Huffman

Req.

Req.

Reorder

Reorder

Stereo

Antialias

Hybrid

Synth.

Antialias

Hybrid

Synth.

Freq.Inv.

Subb.

Inv.

Freq.Inv.

Subb.

Inv.

+

NI

CAP3

t4

R R

M

NI

CAP2

t5

M

R R

M

CAP1

t1

NI

M

CAP2

t2

NI

R

NI

CAP1

t6

M

R

M

CAP3

t3

NI

SDF-based MP-SoC Compilation

PhD Sander Stuijkmpsocs the futurescenariosemb. mm throughput storage parameters

Page 9: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

33

mpsocs the futurescenariosemb. mm throughput storage parameters

SDF-based MP-SoC Compilation

PhD Sander Stuijk

(4 steps)

(2 steps)

(4 steps)

(3 steps)

34 Horizon: Scenario-aware Flow

extract application

model

keep trade-offs

select operating

point and switch

dynamically

mpsocs the futurescenariosemb. mm throughput storage parameters

35 SDF3 Toolkit

www.es.ele.tue.nl/sdf3

mpsocs the futurescenariosemb. mm throughput storage parameters

36 Overview

• Embedded Multi-media

• Analysis of Synchronous Dataflow Graphs

• Throughput Analysis

• Throughput-Storage Trade-off Analysis

• Parametric Throughput Analysis

• Scenario-aware Dataflow

• Multiprocessor System-on-Chip Design

• Looking Forward

Page 10: Dataflow Analysis Revisited - TU/etbasten/presentations/ST-Ericsson.pdf · 2009-02-19 · Dataflow Analysis Revisited Twan Basten a.a.basten@tue.nl ‘Knowing is not understanding.’

37 Dataflow MoCs Expressiveness Hierarchy

RPN: Reactive Process Networks

KPN: Kahn Process Networks

DF: DataFlow

DDF: Dynamic DF

BDF: Boolean DF

CSDF: Cyclo-Static DF

SDF: Synchronous DF

HSDF: Homogeneous SDF

• BDF and larger: turing complete

• Better notions of expressivenessneeded

mpsocs the futurescenariosemb. mm throughput storage parameters

38 Challenges

• Suitable notions of expressivity

• Expressivity while maintaining analyzability and synthesizability

• Abstraction without loosing accuracy

• Composability and compositionality

• MoCs for non-functional aspects

• Unification of MoCs

• Multi-objective trade-off analysis

• Parametric analysis

• Model-driven design and synthesis flows

• Model-driven run-time systems

mpsocs the futurescenariosemb. mm throughput storage parameters

39 Thank you !

More info: www.es.ele.tue.nl/~tbasten/

Questions ?

‘An understanding of the natural world and what's in it

is a source of not only a great curiosity but great fulfillment.’

David Attenborough