Optimization in HLS M. Sevaux Introduction
Using optimization techniques in electronic design
Bio UBS LESTER Lab-STICC
HLS Scheduling
Marc Sevaux
Strategies Experiments
European University of Brittany University of South-Brittany
Conclusion
LESTER, CNRS, FRE 2734 Lorient – France
[email protected]
Siegen, Germany – Oct 10, 2007
1/28
Optimization in HLS
Outline
M. Sevaux Introduction
Introduction Bio UBS LESTER Lab-STICC
Bio UBS LESTER Lab-STICC
HLS Scheduling Strategies Experiments
HLS
Conclusion
Scheduling Strategies Experiments Conclusion 2/28
Optimization in HLS
Short bio
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Studies ◮
1990 – Undergraduate in Applied Maths (in Angers)
◮
1995 – Master degree in operations research (in Paris)
◮
1996 – Doctorate degree (in Nantes)
HLS Scheduling Strategies Experiments Conclusion
Positions ◮
1999 – Research engineer (in Nantes)
◮
1999 – Associate professor (in Valenciennes)
◮
2005 – Full professor (in Lorient)
3/28
Optimization in HLS
University of South-Brittany
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling Strategies Experiments Conclusion
4/28
Optimization in HLS
University of South-Brittany
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Small university: < 8 000 students
HLS
◮
Multi-disciplinary
Strategies
◮
Faculty of Science: ≈ 1 600 students
Experiments
◮
◮
Scheduling
Conclusion
Dept. of Science and Technology: ≈ 1 200
◮
Has merged with other universities
◮
Form now the European University of Brittany 4/28
Optimization in HLS
LESTER Laboratory
M. Sevaux
Members
Introduction Bio UBS LESTER Lab-STICC
◮
6 Professors and 14 Associate Professors
◮
1 Full-time Researcher CNRS
HLS
◮
6 Research Engineers
Scheduling
◮
27 PhD Students
Strategies
◮
2 Secretaries
Experiments Conclusion
5/28
Optimization in HLS
LESTER Laboratory
M. Sevaux
Members
Introduction Bio UBS LESTER Lab-STICC
◮
6 Professors and 14 Associate Professors
◮
1 Full-time Researcher CNRS
HLS
◮
6 Research Engineers
Scheduling
◮
27 PhD Students
Strategies
◮
2 Secretaries
Experiments Conclusion
Contracts ◮
4 European Projects
◮
1 Research Exchange Program w/ USA
◮
5 National Projects
◮
6 Britanny Region Projects
◮
1 National-Regional Project 5/28
Optimization in HLS
LESTER Laboratory: Research Activities
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Model and develop new design methodologies for System On Chip (SOC)
HLS Scheduling
Research Themes
Strategies Experiments
◮
Signal Processing Theory
◮
Embedded Systems Specific constraints
◮
◮ ◮ ◮ ◮
Conclusion
Power consumption Time Reliability Fault Tolerance
6/28
Optimization in HLS
LESTER Laboratory: Research Activities
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Model and develop new design methodologies for System On Chip (SOC)
HLS Scheduling
Research Themes
Strategies Experiments
◮
Signal Processing Theory
◮
Embedded Systems Specific constraints
◮
◮ ◮ ◮ ◮
Conclusion
Power consumption Time Reliability Fault Tolerance
Mainly rely on Graph Theory 6/28
Optimization in HLS
LESTER → Lab-STICC
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
4 labs merge → a large research unit (UMR)
HLS
◮
LESTER is about 20% of the total
◮
Will represent an important part of the UMR
Strategies
◮
Will change his governance
Experiments
Scheduling
Conclusion
7/28
Optimization in HLS
LESTER → Lab-STICC
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
4 labs merge → a large research unit (UMR)
HLS
◮
LESTER is about 20% of the total
◮
Will represent an important part of the UMR
Strategies
◮
Will change his governance
Experiments
Scheduling
Conclusion
New teams Team MOM Micro-waves and Material Team CAC Communications, Architectures and Circuits Team CID Knowledge, IT and Decision-making
7/28
Optimization in HLS
Lab-STICC: new leadership
M. Sevaux Introduction
New governance council ◮ ◮
Head: Alain Hillion 3 Deputy Directors ◮ ◮ ◮
◮ ◮
Bio UBS LESTER Lab-STICC
HLS Scheduling
Marc Sevaux (UBS) Gilles Burel (UBO) Jean-Marc Boucher (ENST-Bretagne)
Strategies Experiments Conclusion
11 elected members 3 scientific directors (one for each team)
8/28
Optimization in HLS
Lab-STICC: new leadership
M. Sevaux Introduction
New governance council ◮ ◮
Head: Alain Hillion 3 Deputy Directors ◮ ◮ ◮
◮ ◮
Bio UBS LESTER Lab-STICC
HLS Scheduling
Marc Sevaux (UBS) Gilles Burel (UBO) Jean-Marc Boucher (ENST-Bretagne)
Strategies Experiments Conclusion
11 elected members 3 scientific directors (one for each team)
Next Steps ◮
Lab-STICC will open in Jan. 2008 8/28
Optimization in HLS M. Sevaux Introduction
Using optimization techniques in electronic design
Bio UBS LESTER Lab-STICC
HLS Scheduling
Marc Sevaux
Strategies Experiments
European University of Brittany University of South-Brittany
Conclusion
LESTER, CNRS, FRE 2734 Lorient – France
[email protected]
Siegen, Germany – Oct 10, 2007
9/28
Optimization in HLS
High-level synthesis
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Problem A source code (C, VHDL) has to be executed on an electronic component in a certain amount of time and the design of the electronic component is “left” to the decision maker
HLS Scheduling Strategies Experiments Conclusion
A field programmable gate array (FPGA) is a semiconductor device containing programmable logic components. A library combines these logic components into basic operators An experimental platform transforms the source code into a graph of tasks to be executed by the basic operators 10/28
Optimization in HLS
A long term strategy
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling Simplifed Problem ◮
Release dates
◮
Due dates
◮
HLS
Minimize the number of operator used
Scheduling Strategies Experiments Conclusion
11/28
Optimization in HLS
A long term strategy
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling Simplifed Problem ◮
Release dates
◮
Due dates
◮
HLS
Minimize the number of operator used
Scheduling Strategies Experiments
HLS Scheduling Central Problem ◮ ◮
◮
Precedences
◮
Cost function
Multi-purpose operators
◮
Cmax
◮
Total flow
Memory allocation
◮
Pipeline
Conclusion
11/28
Optimization in HLS
A long term strategy
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling Simplifed Problem ◮
Release dates
HLS
◮ ◮
Due dates
◮
Precedences
Minimize the number of operator used
Scheduling Strategies Experiments Conclusion
HLS Scheduling Central Problem ◮
◮
Multi-purpose operators Memory allocation
◮
Cost function
◮
Cmax
◮
Total flow
◮
Pipeline
11/28
Optimization in HLS
A small graph
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling Strategies Experiments Conclusion
12/28
Optimization in HLS
Problem instances
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Functions are designed for Filtering operations in DSP
HLS
Simple functions Functions FFT 4 FIR 16 FIR 32 FFT 8 FIR 64 DCT 4x4 FFT 16
Scheduling
Nodes 75 96 192 227 384 482 611
Arcs 137 172 348 433 700 944 1185
Cmax (ns) 70 170 330 110 650 100 150
Strategies Experiments Conclusion
13/28
Optimization in HLS
Problem instances
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
More complex functions
HLS
Functions LMS 128 FFT 32 FFT 64 DCT 8x8 FFT 128 FFT 256 FFT 512
Nodes 1287 1539 3715 3970 8707 19971 45059
Arcs 2556 3009 7297 7872 17153 39425 89089
Cmax (ns) 1350 190 230 180 270 310 350
Scheduling Strategies Experiments Conclusion
14/28
Optimization in HLS
Different strategies
M. Sevaux Introduction
HLS Scheduling
Ti
Methods TS’06
m e Id wi en nd tic ow al s op er at
or s
Bio UBS LESTER Lab-STICC
X
Strategies
X
Experiments Conclusion
15/28
Methods TS’06
m e Id wi en nd t Pr ica ows ec l o M ede pera ul nc to t e M i-pu s rs em rp M ory ose ul a o t p l Pi i-ob loca era pe j. ti to o r l Pr ine opt n s i ob op m l em er . a siz tion e s
Ti
Different strategies
X X
Optimization in HLS M. Sevaux
Introduction Bio UBS LESTER Lab-STICC
HLS
Scheduling
Strategies
200 Experiments
Conclusion
15/28
Optimization in HLS
Different strategies
Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling
Ti
Methods TS’06 MILP
m e Id wi en nd t Pr ica ows ec l o M ede pera ul nc to t e M i-pu s rs em rp M ory ose ul a o t p l Pi i-ob loca era pe j. ti to o r l Pr ine opt n s i ob op m l em er . a siz tion e s
M. Sevaux
X X
X X
X
X
X
Strategies
200 250
Experiments Conclusion
15/28
Optimization in HLS
Different strategies
Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling
Ti
Methods TS’06 MILP New TS
m e Id wi en nd t Pr ica ows ec l o M ede pera ul nc to t e M i-pu s rs em rp M ory ose ul a o t p l Pi i-ob loca era pe j. ti to li o on rs Pr ne o pti ob p m lem era . t siz ion s e
M. Sevaux
X X X
X X X
X X
X ?
X
Strategies
200 250 5000
Experiments Conclusion
15/28
Optimization in HLS
Different strategies
Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling
Ti
Methods TS’06 MILP New TS Alt TS*
m e Id wi en nd t Pr ica ows ec l o M ede pera ul nc to t e M i-pu s rs em rp M ory ose ul a o t p l Pi i-ob loca era pe j. ti to li o on rs Pr ne o pti ob p m lem era . t siz ion s e
M. Sevaux
X X X X
X X X
X X X
X ? X
X X
X
Strategies
200 250 5000 5000
Experiments Conclusion
*In preparation
15/28
Optimization in HLS
Different strategies
Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling
Ti
Methods TS’06 MILP New TS Alt TS* MA|PM*
m e Id wi en nd t Pr ica ows ec l o M ede pera ul nc to t e M i-pu s rs em rp M ory ose ul a o t p l Pi i-ob loca era pe j. ti to lin o on rs p Pr e o tim pe . ob lem rat i siz ons e
M. Sevaux
X X X X X
X X X X
X X X X
X ? X X
X X X
X X
Strategies
200 250 5000 5000 10000
Experiments Conclusion
*In preparation
15/28
Optimization in HLS
Different strategies
Introduction Bio UBS LESTER Lab-STICC
HLS Scheduling
Ti
Methods TS’06 MILP New TS Alt TS* MA|PM* NSGA-II†
m e Id wi en nd t Pr ica ows ec l o M ede pera ul nc to t e M i-pu s rs em rp M ory ose ul a o t p l Pi i-ob loca era pe j. ti to lin o on rs p Pr e o tim pe . ob lem rat i siz ons e
M. Sevaux
X X X X X X
X X X X X
X X X X X
X ? X X X
X X X X
X
X X X
Strategies
200 250 5000 5000 10000 10000
Experiments Conclusion
*In preparation †
Future work
15/28
Optimization in HLS
“Scheduling” problem
M. Sevaux Introduction
A list of tasks (jobs) with release dates and due dates has to be scheduled on a minimum number of processors.
Bio UBS LESTER Lab-STICC
HLS Scheduling
A simplified version of the problem considers
Strategies
◮
only one class of operators → identical processors
Experiments
◮
precedence constraints are first ignored
Conclusion
In scheduling theory, the closest problem is ◮
◮
minimising the number of late jobs on parallel processors P noted Pm|rj | Uj in the classical notation
16/28
Optimization in HLS
A first approach
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Idea Use the results on the scheduling problem to solve the general HLS scheduling problem
HLS Scheduling Strategies
Known scheduling problems and solving methods P P ◮ 1|rj | wj Uj and Pm|rj | wj Uj ◮
MILP, B&B, Lagrangean relaxation
◮
GA, TS, SA, MA
Experiments Conclusion
P Based on previous results on Pm|rj | wj Uj , we can P ◮ find a solution where UJ = 0 ◮
iterate until the smallest m is found 17/28
Optimization in HLS
Strategies for the HLS scheduling problem
M. Sevaux Introduction
TS’06 ◮ ◮ ◮
Bio UBS LESTER Lab-STICC
compute a lower bound of the number of machines m P solve the Pm|rj | Uj P if Uj = 0 STOP, otherwise increase m and restart
HLS Scheduling Strategies Experiments
Features of TS’06 ◮
m lists of early jobs, one list of late jobs
◮
neighborhood: 1 late ↔ 0+ consecutive early jobs
◮
dynamic placement of jobs
◮
tabu criterion: sum of processing time of late jobs
◮
dynamic tenure and cycle detection
Conclusion
Implicitely handle unfeasible solutions 18/28
Optimization in HLS
Strategies for the HLS scheduling problem
M. Sevaux
New TS (include precedence constraints) ◮ ◮ ◮
Introduction Bio UBS LESTER Lab-STICC
compute an upper bound of the number of machines m P solve the Pm|rj , prec| Uj P if Uj = 0 decrease m and restart
HLS Scheduling Strategies
Features of New TS ◮
m lists of early jobs, one list of late jobs
◮
neighborhood: 1 late ↔ 0+ consecutive early jobs (restricted candidate list)
◮
dynamic placement of jobs
◮
new tabu criterion: inserted jobs cannot be removed
◮
m can by decreased by two or one, then increased
Experiments Conclusion
Again implicitely handle unfeasible solutions 19/28
Optimization in HLS
Strategies for the HLS scheduling problem
M. Sevaux Introduction
Alt TS (dedicated to multi-purpose operators and pipeline) ◮
compute an upper bound of the number of machines m
◮
find an initial solution
Bio UBS LESTER Lab-STICC
HLS Scheduling
Features of Alt TS ◮
neighborhood: change assignment of jobs to operators
◮
repair solution with a quick heuristic
◮
reduce the load of some processors to remove them
◮
take directly into account pipeline scheduling
◮
check memory allocation during the process
◮
use a specific cost function
Strategies Experiments Conclusion
Handle only feasible solutions 20/28
Optimization in HLS
Strategies for the HLS scheduling problem
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
MA|PM (dedicated to multi-purpose operators and pipeline) ◮
double the size of problem
HLS Scheduling
Features of MA|PM ◮
use New TS as local search operator
◮
keep late jobs strategy as a basis
◮
find an adequate distance measure
◮
take directly into account pipeline scheduling
◮
handle memory allocation simultaneously
◮
use a specific cost function
Strategies Experiments Conclusion
21/28
Optimization in HLS
Numerical experiments
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Objectives
HLS
◮
use real-life instances
◮
compare different aproaches
◮
estimate the quality of the methods
Three set of instances Set 1 simple instance (from Pm|rj |
Scheduling Strategies Experiments Conclusion
P
Uj )
Set 2 ad hoc instance with precedence constraints Set 3 real-life instances
22/28
Optimization in HLS
Results – Set 1
M. Sevaux
# of jobs 20 40 60 80 100
MILP Av. m 9.3 17.7 24.9 32.9 40.4
Av. m 9.3 17.8 25.8 34.4 42.6
TS’06 Dev. % # opt. 0.0 20 0.6 16 3.6 7 4.6 0 5.5 2
Introduction Bio UBS LESTER Lab-STICC
time (s) 2.2 8.8 15.5 37.6 49.9
HLS Scheduling Strategies Experiments Conclusion
23/28
Optimization in HLS
Results – Set 1
M. Sevaux
# of jobs 20 40 60 80 100
MILP Av. m 9.3 17.7 24.9 32.9 40.4
# of jobs 20 40 60 80 100
MILP Av. m 9.3 17.7 24.9 32.9 40.4
Introduction
Av. m 9.3 17.8 25.8 34.4 42.6
TS’06 Dev. % # opt. 0.0 20 0.6 16 3.6 7 4.6 0 5.5 2
time (s) 2.2 8.8 15.5 37.6 49.9
Av. m 9.3 17.7 25.0 33.0 40.8
New TS Dev. % # opt. 0.00 20 0.00 20 0.20 19 0.46 17 0.99 12
time (s) 0.45 1.73 2.86 3.94 5.24
Bio UBS LESTER Lab-STICC
HLS Scheduling Strategies Experiments Conclusion
23/28
Optimization in HLS
Results – Set 2
M. Sevaux Introduction
Set 2 – subset 1 ◮
20 instances for each n
◮
pj ∈ [1, 10]
◮
10 predecessors max # of jobs 10 25 50 75 100
Bio UBS LESTER Lab-STICC
HLS
MILP time (s) 0.05 0.09 0.25 0.42 0.46
Scheduling Strategies Experiments
New TS # opt. time (s) 20 0.23 20 0.97 20 4.00 19 6.75 20 10.5
Conclusion
Max average deviation: 1.14% 24/28
Optimization in HLS
Results – Set 2
M. Sevaux Introduction
Set 2 – subset 2 ◮
20 instances for each n
◮
pj ∈ [1, 10]
◮
2 predecessors max # of jobs 10 25 50 75 100
Bio UBS LESTER Lab-STICC
HLS
MILP time (s) 0.05 0.09 0.22 0.32 0.34
Scheduling Strategies Experiments
New TS # opt. time (s) 20 0.23 20 0.78 17 2.07 19 5.19 13 8.62
Conclusion
Max average deviation: 2.53% 24/28
Optimization in HLS
Results – Set 2
M. Sevaux Introduction
Set 2 – subset 3 ◮
20 instances for each n
◮
pj ∈ [1, 100]
◮
4 predecessors max # of jobs 10 25 50 75 100
Bio UBS LESTER Lab-STICC
HLS
MILP time (s) 0.07 0.19 0.47 0.79 1.21
Scheduling Strategies Experiments
New TS # opt. time (s) 20 0.24 20 0.89 20 2.93 20 6.34 20 9.59
Conclusion
Max average deviation: 0.00% 24/28
Optimization in HLS
Results – Set 3
M. Sevaux Introduction
Set 3 ◮
4 classes with different numbers of jobs
◮
extracted from electronic design
Bio UBS LESTER Lab-STICC
HLS Scheduling Strategies
Classes Simple Combined Matrices* Filters**
# of inst. 16 5 12 13
Range of n 8-20 30-64 42-1020 26-4040
MILP # opt. 16 5 3 10
New TS # opt. time (s) 16 0.33 2 1.07 3 57.62 10 27.34
Experiments Conclusion
(*) 2 instances of 290 jobs: MILP ≈ 6h (**) 1 instance of 4040 jobs: New TS ≈ 295s 25/28
Optimization in HLS
Conclusion
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Conclusion ◮
TS easy approach to tackle “large” problems
◮
Fast and flexible approach (multi-purpose operators, memory allocation)
◮
HLS Scheduling Strategies Experiments
New TS outperforms TS’06 (results + time)
Conclusion
Potential problems / interests ◮
large size instances (45 000 jobs) Data Flow Graph (DFG) → Control Data Flow Graph 45 000 jobs → 200∼500 jobs
◮
short time horizon
26/28
Optimization in HLS
Perspectives
M. Sevaux Introduction Bio UBS LESTER Lab-STICC
Ongoing work ◮
New TS: Multi-purpose operators
HLS
◮
MA|PM: Pipeline operations
Scheduling Strategies Experiments
Next steps of the study ◮
NSGA-II for MOO
◮
Use MILP as LS operator
◮
Insert resulting algorithm in GAUT
Conclusion
http://web.univ-ubs.fr/gaut/
†
Many thanks to Andr´e Rossi for MILP results 27/28
Optimization in HLS M. Sevaux Introduction
Using optimization techniques in electronic design
Bio UBS LESTER Lab-STICC
HLS Scheduling
Marc Sevaux
Strategies Experiments
European University of Brittany University of South-Brittany
Conclusion
LESTER, CNRS, FRE 2734 Lorient – France
[email protected]
Siegen, Germany – Oct 10, 2007
28/28