Worst-case Throughput Analysis for Parametric Rate and Parametric - - PowerPoint PPT Presentation

worst case throughput analysis for parametric rate and
SMART_READER_LITE
LIVE PREVIEW

Worst-case Throughput Analysis for Parametric Rate and Parametric - - PowerPoint PPT Presentation

Introduction Preliminaries Performance analysis for PSADF Experiments Worst-case Throughput Analysis for Parametric Rate and Parametric Actor Execution Time Scenario-Aware Dataflow Graphs Mladen Skelin Norwegian University of Science and


slide-1
SLIDE 1

Introduction Preliminaries Performance analysis for PSADF Experiments

Worst-case Throughput Analysis for Parametric Rate and Parametric Actor Execution Time Scenario-Aware Dataflow Graphs Mladen Skelin

Norwegian University of Science and Technology Department of Engineering Cybernetics

SynCoP 2014

Mladen Skelin

slide-2
SLIDE 2

Introduction Preliminaries Performance analysis for PSADF Experiments

Outline I

1

Introduction

2

Preliminaries SDF SADF

3

Performance analysis for PSADF

4

Experiments

Mladen Skelin

slide-3
SLIDE 3

Introduction Preliminaries Performance analysis for PSADF Experiments

Performance analysis

Throughput Latency

Mladen Skelin

slide-4
SLIDE 4

Introduction Preliminaries Performance analysis for PSADF Experiments

Dataflow models and dynamic applications

Synchronous dataflow1 (SDF) as a restriction of Kahn process networks SDF is very fitted for modeling regular streaming applications . . . , but not dynamic applications Therefore we need more expressive models than SDF

An example SDFG

1Lee, E.A. et al.: Synchronous data flow.

Mladen Skelin

slide-5
SLIDE 5

Introduction Preliminaries Performance analysis for PSADF Experiments

Scenario-aware dataflow (SADF)

SADF1 encodes the dynamism of an application by identifying a FINITE number of different behaviours called modes or scenario where every scenario is given by a an SDFG A finite state machine (FSM) is used to encode scenario occurrence patterns SADF is equiped with a technique that yields the exact performance guarantees2

An example SADFG

1Theelen, B.D. et al.: A scenario-aware data flow model for combined

long-run average and worst-case performance analysis.

2Geilen, M. et al.: Worst-case Performance Analysis of Synchronous

Dataflow Scenarios.

Mladen Skelin

slide-6
SLIDE 6

Introduction Preliminaries Performance analysis for PSADF Experiments

SADF

SADF is limited by its finiteness: Example application

