Instruction Scheduling Using Max-Min Ant System Optimization - PowerPoint PPT Presentation

About This Presentation
Title:

Instruction Scheduling Using Max-Min Ant System Optimization

Description:

Auto Regressive Filter. Instruction Scheduling. NP-hard ... Ant search strategy local heuristics and solution space traversal ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 36
Provided by: RyanKa
Learn more at: https://cseweb.ucsd.edu
Category:

less

Transcript and Presenter's Notes

Title: Instruction Scheduling Using Max-Min Ant System Optimization


1
Instruction Scheduling Using Max-Min Ant System
Optimization
  • Gang Wang, Wenrui Gong, and Ryan Kastner
  • Dept. of Electrical and Computer Engineering
  • University of California, Santa Barbara
  • GLSVLSI2005, Chicago, April 18, 2005

2
Instruction Scheduling
  • Instruction Scheduling is a fundamental synthesis
    problem
  • Software - compilers for microprocessors
  • Hardware - behavioral synthesis for ASIC, FPGA
  • Requisite Moores Law reference
  • Moore transistors moore computational resources
  • Larger applications moore operations
  • How to best utilize the resources?

3
Instruction Scheduling Definition
Auto Regressive Filter
  • Given a set of instructions and collection of
    computational units
  • Instruction modeled using data flow graph (DFG)
  • Directed acyclic graph
  • Each node is instruction
  • Each edge is a data dependence
  • Find schedule for instructions to minimize some
    function (latency, area, power, )
  • We focus on resource constrained problem, i.e.
    minimize latency given a set of resources.

4
Instruction Scheduling
  • NP-hard
  • Fundamental problem - many different heuristic
    methods have been developed
  • ILP
  • Force directed
  • Genetic algorithm
  • Path based
  • Graph theoretic
  • Computational geometry
  • List scheduling

v2
v1
v6
v8
v10
v3
v7
v9
v11
v4
v5
vn
5
List Scheduling
  • Simple and effective
  • Greedy strategy
  • Operation selection decided by criticality
  • O(n) time complexity
  • Make a priority list of the instructions based on
    some measure (mobility, instruction depth, number
    of successors, etc.)
  • No single priority function works well over all
    applications
  • Highly dependent on problem instance
  • Solution quality varies greatly across different
    functions

6
List Scheduling
  • Procedure ListScheduling(G, R, L)
  • Input DFG(V,E), resource set R, priority list L
  • Output instruction schedule
  • cycle ? 0
  • ReadyList ? successors of start
  • While node end is not scheduled do
  • for op in ReadyList in decending priority do
  • if resource exists for op to start then
  • schedule op at time cycle
  • end if
  • Update ReadyList
  • end for
  • cycle ? cycle 1
  • end while
  • return schedule

v2
v1
v6
v8
v10
v3
v7
v9
v11
v4
v5
vn
7
Our approach Ant System Heuristic
  • Inspired by ethological study on the behavior of
    ants Goss et al. 1989
  • A meta heuristic
  • A multi-agent cooperative searching method
  • A new way for combining global/local heuristics
  • Extensible and flexible

8
Ant System Heuristic
9
Ant System Heuristic
10
Ant System Heuristic
11
Ant System Heuristic
12
Ant System Heuristic
13
Ant System Heuristic
14
Ant System Heuristic
15
Ant System Heuristic
16
Ant System Heuristic
17
Autocatalytic Effect
18
Formulating Problems Using Ant Search
  • Problem model define search space, create
    decision variables
  • Pheromone model used as a global heuristic,
    distribution of pheromones, evaporation and
    strengthening strategies
  • Ant search strategy local heuristics and
    solution space traversal
  • Solution construction method of creating an
    answer from decision variables
  • Feedback provide assessment of solution quality
    and adjust pheromones accordingly

19
Hybrid Ants with Lists
  • Combine Ant System Optimization and List
    Scheduling
  • Ants determine priority list
  • List scheduling framework evaluates the
    goodness of the list
  • Iterative approach

20
Pheromone Model For Instruction Scheduling
Each instruction opi ? I associated with n
pheromone trails?? where j 1, , n which
indicate the favorableness of assign instruction
i to position j
Each instruction also has a dynamic local
heuristic
21
Ant Search Strategy
  • Multiple ants independently create their own
    priority list
  • Fill one instruction at a time
  • Iterative process

op1
op1
op4
op2
op2
op1
op3
op3
op5
op4
op4
op6
op5
op5
op2
op6
op6
op3
Instructions
22
Ant Search Strategy
  • Each ant has memory about instructions already
    selected
  • At step j ant has already selected j-1
    instructions
  • jth instruction selected probabilistically

