scheduling pipelined applications models algorithms and
play

Scheduling pipelined applications: models, algorithms and complexity - PowerPoint PPT Presentation

Introduction Models Complexity results Conclusion Scheduling pipelined applications: models, algorithms and complexity Anne Benoit GRAAL team, LIP, Ecole Normale Sup erieure de Lyon, France ASTEC meeting in Les Plantiers, France June


  1. Introduction Models Complexity results Conclusion Platform model: unreliable processors f u : failure probability of processor P u independent of the duration of the application: global indicator of processor reliability steady-state execution: loan/rent resources, cycle-stealing fail-silent/fail-stop, no link failures (use different paths) Failure Homogeneous – Identically reliable processors (f u = f v ), natural with Fully Homogeneous Failure Heterogeneous – Different failure probabilities (f u � = f v ), natural with Communication Homogeneous and Fully Heterogeneous Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 10/ 45

  2. Introduction Models Complexity results Conclusion Platform model: unreliable processors f u : failure probability of processor P u independent of the duration of the application: global indicator of processor reliability steady-state execution: loan/rent resources, cycle-stealing fail-silent/fail-stop, no link failures (use different paths) Failure Homogeneous – Identically reliable processors (f u = f v ), natural with Fully Homogeneous Failure Heterogeneous – Different failure probabilities (f u � = f v ), natural with Communication Homogeneous and Fully Heterogeneous Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 10/ 45

  3. Introduction Models Complexity results Conclusion Platform model: communications, a bit of history Classical communication model in scheduling works: macro-dataflow model � 0 if alloc ( T ) = alloc ( T ′ ) cost ( T , T ′ ) = comm ( T , T ′ ) otherwise Task T communicates data to successor task T ′ alloc ( T ): processor that executes T ; comm ( T , T ′ ): defined by the application specification Two main assumptions: (i) communication can occur as soon as data are available (ii) no contention for network links (i) is reasonable, (ii) assumes infinite network resources! Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 11/ 45

  4. Introduction Models Complexity results Conclusion Platform model: communications, a bit of history Classical communication model in scheduling works: macro-dataflow model � 0 if alloc ( T ) = alloc ( T ′ ) cost ( T , T ′ ) = comm ( T , T ′ ) otherwise Task T communicates data to successor task T ′ alloc ( T ): processor that executes T ; comm ( T , T ′ ): defined by the application specification Two main assumptions: (i) communication can occur as soon as data are available (ii) no contention for network links (i) is reasonable, (ii) assumes infinite network resources! Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 11/ 45

  5. Introduction Models Complexity results Conclusion Platform model: communications, a bit of history Classical communication model in scheduling works: macro-dataflow model � 0 if alloc ( T ) = alloc ( T ′ ) cost ( T , T ′ ) = comm ( T , T ′ ) otherwise Task T communicates data to successor task T ′ alloc ( T ): processor that executes T ; comm ( T , T ′ ): defined by the application specification Two main assumptions: (i) communication can occur as soon as data are available (ii) no contention for network links (i) is reasonable, (ii) assumes infinite network resources! Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 11/ 45

  6. Introduction Models Complexity results Conclusion Platform model: one-port without overlap no overlap: at each time step, either computation or communication one-port: each processor can either send or receive to/from a single other processor any time step it is communicating Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 12/ 45

  7. Introduction Models Complexity results Conclusion Platform model: one-port without overlap no overlap: at each time step, either computation or communication one-port: each processor can either send or receive to/from a single other processor any time step it is communicating in(1) c(1) in(3) c(3) out(1) in(2) c(2) out(2) P1 in(1) c(1) out(1) in(2) c(2) out(2) P2 time P1 P2 S 1 S 2 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 12/ 45

  8. Introduction Models Complexity results Conclusion Platform model: bounded multi-port with overlap overlap: a processor can simultaneously compute and communicate bounded multi-port: simultaneous send and receive, but bound on the total outgoing/incoming communication (limitation of network card) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 13/ 45

  9. Introduction Models Complexity results Conclusion Platform model: bounded multi-port with overlap overlap: a processor can simultaneously compute and communicate bounded multi-port: simultaneous send and receive, but bound on the total outgoing/incoming communication (limitation of network card) in P1 c out in P2 c time out P1 P2 S 1 S 2 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 13/ 45

  10. Introduction Models Complexity results Conclusion Platform model: communication models Multi-port: if several non-consecutive stages mapped onto a same processor, several concurrent communications Matches multi-threaded systems Fits well together with overlap One-port: radical option, where everything is serialized Natural to consider it without overlap Other communication models: more complicated such as bandwidth sharing protocols. Too complicated for algorithm design. Two considered models: good trade-off realism/tractability Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 14/ 45

  11. Introduction Models Complexity results Conclusion Platform model: communication models Multi-port: if several non-consecutive stages mapped onto a same processor, several concurrent communications Matches multi-threaded systems Fits well together with overlap One-port: radical option, where everything is serialized Natural to consider it without overlap Other communication models: more complicated such as bandwidth sharing protocols. Too complicated for algorithm design. Two considered models: good trade-off realism/tractability Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 14/ 45

  12. Introduction Models Complexity results Conclusion Platform model: communication models Multi-port: if several non-consecutive stages mapped onto a same processor, several concurrent communications Matches multi-threaded systems Fits well together with overlap One-port: radical option, where everything is serialized Natural to consider it without overlap Other communication models: more complicated such as bandwidth sharing protocols. Too complicated for algorithm design. Two considered models: good trade-off realism/tractability Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 14/ 45

  13. Introduction Models Complexity results Conclusion Platform model: communication models Multi-port: if several non-consecutive stages mapped onto a same processor, several concurrent communications Matches multi-threaded systems Fits well together with overlap One-port: radical option, where everything is serialized Natural to consider it without overlap Other communication models: more complicated such as bandwidth sharing protocols. Too complicated for algorithm design. Two considered models: good trade-off realism/tractability Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 14/ 45

  14. Introduction Models Complexity results Conclusion Multi-criteria mapping problems Goal: assign application stages to platform processors in order to optimize some criteria Define stage types and replication mechanisms Establish rule of the game Define optimization criteria Define and classify optimization problems Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 15/ 45

  15. Introduction Models Complexity results Conclusion Multi-criteria mapping problems Goal: assign application stages to platform processors in order to optimize some criteria Define stage types and replication mechanisms Establish rule of the game Define optimization criteria Define and classify optimization problems Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 15/ 45

  16. Introduction Models Complexity results Conclusion Mapping: stage types and replication Monolithic stages: must be mapped on one single processor since computation for a data set may depend on result of previous computation Dealable stages: can be replicated on several processors, but not parallel, i.e. a data set must be entirely processed on a single processor (distribute work) Data-parallel stages: inherently parallel stages, one data set can be computed in parallel by several processors (partition work) Replicating for failures: one data set is processed several times on different processors (redundant work) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 16/ 45

  17. Introduction Models Complexity results Conclusion Mapping: stage types and replication Monolithic stages: must be mapped on one single processor since computation for a data set may depend on result of previous computation Dealable stages: can be replicated on several processors, but not parallel, i.e. a data set must be entirely processed on a single processor (distribute work) Data-parallel stages: inherently parallel stages, one data set can be computed in parallel by several processors (partition work) Replicating for failures: one data set is processed several times on different processors (redundant work) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 16/ 45

  18. Introduction Models Complexity results Conclusion Mapping strategies: rule of the game Map each application stage onto one or more processors First simple scenario with no replication Allocation function a : [1 .. n ] → [1 .. p ] a (0) = 0 (= in ) and a ( n + 1) = p + 1 (= out ) Several mapping strategies S 1 S 2 S k S n ... ... The pipeline application Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 17/ 45

  19. Introduction Models Complexity results Conclusion Mapping strategies: rule of the game Map each application stage onto one or more processors First simple scenario with no replication Allocation function a : [1 .. n ] → [1 .. p ] a (0) = 0 (= in ) and a ( n + 1) = p + 1 (= out ) Several mapping strategies S 1 S 2 S k S n ... ... One-to-one Mapping : a is a one-to-one function, n ≤ p Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 17/ 45

  20. Introduction Models Complexity results Conclusion Mapping strategies: rule of the game Map each application stage onto one or more processors First simple scenario with no replication Allocation function a : [1 .. n ] → [1 .. p ] a (0) = 0 (= in ) and a ( n + 1) = p + 1 (= out ) Several mapping strategies S 1 S 2 S k S n ... ... Interval Mapping : partition into m ≤ p intervals I j = [ d j , e j ] Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 17/ 45

  21. Introduction Models Complexity results Conclusion Mapping strategies: rule of the game Map each application stage onto one or more processors First simple scenario with no replication Allocation function a : [1 .. n ] → [1 .. p ] a (0) = 0 (= in ) and a ( n + 1) = p + 1 (= out ) Several mapping strategies S 1 S 2 S k S n ... ... General Mapping : P u is assigned any subset of stages Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 17/ 45

  22. Introduction Models Complexity results Conclusion Mapping strategies: adding replication Allocation function: a ( i ) is a set of processor indices Set partitioned into t i teams , each processor within a team is allocated the same piece of work Teams for stage S i : T i , 1 , . . . , T i , t i (1 ≤ i ≤ n ) Monolithic stage: single team t i = 1 and | T i , 1 | = | a ( i ) | ; replication only for reliability if | a ( i ) | > 1 Dealable stage: each team = one round of the deal; type i = deal Data-parallel stage: each team = computation of a fraction of each data set; type i = dp Extend mapping rules with replication, same teams for an interval or a subset of stages; no fully general mappings Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 18/ 45

  23. Introduction Models Complexity results Conclusion Mapping strategies: adding replication Allocation function: a ( i ) is a set of processor indices Set partitioned into t i teams , each processor within a team is allocated the same piece of work Teams for stage S i : T i , 1 , . . . , T i , t i (1 ≤ i ≤ n ) Monolithic stage: single team t i = 1 and | T i , 1 | = | a ( i ) | ; replication only for reliability if | a ( i ) | > 1 Dealable stage: each team = one round of the deal; type i = deal Data-parallel stage: each team = computation of a fraction of each data set; type i = dp Extend mapping rules with replication, same teams for an interval or a subset of stages; no fully general mappings Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 18/ 45

  24. Introduction Models Complexity results Conclusion Mapping strategies: adding replication Allocation function: a ( i ) is a set of processor indices Set partitioned into t i teams , each processor within a team is allocated the same piece of work Teams for stage S i : T i , 1 , . . . , T i , t i (1 ≤ i ≤ n ) Monolithic stage: single team t i = 1 and | T i , 1 | = | a ( i ) | ; replication only for reliability if | a ( i ) | > 1 Dealable stage: each team = one round of the deal; type i = deal Data-parallel stage: each team = computation of a fraction of each data set; type i = dp Extend mapping rules with replication, same teams for an interval or a subset of stages; no fully general mappings Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 18/ 45

  25. Introduction Models Complexity results Conclusion Mapping: objective function Mono-criterion Minimize period P (inverse of throughput) Minimize latency L (time to process a data set) Minimize application failure probability F Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 19/ 45

  26. Introduction Models Complexity results Conclusion Mapping: objective function Mono-criterion Minimize period P (inverse of throughput) Minimize latency L (time to process a data set) Minimize application failure probability F Multi-criteria How to define it? Minimize α. P + β. L + γ. F ? Values which are not comparable Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 19/ 45

  27. Introduction Models Complexity results Conclusion Mapping: objective function Mono-criterion Minimize period P (inverse of throughput) Minimize latency L (time to process a data set) Minimize application failure probability F Multi-criteria How to define it? Minimize α. P + β. L + γ. F ? Values which are not comparable Minimize P for a fixed latency and failure Minimize L for a fixed period and failure Minimize F for a fixed period and latency Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 19/ 45

  28. Introduction Models Complexity results Conclusion Mapping: objective function Mono-criterion Minimize period P (inverse of throughput) Minimize latency L (time to process a data set) Minimize application failure probability F Bi-criteria Period and Latency: Minimize P for a fixed latency Minimize L for a fixed period And so on... Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 19/ 45

  29. Introduction Models Complexity results Conclusion Formal definition of period and latency Allocation function: characterizes a mapping Not enough information to compute the actual schedule of the application = the moment at which each operation takes place Time steps at which comm and comp begin and end Cyclic schedules which repeat for each data set (period λ ) No deal replication: S i , u ∈ a ( i ), v ∈ a ( i + 1), data set k BeginComp k i , u / EndComp k i , u = time step at which comp of S i on P u for data set k begins/ends BeginComm k i , u , v / EndComm k i , u , v = time step at which comm between P u and P v for output of S i for k begins/ends BeginComp k i , u = BeginComp 0  i , u + λ × k  i , u = EndComp 0  EndComp k i , u + λ × k  BeginComm k i , u , v = BeginComm 0 i , u , v + λ × k   EndComm k i , u , v = EndComm 0 i , u , v + λ × k  Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 20/ 45

  30. Introduction Models Complexity results Conclusion Formal definition of period and latency Allocation function: characterizes a mapping Not enough information to compute the actual schedule of the application = the moment at which each operation takes place Time steps at which comm and comp begin and end Cyclic schedules which repeat for each data set (period λ ) No deal replication: S i , u ∈ a ( i ), v ∈ a ( i + 1), data set k BeginComp k i , u / EndComp k i , u = time step at which comp of S i on P u for data set k begins/ends BeginComm k i , u , v / EndComm k i , u , v = time step at which comm between P u and P v for output of S i for k begins/ends BeginComp k i , u = BeginComp 0  i , u + λ × k  i , u = EndComp 0  EndComp k i , u + λ × k  BeginComm k i , u , v = BeginComm 0 i , u , v + λ × k   EndComm k i , u , v = EndComm 0 i , u , v + λ × k  Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 20/ 45

  31. Introduction Models Complexity results Conclusion Formal definition of period and latency Allocation function: characterizes a mapping Not enough information to compute the actual schedule of the application = the moment at which each operation takes place Time steps at which comm and comp begin and end Cyclic schedules which repeat for each data set (period λ ) No deal replication: S i , u ∈ a ( i ), v ∈ a ( i + 1), data set k BeginComp k i , u / EndComp k i , u = time step at which comp of S i on P u for data set k begins/ends BeginComm k i , u , v / EndComm k i , u , v = time step at which comm between P u and P v for output of S i for k begins/ends BeginComp k i , u = BeginComp 0  i , u + λ × k  i , u = EndComp 0  EndComp k i , u + λ × k  BeginComm k i , u , v = BeginComm 0 i , u , v + λ × k   EndComm k i , u , v = EndComm 0 i , u , v + λ × k  Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 20/ 45

  32. Introduction Models Complexity results Conclusion Formal definition of period and latency: operation list Given communication model: set of rules to have a valid operation list Non-preemptive models, synchronous communications Period P = λ Latency L = max { EndComm 0 n , u , out | u ∈ a ( n ) , } With deal replication: extension of the definition, periodic schedule rather than cyclic one Most cases: formula to express period and latency, no need for OL Now, ready to describe optimization problems Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 21/ 45

  33. Introduction Models Complexity results Conclusion Formal definition of period and latency: operation list Given communication model: set of rules to have a valid operation list Non-preemptive models, synchronous communications Period P = λ Latency L = max { EndComm 0 n , u , out | u ∈ a ( n ) , } With deal replication: extension of the definition, periodic schedule rather than cyclic one Most cases: formula to express period and latency, no need for OL Now, ready to describe optimization problems Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 21/ 45

  34. Introduction Models Complexity results Conclusion Formal definition of period and latency: operation list Given communication model: set of rules to have a valid operation list Non-preemptive models, synchronous communications Period P = λ Latency L = max { EndComm 0 n , u , out | u ∈ a ( n ) , } With deal replication: extension of the definition, periodic schedule rather than cyclic one Most cases: formula to express period and latency, no need for OL Now, ready to describe optimization problems Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 21/ 45

  35. Introduction Models Complexity results Conclusion Formal definition of period and latency: operation list Given communication model: set of rules to have a valid operation list Non-preemptive models, synchronous communications Period P = λ Latency L = max { EndComm 0 n , u , out | u ∈ a ( n ) , } With deal replication: extension of the definition, periodic schedule rather than cyclic one Most cases: formula to express period and latency, no need for OL Now, ready to describe optimization problems Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 21/ 45

  36. Introduction Models Complexity results Conclusion Formal definition of period and latency: operation list Given communication model: set of rules to have a valid operation list Non-preemptive models, synchronous communications Period P = λ Latency L = max { EndComm 0 n , u , out | u ∈ a ( n ) , } With deal replication: extension of the definition, periodic schedule rather than cyclic one Most cases: formula to express period and latency, no need for OL Now, ready to describe optimization problems Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 21/ 45

  37. Introduction Models Complexity results Conclusion One-to-one and interval mappings, no replication Latency: max time required by a data set to traverse all stages P e j ( ) i = d j w i δ d j − 1 δ n L ( interval ) = X + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d m ) , out 1 ≤ j ≤ m Period: definition depends on comm model (different rules in the OL), but always longest cycle-time of a processor: P ( interval ) = max 1 ≤ j ≤ m cycletime ( P a ( d j ) ) One-port model without overlap: � e j � � i = d j w i δ d j − 1 δ e j P = max + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d j ) , a ( e j +1) 1 ≤ j ≤ m Bounded multi-port model with overlap: Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 22/ 45

  38. Introduction Models Complexity results Conclusion One-to-one and interval mappings, no replication Latency: max time required by a data set to traverse all stages P e j ( ) i = d j w i δ d j − 1 δ n L ( interval ) = X + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d m ) , out 1 ≤ j ≤ m Period: definition depends on comm model (different rules in the OL), but always longest cycle-time of a processor: P ( interval ) = max 1 ≤ j ≤ m cycletime ( P a ( d j ) ) One-port model without overlap: � e j � � i = d j w i δ d j − 1 δ e j P = max + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d j ) , a ( e j +1) 1 ≤ j ≤ m Bounded multi-port model with overlap: Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 22/ 45

  39. Introduction Models Complexity results Conclusion One-to-one and interval mappings, no replication Latency: max time required by a data set to traverse all stages P e j ( ) i = d j w i δ d j − 1 δ n L ( interval ) = X + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d m ) , out 1 ≤ j ≤ m Period: definition depends on comm model (different rules in the OL), but always longest cycle-time of a processor: P ( interval ) = max 1 ≤ j ≤ m cycletime ( P a ( d j ) ) One-port model without overlap: � e j � � i = d j w i δ d j − 1 δ e j P = max + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d j ) , a ( e j +1) 1 ≤ j ≤ m Bounded multi-port model with overlap: Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 22/ 45

  40. Introduction Models Complexity results Conclusion One-to-one and interval mappings, no replication Latency: max time required by a data set to traverse all stages P e j ( ) i = d j w i δ d j − 1 δ n L ( interval ) = X + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d m ) , out 1 ≤ j ≤ m Period: definition depends on comm model (different rules in the OL), but always longest cycle-time of a processor: P ( interval ) = max 1 ≤ j ≤ m cycletime ( P a ( d j ) ) One-port model without overlap: � e j � � i = d j w i δ d j − 1 δ e j P = max + + b a ( d j − 1) , a ( d j ) s a ( d j ) b a ( d j ) , a ( e j +1) 1 ≤ j ≤ m Bounded multi-port model with overlap: P e j ( «) i = d j w i „ δ d j − 1 δ e j P = max max ” , , “ “ ” s a ( d j ) 1 ≤ j ≤ m b a ( d j − 1) , a ( d j ) , B i b a ( d j ) , a ( e j +1) , B o min min a ( d j ) a ( d j ) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 22/ 45

  41. Introduction Models Complexity results Conclusion Adding replication for reliability Each processor: failure probability 0 ≤ f u ≤ 1 m intervals, set of processors a ( d j ) for interval j F ( int − fp ) = 1 − Y Y ` ´ 1 − f u 1 ≤ j ≤ m u ∈ a ( d j ) Consensus protocol: one surviving processor performs all outgoing communications Worst case scenario: new formulas for latency and period 8 P e j 9 i = d j w i δ e j δ 0 L ( int − fp ) = < = X X X + max + b in , u s u b u , v u ∈ a ( d j ) : ; u ∈ a (1) 1 ≤ j ≤ m v ∈ a ( e j +1) 8 9 P e j i = d j w i δ d j − 1 δ e j P ( int − fp ) = max < = X max v ∈ a ( d j − 1) b v , u + + min s u b u , v 1 ≤ j ≤ m u ∈ a ( d j ) : ; v ∈ a ( e j +1) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 23/ 45

  42. Introduction Models Complexity results Conclusion Adding replication for reliability Each processor: failure probability 0 ≤ f u ≤ 1 m intervals, set of processors a ( d j ) for interval j F ( int − fp ) = 1 − Y Y ` ´ 1 − f u 1 ≤ j ≤ m u ∈ a ( d j ) Consensus protocol: one surviving processor performs all outgoing communications Worst case scenario: new formulas for latency and period 8 P e j 9 i = d j w i δ e j δ 0 L ( int − fp ) = < = X X X + max + b in , u s u b u , v u ∈ a ( d j ) : ; u ∈ a (1) 1 ≤ j ≤ m v ∈ a ( e j +1) 8 9 P e j i = d j w i δ d j − 1 δ e j P ( int − fp ) = max < = X max v ∈ a ( d j − 1) b v , u + + min s u b u , v 1 ≤ j ≤ m u ∈ a ( d j ) : ; v ∈ a ( e j +1) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 23/ 45

  43. Introduction Models Complexity results Conclusion Adding replication for reliability Each processor: failure probability 0 ≤ f u ≤ 1 m intervals, set of processors a ( d j ) for interval j F ( int − fp ) = 1 − Y Y ` ´ 1 − f u 1 ≤ j ≤ m u ∈ a ( d j ) Consensus protocol: one surviving processor performs all outgoing communications Worst case scenario: new formulas for latency and period 8 P e j 9 i = d j w i δ e j δ 0 L ( int − fp ) = < = X X X + max + b in , u s u b u , v u ∈ a ( d j ) : ; u ∈ a (1) 1 ≤ j ≤ m v ∈ a ( e j +1) 8 9 P e j i = d j w i δ d j − 1 δ e j P ( int − fp ) = max < = X max v ∈ a ( d j − 1) b v , u + + min s u b u , v 1 ≤ j ≤ m u ∈ a ( d j ) : ; v ∈ a ( e j +1) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 23/ 45

  44. Introduction Models Complexity results Conclusion Adding replication for reliability Each processor: failure probability 0 ≤ f u ≤ 1 m intervals, set of processors a ( d j ) for interval j F ( int − fp ) = 1 − Y Y ` ´ 1 − f u 1 ≤ j ≤ m u ∈ a ( d j ) Consensus protocol: one surviving processor performs all outgoing communications Worst case scenario: new formulas for latency and period 8 P e j 9 i = d j w i δ e j δ 0 L ( int − fp ) = < = X X X + max + b in , u s u b u , v u ∈ a ( d j ) : ; u ∈ a (1) 1 ≤ j ≤ m v ∈ a ( e j +1) 8 9 P e j i = d j w i δ d j − 1 δ e j P ( int − fp ) = max < = X max v ∈ a ( d j − 1) b v , u + + min s u b u , v 1 ≤ j ≤ m u ∈ a ( d j ) : ; v ∈ a ( e j +1) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 23/ 45

  45. Introduction Models Complexity results Conclusion Adding replication for period and latency Dealable stages: replication of stage or interval of stages. No latency decrease; period may decrease (less data sets per processor) No communication: period trav i / k if S i onto k processors; w i trav i = min 1 ≤ u ≤ k s qu With communications: cases with no critical resources Latency: longest path, no conflicts between data sets Data-parallel stages: replication of single stage Both latency and period may decrease w i trav i = o i + P k u =1 s qu Becomes very difficult with communications ⇒ Model with no communication! Replication for performance + replication for reliability: possible to mix both approaches, difficulties of both models Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 24/ 45

  46. Introduction Models Complexity results Conclusion Adding replication for period and latency Dealable stages: replication of stage or interval of stages. No latency decrease; period may decrease (less data sets per processor) No communication: period trav i / k if S i onto k processors; w i trav i = min 1 ≤ u ≤ k s qu With communications: cases with no critical resources Latency: longest path, no conflicts between data sets Data-parallel stages: replication of single stage Both latency and period may decrease w i trav i = o i + P k u =1 s qu Becomes very difficult with communications ⇒ Model with no communication! Replication for performance + replication for reliability: possible to mix both approaches, difficulties of both models Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 24/ 45

  47. Introduction Models Complexity results Conclusion Adding replication for period and latency Dealable stages: replication of stage or interval of stages. No latency decrease; period may decrease (less data sets per processor) No communication: period trav i / k if S i onto k processors; w i trav i = min 1 ≤ u ≤ k s qu With communications: cases with no critical resources Latency: longest path, no conflicts between data sets Data-parallel stages: replication of single stage Both latency and period may decrease w i trav i = o i + P k u =1 s qu Becomes very difficult with communications ⇒ Model with no communication! Replication for performance + replication for reliability: possible to mix both approaches, difficulties of both models Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 24/ 45

  48. Introduction Models Complexity results Conclusion Adding replication for period and latency Dealable stages: replication of stage or interval of stages. No latency decrease; period may decrease (less data sets per processor) No communication: period trav i / k if S i onto k processors; w i trav i = min 1 ≤ u ≤ k s qu With communications: cases with no critical resources Latency: longest path, no conflicts between data sets Data-parallel stages: replication of single stage Both latency and period may decrease w i trav i = o i + P k u =1 s qu Becomes very difficult with communications ⇒ Model with no communication! Replication for performance + replication for reliability: possible to mix both approaches, difficulties of both models Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 24/ 45

  49. Introduction Models Complexity results Conclusion Moving to general mappings Failure probability: definition in the general case easy to derive (all kind of replication) F ( gen ) = 1 − Y Y Y ` ´ 1 − f u 1 ≤ j ≤ m 1 ≤ k ≤ t dj u ∈ T dj , k Latency: can be defined for Communication Homogeneous platforms with no data-parallelism. „  ∆ i | T i , k | δ i − 1 ff« + δ n +1 w i L ( gen ) = X max + min u ∈ T i , k s u b b 1 ≤ k ≤ t i 1 ≤ i ≤ n ∆ i = 1 iff S i − 1 and S i are in the same subset Fully Heterogeneous : longest path computation (polynomial time) With data-parallel stages: can be computed only with no communication and no start-up overhead Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 25/ 45

  50. Introduction Models Complexity results Conclusion Moving to general mappings Failure probability: definition in the general case easy to derive (all kind of replication) F ( gen ) = 1 − Y Y Y ` ´ 1 − f u 1 ≤ j ≤ m 1 ≤ k ≤ t dj u ∈ T dj , k Latency: can be defined for Communication Homogeneous platforms with no data-parallelism. „  ∆ i | T i , k | δ i − 1 ff« + δ n +1 w i L ( gen ) = X max + min u ∈ T i , k s u b b 1 ≤ k ≤ t i 1 ≤ i ≤ n ∆ i = 1 iff S i − 1 and S i are in the same subset Fully Heterogeneous : longest path computation (polynomial time) With data-parallel stages: can be computed only with no communication and no start-up overhead Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 25/ 45

  51. Introduction Models Complexity results Conclusion Moving to general mappings Period: case with no replication for period and latency Bounded multi-port model with overlap Period = maximum cycle-time of processors Communications in parallel: No conflicts input coms on data sets k 1 + 1 , . . . , k ℓ + 1; computes on k 1 , . . . , k ℓ , outputs k 1 − 1 , . . . , k ℓ − 1 ( P ( gen − mp ) = max 1 ≤ j ≤ m max u ∈ a ( d j ) P i ∈ stagesj w i δ i − 1 δ i − 1 max max v ∈ a ( i − 1) ∆ i max b v , u , P ∆ i u , , B i s u i ∈ stages j i ∈ stages j ! ) δ i δ i P max v ∈ a ( i +1) ∆ i +1 max b u , v , ∆ i +1 B o i ∈ stages j u i ∈ stages j Without overlap: conflicts similar to case with replication; NP-hard to decide how to order coms Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 26/ 45

  52. Introduction Models Complexity results Conclusion Moving to general mappings Period: case with no replication for period and latency Bounded multi-port model with overlap Period = maximum cycle-time of processors Communications in parallel: No conflicts input coms on data sets k 1 + 1 , . . . , k ℓ + 1; computes on k 1 , . . . , k ℓ , outputs k 1 − 1 , . . . , k ℓ − 1 ( P ( gen − mp ) = max 1 ≤ j ≤ m max u ∈ a ( d j ) P i ∈ stagesj w i δ i − 1 δ i − 1 max max v ∈ a ( i − 1) ∆ i max b v , u , P ∆ i u , , B i s u i ∈ stages j i ∈ stages j ! ) δ i δ i P max v ∈ a ( i +1) ∆ i +1 max b u , v , ∆ i +1 B o i ∈ stages j u i ∈ stages j Without overlap: conflicts similar to case with replication; NP-hard to decide how to order coms Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 26/ 45

  53. Introduction Models Complexity results Conclusion Outline Models 1 Application model Platform and communication models Multi-criteria mapping problems Complexity results 2 Mono-criterion problems Bi-criteria problems Conclusion 3 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 27/ 45

  54. Introduction Models Complexity results Conclusion Failure probability Turns out simple for interval and general mappings: minimum reached by replicating the whole pipeline as a single interval consisting in a single team on all processors: F = � p u =1 f u One-to-one mappings: polynomial for Failure Homogeneous platforms (balance number of processors to stages), NP-hard for Failure Heterogeneous platforms (3-PARTITION with n stages and 3 n processors) F Failure-Hom. Failure-Het. One-to-one polynomial NP-hard polynomial Interval General polynomial Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 28/ 45

  55. Introduction Models Complexity results Conclusion Failure probability Turns out simple for interval and general mappings: minimum reached by replicating the whole pipeline as a single interval consisting in a single team on all processors: F = � p u =1 f u One-to-one mappings: polynomial for Failure Homogeneous platforms (balance number of processors to stages), NP-hard for Failure Heterogeneous platforms (3-PARTITION with n stages and 3 n processors) F Failure-Hom. Failure-Het. One-to-one polynomial NP-hard polynomial Interval General polynomial Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 28/ 45

  56. Introduction Models Complexity results Conclusion Failure probability Turns out simple for interval and general mappings: minimum reached by replicating the whole pipeline as a single interval consisting in a single team on all processors: F = � p u =1 f u One-to-one mappings: polynomial for Failure Homogeneous platforms (balance number of processors to stages), NP-hard for Failure Heterogeneous platforms (3-PARTITION with n stages and 3 n processors) F Failure-Hom. Failure-Het. One-to-one polynomial NP-hard polynomial Interval General polynomial Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 28/ 45

  57. Introduction Models Complexity results Conclusion Latency Replication of dealable stages, replication for reliability: no impact on latency No data-parallelism: reduce communication costs Fully Homogeneous and Communication Homogeneous platforms: map all stages onto fastest processor (1 interval); one-to-one mappings: most computationally expensive stages onto fastest processors (greedy algorithm) Fully Heterogeneous platforms: problem of input/output communications: may need to split interval Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 29/ 45

  58. Introduction Models Complexity results Conclusion Latency Replication of dealable stages, replication for reliability: no impact on latency No data-parallelism: reduce communication costs Fully Homogeneous and Communication Homogeneous platforms: map all stages onto fastest processor (1 interval); one-to-one mappings: most computationally expensive stages onto fastest processors (greedy algorithm) s 1 = 1 P 1 100 100 100 100 100 S 1 S 2 P in P out 100 w 1 = 2 w 2 = 2 100 100 P 2 s 2 = 2 Fully Heterogeneous platforms: problem of input/output communications: may need to split interval Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 29/ 45

  59. Introduction Models Complexity results Conclusion Latency Replication of dealable stages, replication for reliability: no impact on latency No data-parallelism: reduce communication costs Fully Homogeneous and Communication Homogeneous platforms: map all stages onto fastest processor (1 interval); one-to-one mappings: most computationally expensive stages onto fastest processors (greedy algorithm) s 1 = 1 P 1 100 100 100 100 100 S 1 S 2 P in P out 100 w 1 = 2 w 2 = 2 100 100 P 2 s 2 = 2 Fully Heterogeneous platforms: problem of input/output communications: may need to split interval Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 29/ 45

  60. Introduction Models Complexity results Conclusion Latency Replication of dealable stages, replication for reliability: no impact on latency No data-parallelism: reduce communication costs Fully Homogeneous and Communication Homogeneous platforms: map all stages onto fastest processor (1 interval); one-to-one mappings: most computationally expensive stages onto fastest processors (greedy algorithm) s 1 = 1 P 1 100 1 100 100 100 S 1 S 2 P in P out 100 w 1 = 2 w 2 = 2 1 100 P 2 s 2 = 1 Fully Heterogeneous platforms: problem of input/output communications: may need to split interval Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 29/ 45

  61. Introduction Models Complexity results Conclusion Latency Replication of dealable stages, replication for reliability: no impact on latency No data-parallelism: reduce communication costs Fully Homogeneous and Communication Homogeneous platforms: map all stages onto fastest processor (1 interval); one-to-one mappings: most computationally expensive stages onto fastest processors (greedy algorithm) s 1 = 1 P 1 100 1 100 100 100 S 1 S 2 P in P out 100 w 1 = 2 w 2 = 2 1 100 P 2 s 2 = 1 Fully Heterogeneous platforms: problem of input/output communications: may need to split interval Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 29/ 45

  62. Introduction Models Complexity results Conclusion Latency Fully Heterogeneous platforms: NP-hard for one-to-one and interval mappings (involved reductions), polynomial for general mappings (shortest paths) With data-parallelism: model with no communication; polynomial with same speed processors (dynamic programming algorithm), NP-hard otherwise (2-PARTITION) L Fully Hom. Comm. Hom. Hetero. no DP, One-to-one polynomial NP-hard no DP, Interval polynomial NP-hard polynomial no DP, General with DP, no coms polynomial NP-hard Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 30/ 45

  63. Introduction Models Complexity results Conclusion Latency Fully Heterogeneous platforms: NP-hard for one-to-one and interval mappings (involved reductions), polynomial for general mappings (shortest paths) With data-parallelism: model with no communication; polynomial with same speed processors (dynamic programming algorithm), NP-hard otherwise (2-PARTITION) L Fully Hom. Comm. Hom. Hetero. no DP, One-to-one polynomial NP-hard no DP, Interval polynomial NP-hard polynomial no DP, General with DP, no coms polynomial NP-hard Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 30/ 45

  64. Introduction Models Complexity results Conclusion Latency Fully Heterogeneous platforms: NP-hard for one-to-one and interval mappings (involved reductions), polynomial for general mappings (shortest paths) With data-parallelism: model with no communication; polynomial with same speed processors (dynamic programming algorithm), NP-hard otherwise (2-PARTITION) L Fully Hom. Comm. Hom. Hetero. no DP, One-to-one polynomial NP-hard no DP, Interval polynomial NP-hard polynomial no DP, General with DP, no coms polynomial NP-hard Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 30/ 45

  65. Introduction Models Complexity results Conclusion Period - Example with no comm, no replication S 1 → S 2 → S 3 → S 4 2 1 3 4 2 processors ( P 1 and P 2 ) of speed 1 Optimal period? Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 31/ 45

  66. Introduction Models Complexity results Conclusion Period - Example with no comm, no replication S 1 → S 2 → S 3 → S 4 2 1 3 4 2 processors ( P 1 and P 2 ) of speed 1 Optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Perfect load-balancing in this case, but NP-hard (2-PARTITION) Interval mapping? Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 31/ 45

  67. Introduction Models Complexity results Conclusion Period - Example with no comm, no replication S 1 → S 2 → S 3 → S 4 2 1 3 4 2 processors ( P 1 and P 2 ) of speed 1 Optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Perfect load-balancing in this case, but NP-hard (2-PARTITION) Interval mapping? P = 6, S 1 S 2 S 3 → P 1 , S 4 → P 2 – Polynomial algorithm? Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 31/ 45

  68. Introduction Models Complexity results Conclusion Period - Example with no comm, no replication S 1 → S 2 → S 3 → S 4 2 1 3 4 2 processors ( P 1 and P 2 ) of speed 1 Optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Perfect load-balancing in this case, but NP-hard (2-PARTITION) Interval mapping? P = 6, S 1 S 2 S 3 → P 1 , S 4 → P 2 – Polynomial algorithm? Classical chains-on-chains problem, dynamic programming works Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 31/ 45

  69. Introduction Models Complexity results Conclusion Period - Example with no comm, no replication S 1 → S 2 → S 3 → S 4 2 1 3 4 P 1 of speed 2, and P 2 of speed 3 Optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Perfect load-balancing in this case, but NP-hard (2-PARTITION) Interval mapping? P = 6, S 1 S 2 S 3 → P 1 , S 4 → P 2 – Polynomial algorithm? Classical chains-on-chains problem, dynamic programming works Heterogeneous platform? Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 31/ 45

  70. Introduction Models Complexity results Conclusion Period - Example with no comm, no replication S 1 → S 2 → S 3 → S 4 2 1 3 4 P 1 of speed 2, and P 2 of speed 3 Optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Perfect load-balancing in this case, but NP-hard (2-PARTITION) Interval mapping? P = 6, S 1 S 2 S 3 → P 1 , S 4 → P 2 – Polynomial algorithm? Classical chains-on-chains problem, dynamic programming works Heterogeneous platform? P = 2, S 1 S 2 S 3 → P 2 , S 4 → P 1 Heterogeneous chains-on-chains, NP-hard Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 31/ 45

  71. Introduction Models Complexity results Conclusion Period - Complexity P Fully Hom. Comm. Hom. Hetero. One-to-one polynomial polynomial, NP-hard (rep) NP-hard Interval polynomial NP-hard NP-hard NP-hard, poly (rep) NP-hard General With replication? No change in complexity except one-to-one/com-hom (the problem becomes NP-hard, reduction from 2-PARTITION, enforcing use of data-parallelism) and general/full-hom (the problem becomes polynomial) Other NP-completeness proofs remain valid Fully homogeneous platforms: one interval replicated onto all processors (works also for general mappings); greedy assignment for one-to-one mappings Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 32/ 45

  72. Introduction Models Complexity results Conclusion Period - Complexity P Fully Hom. Comm. Hom. Hetero. One-to-one polynomial polynomial, NP-hard (rep) NP-hard Interval polynomial NP-hard NP-hard NP-hard, poly (rep) NP-hard General With replication? No change in complexity except one-to-one/com-hom (the problem becomes NP-hard, reduction from 2-PARTITION, enforcing use of data-parallelism) and general/full-hom (the problem becomes polynomial) Other NP-completeness proofs remain valid Fully homogeneous platforms: one interval replicated onto all processors (works also for general mappings); greedy assignment for one-to-one mappings Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 32/ 45

  73. Introduction Models Complexity results Conclusion Period - Complexity P Fully Hom. Comm. Hom. Hetero. One-to-one polynomial polynomial, NP-hard (rep) NP-hard Interval polynomial NP-hard NP-hard NP-hard, poly (rep) NP-hard General With replication? No change in complexity except one-to-one/com-hom (the problem becomes NP-hard, reduction from 2-PARTITION, enforcing use of data-parallelism) and general/full-hom (the problem becomes polynomial) Other NP-completeness proofs remain valid Fully homogeneous platforms: one interval replicated onto all processors (works also for general mappings); greedy assignment for one-to-one mappings Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 32/ 45

  74. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 Without overlap: optimal period and latency? General mappings: too difficult to handle in this case (no formula for latency and period) → restrict to interval mappings P = 8: S 1 S 2 S 3 → P 1 , S 4 → P 2 L = 12: S 1 S 2 S 3 S 4 → P 1 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 33/ 45

  75. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 Without overlap: optimal period and latency? General mappings: too difficult to handle in this case (no formula for latency and period) → restrict to interval mappings P = 8: S 1 S 2 S 3 → P 1 , S 4 → P 2 L = 12: S 1 S 2 S 3 S 4 → P 1 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 33/ 45

  76. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 Without overlap: optimal period and latency? General mappings: too difficult to handle in this case (no formula for latency and period) → restrict to interval mappings P = 8: S 1 S 2 S 3 → P 1 , S 4 → P 2 L = 12: S 1 S 2 S 3 S 4 → P 1 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 33/ 45

  77. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 Without overlap: optimal period and latency? General mappings: too difficult to handle in this case (no formula for latency and period) → restrict to interval mappings P = 8: S 1 S 2 S 3 → P 1 , S 4 → P 2 L = 12: S 1 S 2 S 3 S 4 → P 1 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 33/ 45

  78. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 Without overlap: optimal period and latency? General mappings: too difficult to handle in this case (no formula for latency and period) → restrict to interval mappings P = 8: S 1 S 2 S 3 → P 1 , S 4 → P 2 L = 12: S 1 S 2 S 3 S 4 → P 1 Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 33/ 45

  79. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 With overlap: optimal period? Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 34/ 45

  80. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 With overlap: optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Perfect load-balancing both for computation and comm Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 34/ 45

  81. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 With overlap: optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Optimal latency? With only one processor, L = 12 No internal communication to pay Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 34/ 45

  82. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 With overlap: optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Optimal latency? Same mapping as above: L = 21 with no period constraint P = 21, no conflicts P in → P 1 0 0 0 1 2 1 2 / 12 13 14 P 1 P 1 → P 2 3 4 5 6 15 8 9 10 11 P 2 → P 1 P 2 7 16 17 18 19 20 P 2 → P out Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 34/ 45

  83. Introduction Models Complexity results Conclusion Impact of communication models 1 4 4 1 1 → S 1 → S 2 → S 3 → S 4 → 2 1 3 4 2 processors of speed 1 With overlap: optimal period? P = 5, S 1 S 3 → P 1 , S 2 S 4 → P 2 Optimal latency?with P = 5? Progress step-by-step in the pipeline → no conflicts K = 4 processor changes, L = (2 K + 1) . P = 9 P = 45 . . . period k period k + 1 period k + 2 . . . ds ( k ) ds ( k +1) ds ( k +2) in → P 1 . . . . . . ds ( k − 1) , ds ( k − 5) ds ( k ) , ds ( k − 4) ds ( k +1) , ds ( k − 3) P 1 . . . . . . ds ( k − 2) , ds ( k − 6) ds ( k − 1) , ds ( k − 5) ds ( k ) , ds ( k − 4) . . . . . . P 1 → P 2 ds ( k − 4) ds ( k − 3) ds ( k − 2) P 2 → P 1 . . . . . . ds ( k − 3) , ds ( k − 7) ds ( k − 2) , ds ( k − 6) ds ( k − 1) , ds ( k − 5) . . . . . . P 2 ds ( k − 8) ds ( k − 7) ds ( k − 6) P 2 → out . . . . . . Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 34/ 45

  84. Introduction Models Complexity results Conclusion Bi-criteria period/latency Most problems NP-hard because of period Dynamic programming algorithm for fully homogeneous platforms Integer linear program for interval mappings, fully heterogeneous platforms, bi-criteria, without overlap Variables: Obj : period or latency of the pipeline, depending on the objective function x i , u : 1 if S i on P u (0 otherwise) z i , u , v : 1 if S i on P u and S i +1 on P v (0 otherwise) first u and last u : integer denoting first and last stage assigned to P u (to enforce interval constraints) Anne.Benoit@ens-lyon.fr ASTEC, June 2, 2009 Scheduling pipelined applications 35/ 45

Recommend


More recommend