exercise 8: integer linear programming & iterative algorithms
TRANSCRIPT
|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
|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
|Computer Engineering
and Networks Laboratory Yun Cheng |
Summary of the Lecture
Start solving the Exercise
Discussion of the Solution
16.12.2020 3
Overview
Lecture Summary
|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
|Computer Engineering
and Networks Laboratory Yun Cheng | 16.12.2020 6
As Soon As Possible (ASAP)
Input:
• Weights
|Computer Engineering
and Networks Laboratory Yun Cheng | 16.12.2020 7
As Late As Possible (ALAP)
Input:
• Maximum Latency
• Weights
|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)
|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
|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
|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
|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
Exercise 8
|Computer Engineering
and Networks Laboratory Yun Cheng | 16.12.2020 14
Task1
|Computer Engineering
and Networks Laboratory Yun Cheng | 16.12.2020 15
Task 2
|Computer Engineering
and Networks Laboratory Yun Cheng | 16.12.2020 16
Task 3 (Solve a and b)
|Computer Engineering
and Networks Laboratory Yun Cheng | 31.5.2017 17
|Computer Engineering
and Networks Laboratory Yun Cheng | 31.5.2017 18
|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
|Computer Engineering
and Networks Laboratory Yun Cheng |
3a)
3b)
16.12.2020 20
Task 3 - Solution