op1
1
op1
op4
op2
2
op2
op1
op3
3
op3
op5
op4
4
op4
op5
5
op5
op6
6
op6
Instructions
Priority List
23
Ant Search Strategy
  • ?ij(k) global heuristic (pheromone) for
    selecting instruction i at j position
  • ?j(k) local heuristic can use different
    properties
  • Instruction mobility (IM)
  • Instruction depth (ID)
  • Latency weighted instruction depth (LWID)
  • Successor number (SN)
  • ?, ? control influence of global and local
    heuristics

24
Pheromone Update
  • Priority lists evaluated using list scheduling
  • Latency Lh for the result from ant h
  • Evaporation prevent stigmergy and punish
    useless trails
  • Reinforcement award trails with better quality

25
Pheromone Update
  • Evaporation happens on all trails
  • Reward the used trails based on the solutions
    quality

op1
op1
op4
op2
op2
op1
op3
op3
op5
op4
op4
op6
op5
op5
op2
op6
op6
op3
Instructions
26
Max-Min Ant System (MMAS)
  • Risks of Ant System optimization
  • Too much feedback
  • Dynamic range of pheromone trails can increase
    rapidly
  • Limited search of solution space
  • Unused trails can be repetitively punished,
    therefore certain schedules may never be selected
  • Premature convergence
  • MMAS is designed to address this problem
  • Built upon original AS
  • Idea is to limit the pheromone trails within an
    evolving bound so that more broader exploration
    is possible
  • Better balance the exploration and exploitation
  • Prevent premature convergence

27
Max-Min Ant System (MMAS)
  • Limit ?(t) within ?min(t) and ?max(t)
  • Sgb is the best global solution found so far at
    t-1
  • f(.) is the quality evaluation function, e.g.
    latency in our case
  • avg is the average size of decision choices
  • Pbest ? (0,1 is the controlling parameter
  • Smaller Pbest ? tighter range for ? ? more
    emphasis on exploration
  • When Pbest ? 0, we set ?min ? ?max

28
Other Algorithmic Refinements
  • Dynamically evolving local heuristics
  • Example dynamically adjust instruction mobility
  • Benefit dynamic search space reduction
  • Taking advantage of topological sorting of DFG
    when constructing priority list
  • Each step ants select from the ready instructions
    instead from all unscheduled instructions
  • Benefit greatly reduce the search space

29
MMAS Instruction Scheduling Algorithm
30
ARF Pheromones
31
Experimental Results
Benchmark (nodes/edges) Resources CPLEX (latency /runtime) Force Directed List Scheduling List Scheduling List Scheduling List Scheduling MMAS-IS (average over 5 runs) MMAS-IS (average over 5 runs) MMAS-IS (average over 5 runs) MMAS-IS (average over 5 runs)
Benchmark (nodes/edges) Resources CPLEX (latency /runtime) Force Directed IM ID LWID SN IM ID LWID SN
HAL(21/25) la, lfm, lm, 3i, 3o 8/32 8 8 8 9 8 8 8 8 8
ARF(28/30) 2a, lfm, 2m 11/22 11 11 13 13 13 11 11 11 11
EWF(34/47) la, lfm, lm 27 /24000 28 28 31 31 28 27.2 27.2 27 27.2
FIR1 (40/39) 2a, 2m, 3i, 3o 13/232 19 19 19 19 18 17.2 17.2 17 17.8
FIR2(44/43) la, lfm, lm, 3i, 3o 14/11560 19 19 21 21 21 16.2 16.4 16.2 17
COSINE 1(66/76) 2a,2m, lfm, 3i, 3o ? 18 19 20 18 18 17.4 18.2 17.6 17.6
COSINE2(82/91) 2a,2m, lfm, 3i, 3o ? 23 23 23 23 23 21.2 21.2 21.2 21.2
Average 18 18.2 19.3 20.5 18.5 16.8 17.0 16.9 17.1
  • ILP (optimal) using CPLEX
  • List scheduling
  • Instruction mobility (IM), instruction depth
    (ID), latency weighted instruction depth (LWID),
    successor number (SN)
  • Ant scheduling results using different local
    heuristics (Averaged over 5 runs, each run 100
    iteration with 5 ants)

32
Conclusion
  • Proposed a novel heuristic method for
    resource-constrained instruction scheduling
    problem
  • Hybrid MMAS and List Scheduling
  • Create a mathematic model for combining global
    and local heuristics
  • Experiment results are promising
  • Near optimal results
  • Outperforms widely used force-directed approach
  • More stable and insensitive to choice of
    application/local heuristics
  • Thanks! Questions?

33
Extra Slides
34
DFG Size Distribution
35
Auto Regressive Filter
Write a Comment
User Comments (0)
About PowerShow.com