exercise 8: integer linear programming & iterative algorithms

20
| Computer Engineering and Networks Laboratory Yun Cheng | Exercise 8: Integer Linear Programming & Iterative Algorithms 16/18. Dec 2020 Yun Cheng, [email protected] 16.12.2020 1 Embedded Systems

Upload: others

Post on 03-Oct-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

Exercise 8:

Integer Linear Programming & Iterative

Algorithms

16/18. Dec 2020

Yun Cheng, [email protected]

16.12.2020 1

Embedded Systems

Page 2: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 2

Exercise Structure

Goal of today’s exercise:

• Understand Integer Linear Programming & Iterative Algorithms

Agenda:

Wednesday 16:15 – 17:00 Clicker quiz (recorded)

Lecture summary (recorded)

Solving a sample task (recorded)

Tasks of exercise 8 (recorded)

Q & A

Friday 16:15 – 17:00 Solution discussion (recorded)

Q & A

Available Assistants:

Yun Cheng - TA

Julian Keller - SA

Page 3: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

Summary of the Lecture

Start solving the Exercise

Discussion of the Solution

16.12.2020 3

Overview

Page 4: Exercise 8: Integer Linear Programming & Iterative Algorithms

Lecture Summary

Page 5: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

Scheduling without resource constraints

ASAP/ALAP

Scheduling with resource constraints

List scheduling

Pipeline resources

Integer Linear Programming (ILP)

Iterative Algorithms

16.12.2020 5

ILP & Iterative Algorithms

Page 6: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 6

As Soon As Possible (ASAP)

Input:

• Weights

Page 7: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 7

As Late As Possible (ALAP)

Input:

• Maximum Latency

• Weights

Page 8: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

Standard optimization method

Many implementations/software available

Formulation

Variables: All variables need to be integer values

Objective function

Equalities & Inequalities

Yields optimal solution

16.12.2020 8

Integer Linear Programming (ILP)

Page 9: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

Solves scheduling, binding and allocation simultaneously

Assumptions

Execution time of every operation is known

Earliest and latest starting times of every operation are known

We can use ALAP/ASAP or List scheduling algorithms to determine

earliest/latest time

16.12.2020 9

ILP for Architecture Synthesis Problem

Page 10: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 10

Formulation as an ILP

Objective function

Declaration of binary

variables

Only one variable (for all t)

can have the value 1

Express starting time as

function of binary variables

Precedence constraints

Resource constraints

Page 11: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

Metrics:

Iteration Interval P: Time distance between the starting times of two successive

iterations

Throughput 1/P: Amount of operations/data that is processed per time unit

Latency L: Duration of one iteration

Terms

Functional Pipelining: Operations of different iterations are executed

simultaneously

Loop folding: Starting and finishing times of an operation are in different

physical iterations

16.12.2020 11

Iterative Algorithms - Implementation

Page 12: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 12

Iterative Algorithms – Dependency Constraints

Dependency constraints

Displacement (#tokens between vi and vj)

Weight of vi (execution time of vi)

Iteration interval

Calculation of the minimum iteration interval

1. Solve the set of inequalities for P

2. Determine the minimum P

Page 13: Exercise 8: Integer Linear Programming & Iterative Algorithms

Exercise 8

Page 14: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 14

Task1

Page 15: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 15

Task 2

Page 16: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 16.12.2020 16

Task 3 (Solve a and b)

Page 17: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 31.5.2017 17

Page 18: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng | 31.5.2017 18

Page 19: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

Solve the other tasks by yourself and we will discuss the

solutions on Friday!

31.5.2017 19

Page 20: Exercise 8: Integer Linear Programming & Iterative Algorithms

|Computer Engineering

and Networks Laboratory Yun Cheng |

3a)

3b)

16.12.2020 20

Task 3 - Solution