ProcessData.A(out g, out h); for (i=0; i<=g; i++){ for (j=0; j<=h; j++){ // Perform two tasks in parallel #region ParallelTasks // Perform two tasks in parallel Parallel.Invoke(() => { ProcessData.B(i,j); }, // close first parallel action () => { ProcessData.C(i,j); } // close second parallel action ); // close Parallel.Invoke #endregion ProcessData.D(i,j); } } Mladen Skelin

slide-7
SLIDE 7

Introduction Preliminaries Performance analysis for PSADF Experiments

SADF

g takes a value from the interval

  • 0, n

2

  • h take a value from the interval
  • 0, m

2

  • Application exhibits as many behaviours as there are

integer points in the rational 2-polytope Pn,m given by the set of constraints {0 ≤ 1

2n, 0 ≤ 1 2m}

For n = 4500 and m = 2001 we would have to generate 2,252,126 SDFGs

Mladen Skelin

slide-8
SLIDE 8

Introduction Preliminaries Performance analysis for PSADF Experiments

Parmetrization of SADF

Parametrization as a solution to the problem of SADF “finitness” We raise the problem of SADF parametrization in the scope of existing parametric dataflow models Schedulable parametric dataflow1 (SPDF) provides a high level of generalization SPDF and syntactical convenience Goal is to embed SPDF into SADF for the purpose of performance analysis

1Fradet, P

. et al.: SPDF: A schedulable parametric data-flow MoC.

Mladen Skelin

slide-9
SLIDE 9

Introduction Preliminaries Performance analysis for PSADF Experiments

Parmetrization of SADF

We define the parametric rate and parametric execution time SADF (PSADF) We formally define the semantics of the PSADF model relevant for throughput analysis based on (max,+) linear system theory and (max,+) automata We give the algorithms for worst-case throughput analysis

  • f PSADF graphs with a fully connected, possibly infinite

state transition system

Mladen Skelin

slide-10
SLIDE 10

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

Outline I

1

Introduction

2

Preliminaries SDF SADF

3

Performance analysis for PSADF

4

Experiments

Mladen Skelin

slide-11
SLIDE 11

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

SDF

Definition A Synchronous dataflow graph (SDFG) is a tuple SDFG = (G ,R,D,i,r,e), where: G is a connected directed graph (A ,E ) with A a set of nodes (actors) and E ⊆ A ×A a set of edges (channels); R ⊂ N+ is a set of rates used to define SDFG rates by the grammar FR ::= r, where r ∈ R; D ⊂ R+

0 is a set of actor execution times used to define SDFG actor

execution times by the grammar FD ::= d, where d ∈ D; i : E → N0 returns for each channel its number of initial tokens; r : A ×E → FR returns for each port (represented by an actor and one

  • f its channels) its rate;

e : A → FD returns for each actor its execution time.

Mladen Skelin

slide-12
SLIDE 12

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

(max,+) algebra for SDF

Let γ denote the vector of production times of tokens that exist in their different channels in between iterations The evolution of the graph is then given by the following equation: γk+1 = G γk, where G = {gij} is a characteristic (max,+) matrix of the graph Entry gij specifies the minimal elapsed time from the production time of the jth token in the previous iteration to the production time of the ith in the current iteration Matrix G defines a corresponding (max,+) automaton graph (MPAG) Throughput of the SDFG takes the value 1/λ, where λ is the maximum cycle mean (MCM) of the MPAG

Mladen Skelin

slide-13
SLIDE 13

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

(max,+) algebra for SDF

An example SDFG MPAG of the example SDFG

G = ⎡ ⎢ ⎢ ⎢ ⎣ 29 −∞ −∞ 29 −∞ 33 4 −∞ 33 −∞ 63 −∞ 30 63 −∞ −∞ −∞ −∞ −∞ 64 5 31 64 −∞ ⎤ ⎥ ⎥ ⎥ ⎦ Mladen Skelin

slide-14
SLIDE 14

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

(max,+) algebra for SDF

For example, γ1 can be calculated as:

  • γ1 =

⎡ ⎢ ⎢ ⎢ ⎣ 29 −∞ −∞ 29 −∞ 33 4 −∞ 33 −∞ 63 −∞ 30 63 −∞ −∞ −∞ −∞ −∞ 64 5 31 64 −∞ ⎤ ⎥ ⎥ ⎥ ⎦ ⎡ ⎢ ⎢ ⎢ ⎣ ⎤ ⎥ ⎥ ⎥ ⎦ = ⎡ ⎢ ⎢ ⎢ ⎣ max(29+0,29+0) max(33+0,4+0,33+0) max(63+0,30+0,63+0) max(0+0) max(64+0,5+0,31+0,64+0) ⎤ ⎥ ⎥ ⎥ ⎦ = ⎡ ⎢ ⎢ ⎢ ⎣ 29 33 63 64 ⎤ ⎥ ⎥ ⎥ ⎦ Mladen Skelin

slide-15
SLIDE 15

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

SADF

Definition A Scenario-aware dataflow graph (SADFG) is a tuple SADFG = (S,F), where: S = {si | si = (sceni,Gi)} is a set of ordered pairs of scenarios and their corresponding SDFGs; F = (Q,q0,δ,Σ,E) is the scenario finite state machine consisting of a finite set Q of states, an initial state q0 ∈ Q, a transition relation δ ⊆ Q×Q, a scenario labelling Σ : Q → S and a set of final states E, where E = Q.

Mladen Skelin

slide-16
SLIDE 16

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

(max,+) algebra for SADF

Let G(si) denote the n×n (max,+) characteristic matrix for the scenario si The completion time of a k-long sequence of scenarios can then be defined as a sequence of (max,+) matrix multiplications A (s1 ...sk) = G(sk)...G(s1)

  • The worst case increase of A (s) for a growing length of s specifies the

worst-case throughput for any sequence of scenarios Again, the inverse of the MCM (1/λ) of the SADF MPAG denotes the worst-case throughput A special case that arises in practice is when scenarios can occur in arbitrary order, yielding the SADF FSM to be fully connected and with a single state for each scenario Then is the throughput of an SADF equal to the maximum cycle mean

  • f the MPAG that corresponds to the (max,+) matrix G = max

q∈Q (G(Σ(q)))

Mladen Skelin

slide-17
SLIDE 17

Introduction Preliminaries Performance analysis for PSADF Experiments SDF SADF

(max,+) algebra for SADF

An example SADFG MPAG of the example SADFG

G(a) = ⎡ ⎢ ⎢ ⎢ ⎣ 29 −∞ −∞ 29 −∞ 33 4 −∞ 33 −∞ 63 −∞ 30 63 −∞ −∞ −∞ −∞ −∞ 64 5 31 64 −∞ ⎤ ⎥ ⎥ ⎥ ⎦ G(b) = ⎡ ⎢ ⎢ ⎢ ⎣ 28 −∞ −∞ 28 −∞ 34 6 −∞ 34 −∞ 72 −∞ 24 72 −∞ −∞ −∞ −∞ −∞ 82 16 34 82 −∞ ⎤ ⎥ ⎥ ⎥ ⎦ Mladen Skelin

slide-18
SLIDE 18

Introduction Preliminaries Performance analysis for PSADF Experiments

Outline I

1

Introduction

2

Preliminaries SDF SADF

3

Performance analysis for PSADF

4

Experiments

Mladen Skelin

slide-19
SLIDE 19

Introduction Preliminaries Performance analysis for PSADF Experiments

Parametrization of SADF

SADF becomes impractical or even infeasible when it faces applications with a vast set of possible behaviours We need a compact representation Parametrization is not trivial (liveness, boundedness and schedulability) Parametrization of SADF by embedding an parametric model into SADF SPDF – liveness and boundedness properties for SPDF are decidable SPDF extends SDF by allowing rates to be parametric while preserving static schedulability We add the notion of time to SPDF

Mladen Skelin

slide-20
SLIDE 20

Introduction Preliminaries Performance analysis for PSADF Experiments

SPDF

Definition A schedulable parametric dataflow graph (SPDFG) is a tuple SPDFG = (G ,PR,PD,i, r,e,M,α), where: G is a directed connected graph (A ,E ) with A set of actors and E ⊆ A ×A set of edges (channels); PR is a set of rate parameters (symbolic variables) used to define SPDF rates by the grammar FR ::= k | pr | FR1 ·FR2, where pr ∈ PR, k ∈ N+; PD is a set of actor execution time parameters (symbolic variables) used to define SPDF actor execution times by the grammar FD ::= k ·pd | FD 1 +FD2, where pd ∈ PD, k ∈ R+

0 ;

i : E → N0 returns for each edge channel its number of initial tokens; r : A ×E → FR returns for each port (represented by an actor and one of its edges) its rate; e : A → FD returns for each actor its execution time; M : PR → A and α : PR → FR returns for each rate parameter its modifier and its change period. Mladen Skelin

slide-21
SLIDE 21

Introduction Preliminaries Performance analysis for PSADF Experiments

SPDF

An example SPDFG

Mladen Skelin

slide-22
SLIDE 22

Introduction Preliminaries Performance analysis for PSADF Experiments

Parametric SADF

Definition A parametric rate and parametric actor execution time SADFG (PSADFG) is a tuple PSADFG = (G,Ω,F), where: G is a live SPDFG; Ω = {

  • p |

p ∈ N+|PR| ×R+

|PD|} is a bounded and closed

set of all allowed parameter values (rates and actor execution times) for G or shortly the parameter space; F = (Q,q0,δ,Σ) is the scenario state transition system consisting of a possibly infinite set Q of states, an initial state q0 ∈ Q, a transition relation δ ⊆ Q×Q and a scenario labelling Σ : Q → Ω.

Mladen Skelin

slide-23
SLIDE 23

Introduction Preliminaries Performance analysis for PSADF Experiments

Parametric SADF

In contrast to SADF , which explicitly defines scenarios as a finite collection of SDF graphs, in PSADF scenarios are implicitly defined over the bounded and closed vector parameter space Ω Let G(

  • p) be the PSADF (max,+) characteristic n×n matrix

for the parameter space point p, where n is the number of initial tokens in PSADFG Every finite path of arbitrary length q over the scenario transition system F corresponds to a sequence s with s(k) = Σ(q(k)) The evaluation of the PSADFG’s SPDFG G at a parameter space point is nothing else than an SDFG

Mladen Skelin

slide-24
SLIDE 24

Introduction Preliminaries Performance analysis for PSADF Experiments

Parametric SADF

The characteristic (max,+) matrix of this SDFG equals to G(

  • p)

evaluated at a concrete p ∈ Ω Using the provision of an infinite (max,+) automaton we can define the completion time of a k-long sequence of parameter point activations as a sequence of (max,+) matrix multiplications A (

  • p) = G(
  • pk)...G(
  • p1)

The worst case increase of A (

  • p) for a growing length of

p represents the worst case throughput for any sequence of parameters points allowed by the scenario transition system In terms of PSADF we will be considering the case of a fully connected scenario state transition system, i.e. δ = Q× Q, and where every state of the transition system corresponds to one parameter space point, i.e. there is a bijective mapping z : Q → Ω

Mladen Skelin

slide-25
SLIDE 25

Introduction Preliminaries Performance analysis for PSADF Experiments

PSADF Cont’d

Proposition The worst-case throughput of a PSADFG for which δ = Q× Q and for which exists a bijective mapping z : Q → Ω equals to the inverse of the maximum cycle mean of the MPAG defined by the matrix G = max

q∈Q (G(z(q))).

Proof Given the operational semantics of PSADF previously described and the fact that Ω is bounded and closed, it follows straightforwardly from

1 and 2. 1Geilen, M. et al: Worst-case Performance Analysis of Synchronous

Dataflow Scenarios.

2Gaubert, S.: Performance evaluation of (max,+) automata.

Mladen Skelin

slide-26
SLIDE 26

Introduction Preliminaries Performance analysis for PSADF Experiments

Problem definition

Given G(

  • p) = {gij(
  • p)} as a continuous function over the closed

and bounded parameter space Ω that possesses an appropriate mathematical formulation, our worst-case throughput calculation problem becomes a set of maximally (n×n) constrained optimization problems with G(

  • p) = {gij(
  • p)}

as the objective function(s) and Ω as the constraint set: foreach (i,j) s.t. gij(

  • p) = −∞ do

maximize

  • p

gij(

  • p)

subject to p ∈ Ω. After maximizing all the element functions of G(

  • p), the

worst-case throughput will equal to the MCM of the MPAG given by the maximized PSADF (max,+) characteristic matrix.

Mladen Skelin

slide-27
SLIDE 27

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

PSADF actor model

Let γ(A,k) be the completion time of the kth firing of actor A. In

  • rder for an actor to fire, it must have all its input dependencies
  • satisfied. We can now derive the expression for γ:

γ(Ai,k) = ⎛ ⎝

  • Ah|(Ah,Ai)∈E

γ

  • Ah,

r(Ai,(Ah,Ai))k −i(Ah,Ai) r(Ah,(Ah,Ai)) ⎞ ⎠⊗e(Ai). (1) Mladen Skelin

slide-28
SLIDE 28

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

By solving (1) at an iteration boundary and collecting the timestamps, we will obtain the PSADF (max,+) symbolic matrix G(

  • p)

Currently, our approach works for graphs that are “acyclic within an iteration”

Mladen Skelin

slide-29
SLIDE 29

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction Cont’d

An example PSADF/SPDFG

We write down (max,+) equations for every actor. We will omit the sign ⊗, e.g. a⊗b will be denoted as ab.

γ(A,k) = (γ(A,k − 1)⊕ γ(E,k − 2))a = aγ(A,k − 1)⊕ aγ(E,k − 2) (2) γ(B,k) = bγ(A,⌈k p⌉) (3)

Mladen Skelin

slide-30
SLIDE 30

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

γ(C,k) =

  • γ(B,⌈k

q⌉)⊕ γ(C,k − 1)

  • c = cγ(B,⌈ k

q⌉)⊕ cγ(C,k − 1), (4) γ(D,k) =

  • γ(A,⌈k

s ⌉)⊕ γ(D,k − 1)

  • d = dγ(A,⌈k

s ⌉)⊕ dγ(D,k − 1), (5) γ(E,k) = (γ(C,pqk)⊕ γ(D,sk))e = eγ(C,pqk)⊕ eγ(D,sk). (6) The initial conditions are: γ(A,0) = t1, γ(D,0) = t2, γ(C,0) = t3, γ(E,−1) = t4, γ(E,0) = t5. (7)

Mladen Skelin

slide-31
SLIDE 31

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

To evaluate equations (2)-(6) we need the sequential quasi-static schedule for PSADF We obtain the PSADF quasi-static schedule using the procedure from 1:

1

We sort the PSADF topologically

2

We replace every actor X with X#X, where #X is the PSADFG repetition vector entry for actor X

Element X#X in the quasi-static schedule tells us that we have to solve (1) for actor X at k = #X

1Fradet, P

. et al.: A schedulable parametric data-flow MoC.

Mladen Skelin

slide-32
SLIDE 32

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

Given that the quasi-static schedule for the example PSADF takes the form ABpCpqDsE, we can now solve (2)-(6)

Mladen Skelin

slide-33
SLIDE 33

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

Firing actor A using (2) with k = 1 we obtain: γ(A,1) = aγ(A,0)⊕ aγ(E,−1) = at1 ⊕ at4. (8) Firing Bp using (3) with k = p and using (8) we obtain: γ(B,p) = abt1 ⊕ abt4. (9) Firing Cpq using (4) with k = pq and (9) we obtain (backward substitution): γ(C,pq) = abct1 ⊕ abct4 ⊕ cγ(C,pq− 1) = abcpqt1 ⊕ cpqt3 ⊕ abcpqt4. (10) Firing Ds using (5) with k = s similarly evaluates to: γ(D,s) = adst1 ⊕ dst2 ⊕ adst4. (11) Firing E using (6) with k = 1 and (10) (11) we obtain: γ(E,1) = aet1(bcpq ⊕ ds)⊕ dset2 ⊕ cpqet3 ⊕ aet4(bcpq ⊕ ds). (12)

Mladen Skelin

slide-34
SLIDE 34

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

In (12) initial conditions t1 and t4 are (max,+) multiplied by a symbolic (max,+) summation term (bcpq ⊕ds) We refer to this situation as a conflict We have to consider two cases:

1

(b+ pqc ≥ sd)

2

(b+ pqc < sd)

Checking intersection of newly generated constraints with Ω For our example let us assume that Ω∩(b+pqc < sd) = / and Ω∩(b+pqc ≥ sd) = /

Mladen Skelin

slide-35
SLIDE 35

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

Changing the notation from γ(Ai,k) to t′

j depending on the

indexes of initial conditions(tokens) and the producing actor. We obtain for (b+pqc ≥ sd):

t′

1 = at1 ⊕at4,

(13) t′

2 = adst1 ⊕dst2 ⊕adst4,

(14) t′

3 = abcpqt1 ⊕cpqt3 ⊕abcpqt4,

(15) t′

4 = t5,

(16) t′

5 = abcpqet1 ⊕dset2 ⊕cpqet3 ⊕abcpqet4.

(17) From (13)-(17) we then easily obtain the rows of the symbolic (max,+) matrix: G(b+pqc≥sd) = ⎡ ⎢ ⎢ ⎢ ⎣ a −∞ −∞ a −∞ a+sd sd −∞ a+sd −∞ a+b+pqc −∞ pqc a+b+pqc −∞ −∞ −∞ −∞ −∞ a+b+pqc+e sd +e pqc+e a+b+pqc+e −∞ ⎤ ⎥ ⎥ ⎥ ⎦. Mladen Skelin

slide-36
SLIDE 36

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

The same procedure is used for the (b+pqc < sd) case.

G(b+pqc<sd) = ⎡ ⎢ ⎢ ⎢ ⎢ ⎣ a −∞ −∞ a −∞ a+ sd sd −∞ a+ sd −∞ a+ b+ pqc −∞ pqc a+ b+ pqc −∞ −∞ −∞ −∞ −∞ a+ sd + e sd + e pqc+ e a+ sd + e −∞ ⎤ ⎥ ⎥ ⎥ ⎥ ⎦

Mladen Skelin

slide-37
SLIDE 37

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

In order to obtain the worst case throughput we will have to solve a mixed-integer polynomial programming problem for G(b+pqc≥sd) and G(b+pqc<sd) over Ω. The matrix max

  • G(b+pqc≥sd),G(b+pqc<sd)
  • will define the MPAG whose

inverse MCM is the worst-case throughput for our example SPDF .

Mladen Skelin

slide-38
SLIDE 38

Introduction Preliminaries Performance analysis for PSADF Experiments

G(

  • p) extraction

Symbolic PSADFG (max,+) characteristic matrix extraction algorithm: function SYMBOLICEXTRACT(Qss,MpEqSet,Φ,Ss) fBranchingNode ← false while not Qss.isFinished() do currQssElem ← Qss.popNextElem() currSol ← SOLVE(MpEqSet,currQssElem) if currSol.Conflicted() then fBranchingNode ← true while newΦ ← currSol.getNextConflict() do if FEASIBILITYCHECK(newΦ,Φ ) then currΦ ← Φ currΦ.Add(newΦ) currMpEqSet ← MpEqSet currMpEqSet.ResolveC(newΦ) Ss.Add(SYMBOLICEXTRACT (Qss,currMpEqSet,currΦ,Ss)) end if end while else MpEqSet.Update(currSol) end if end while if not fBranchingNode then return (mpEqSet,Φ) else return / end if end function Mladen Skelin

slide-39
SLIDE 39

Introduction Preliminaries Performance analysis for PSADF Experiments

Outline I

1

Introduction

2

Preliminaries SDF SADF

3

Performance analysis for PSADF

4

Experiments

Mladen Skelin

slide-40
SLIDE 40

Introduction Preliminaries Performance analysis for PSADF Experiments

Benchmarks

Five representative DSP applications with parametric interdependent affine loop bounds:

Benchmark |A | n |PR| |PD| |Ω| F . f. det. based on norm. autocorr.2 12 6 2 2 16,687,681·32

  • Norm. LMS alg.2

9 6 2 2 385·32

  • Hi. res. spect. anal.2

9 6 2 2 385·32

  • Ad. pred. prog. 3

6 4 2 2 400·32

  • B. b. par. latt. red alg.1

12 5 3 1 300·16

1Ahmad, U. et al.: B. Block Par. Latt. Reduct. alg. for MIMO-OFDM and its

application in LTE MIMO receiver.

2________: ICST Signal Processing Library Ver. 1.2. Zurich Univ. of the

Arts (ZHdK), Switz.

3Chassaing, R.: Dig. Sig. Proc.: Lab. Exper. Using C and the TMS320C31

DSK.

Mladen Skelin