Tabu searching for high-level synthesis
-
Upload
independent -
Category
Documents
-
view
1 -
download
0
Transcript of Tabu searching for high-level synthesis
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
1/25
Tabu Searching for High Level Synthesis
Marc Sevaux Kenneth Sorensen
University of South-BrittanyLorient – France
Centre for Industrial Management, KULeuven – Belgium
FRANCORO – ROADeFGrenoble – France
January 20-23, 2007
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
2/25
High-level synthesis
Problem
A source code (C, VHDL) has to be executed on anelectronic component in a certain amount of time and thedesign of the electronic component is “left” to the decisionmaker
A field programmable gate array(FPGA) is a semiconductor devicecontaining programmable logic compo-nents. A library combines these logiccomponents into basic operators
An experimental platform transforms the source code into agraph of tasks to be executed by the basic operators
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
3/25
A small graph
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
4/25
A long term strategy
HLS Scheduling Simplifed Problem
◮ Release dates
◮ Due dates
◮ Minimize the numberof operator used
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
4/25
A long term strategy
HLS Scheduling Simplifed Problem
◮ Release dates
◮ Due dates
◮ Minimize the numberof operator used
HLS Scheduling Central Problem
◮ Precedences
◮ Multi-purposeoperators
◮ Memory allocation
◮ Cost function
◮ Cmax
◮ Total flow
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
HLS SchedulingCentral Problem
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
HLS SchedulingSimplified Problem
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
HLS SchedulingSimplified Problem
MIP Formulation
See A. Rossi’s talk
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
HLS SchedulingSimplified Problem
MIP Formulation
See A. Rossi’s talkTabu Search
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
HLS SchedulingSimplified Problem
MIP Formulation
See A. Rossi’s talkTabu Search
PPC
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
HLS SchedulingSimplified Problem
MIP Formulation
See A. Rossi’s talk
IROCOI
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
HLS SchedulingSimplified Problem
MIP Formulation
See A. Rossi’s talk
IROCOI
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
5/25
A long term strategy
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
MIP Formulation
See A. Rossi’s talk
IROCOI
HLS SchedulingCentral Problem
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
6/25
“Scheduling” problem
A list of tasks (jobs) with release dates and due dates has tobe scheduled on a minimum number of processors.
A simplified version of the problem considers
◮ only one class of operators → identical processors
◮ precedence constraints can be ignored → simpletransformation
A similar problem to the one presented before is
◮ Minimising the number of late jobs on parallelprocessors
◮ Noted Pm|rj |∑
Uj in the classical notation
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
7/25
A first approach
Based on previous results on Pm|rj |∑
wjUj , we can
◮ Compute a lower bound of the number of machines
◮ Solve the problem using previous work
◮ Increase the number of machines until all jobs aresequenced
Work in progress
◮ Computing lower bounds → Bin packing or VRPTW
◮ Solver when the number of machine is known◮ fully operational for small size instances◮ need to be improved for handling large instances
◮ Iterative steps → change the strategy
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
8/25
A parallel machine scheduling problem
Scheduling problem definition
◮ m identical machines in parallel
◮ n jobs to be scheduled
pj processing timerj release datedj due date
◮ Objective: minimise the number of late jobs
◮ Uj = 1 if job j is late and 0 otherwise
◮ Classical notation: Pm|rj |∑
Uj
◮ NP-hard in a strong sense
Important: Late jobs do not need to be scheduled
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
9/25
Specifications for implementation
A special encoding
◮ m lists of early jobs with starting times = machine lists
◮ 1 list of late jobs = late list
Job 1 2 3 4 5
rj 0 0 2 3 4pj 3 6 3 4 1dj 5 7 8 9 7
M1
M2
t950
J
J J J1 5 3
2J4
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
10/25
Elastic placement
General assertion
◮ if Jj is early → tj ∈ [rj , dj − pj ]
Dynamic structure
◮ tj is never fixed but computed on-demand depending onthe partial sequence of its machine
r d
J
j j
j
t j
J Ji k
remark: similarities with constraint programming
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
11/25
Inserting a job
Inserting a job Jj between two consecutive jobs Ji and Jk
requires the computation of a maximum available interval[hmin, hmax]:
◮ hmin: minimum date at which Ji can terminate(by pushing Ji and its predecessors)
◮ hmax: maximum date at which Jk can start(by pushing Jk and its successors)
Checking the size of the interval:
◮ max(rj , hmin) + pj ≤ min(dj , hmax)
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
12/25
Pushing jobs
Limits of the interval are computed recursively
eeti = max(ri , eetpred(i)) + pi
JkJi
eeti
lstk
lstk = min(dk , lstsucc(k)) − pk
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
13/25
Best insertion
Condition for insertion
◮ if max(rj , eetpred(j)) + pj ≤ min(dj , lstsucc(j))
◮ Jj can be inserted at that position
Best insertion
◮ All insertion positions are scanned
◮ Jj is inserted where the idle time between pred(j) andsucc(j) is minimum
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
14/25
Tabu Search Algorithm
TS specifications
◮ use a standard TS template
◮ take advantage of special encoding
◮ implement tenure refinements
Neighbourhood structure
◮ Only feasible solutions allowed
◮ Move 1 job from the late list to one of the early lists
◮ move 0 to k early jobs on a same machine → late list
◮ Cost = difference in objective function value
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
15/25
TS parameters
Initial solutions
◮ Greedy approach: shortest processing time
◮ Sort the list of all jobs in increasing order of pj
◮ Fill machine lists sequentially with best insertion
Tabu search parameters
◮ itmax iterations
◮ Tabu criterion: sum of processing times of late jobs
The tabu tenure should be dynamically adjusted
◮ large tenure → all moves might be tabu
◮ small tenure → cycle around a local optimum
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
16/25
Dynamic tenure and cycle detection
Tenure adjustments
◮ all moves tabu → decrease the tabu tenure by 1
◮ cycle detection → increase the tabu tenure by thelength of the cycle and set the next move tabu (allmoves of the cycle can be set tabu)
Cycle detection
◮ cycle greater than tabu tenure → keep history of“visited solutions”
◮ history stores only tabu criterion
◮ cycle detection = two identical substrings in history(same values, same length) and consecutives
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
17/25
Numerical experiments
Objectives
◮ use real-life instances
◮ compare with other aproaches
◮ estimate the quality of the solution
Current status
◮ modify the real-life instances
◮ other approaches are not adapted to our goals
◮ quality compared to optimal solution or lower bounds
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
18/25
Problem instances (1)
Functions are designed for Filtering operations in DSP
Simple functions
Functions Nodes Arcs Cmax (ns)
FFT 4 75 137 70FIR 16 96 172 170FIR 32 192 348 330FFT 8 227 433 110FIR 64 384 700 650DCT 4x4 482 944 100FFT 16 611 1185 150
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
19/25
Problem instances (2)
More complex functions
Functions Nodes Arcs Cmax (ns)
LMS 128 1287 2556 1350FFT 32 1539 3009 190FFT 64 3715 7297 230DCT 8x8 3970 7872 180FFT 128 8707 17153 270FFT 256 19971 39425 310FFT 512 45059 89089 350
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
20/25
Current approaches
Exact solution methods
◮ Constraint Programming-based B&B approachBaptiste Ph., Jouglet A., Le Pape C., Nuijten W. (2001)50 jobs in 10 min., no solution for 100 jobs
◮ Time-indexed ILP formulationM. Sevaux and A. Rossi (2007)up to 1000 jobs in 1 min.
Approximate methods
◮ Heuristics and basic version of SA and TSM. Sevaux and Ph. Thomin (2001)
◮ VNS/TS with specific neighbourhoodM. Sevaux and K. Sorensen (2006)50 jobs → 15% optimal sol., 100 jobs → ≈ 3 sec.
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
21/25
Results
# of MILP Tabu Search methodjobs Av. m Av. m Dev. % # opt. time (s)
20 9.3 9.3 0.0 20 2.240 17.7 17.8 0.6 16 8.860 24.9 25.8 3.6 7 15.580 32.9 34.4 4.6 0 37.6
100 40.4 42.6 5.5 2 49.9
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
22/25
Tabu tenure evolution
5
10
15
20
25
30
35
40
45
1 10 100 1000 10000
tabu
tenu
re
iterations (log scale)
tenure value
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
23/25
Conclusion
Conclusion
◮ TS easy approach to tackle “large” problems
◮ Uses a specialised encoding
◮ Fast and flexible approach(unrelated machines, precedence constraints)
Potential problems / interests
◮ large size instances (45 000 jobs)Data Flow Graph (DFG) → Control Data Flow Graph45 000 jobs → 200∼500 jobs
◮ tabu tenure evolution → decrease too slowly
◮ short time horizon
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
24/25
Perspectives
Ongoing work
◮ Precedences
◮ Multi-purposeoperators
◮ Cost function
◮ Cmax
Next steps of the study
◮ Work on tight lower bounds
◮ Exploit “real” data
◮ Insert resulting algorithm in GAUT
http://web.univ-ubs.fr/gaut/
TS for HLS
M. SevauxK. Sorensen
HLS
Scheduling
Implementation
Tabu Searching
Experiments
Conclusion
25/25
Tabu Searching for High Level Synthesis
Marc Sevaux Kenneth Sorensen
University of South-BrittanyLorient – France
Centre for Industrial Management, KULeuven – Belgium
FRANCORO – ROADeFGrenoble – France
January 20-23, 2007