John Cavazos - PowerPoint PPT Presentation

About This Presentation
Title:

John Cavazos

Description:

UNIVERSITY OF MASSACHUSETTS, AMHERST Department of Computer Science. John Cavazos ... University of Massachusetts, Amherst. Inducing Heuristics To Decide ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 18
Provided by: eecis
Category:
Tags: cavazos | john | mass

less

Transcript and Presenter's Notes

Title: John Cavazos


1
Inducing Heuristics To Decide Whether To
Schedule
  • John Cavazos
  • J Eliot B Moss
  • Architecture and Language Implementation Lab
  • University of Massachusetts, Amherst

2
Motivation
  • Instruction Scheduling is important
  • Can improve running time by over 15
  • Can be expensive
  • Frequently not beneficial
  • Problem Can we predict which blocks will benefit
    from scheduling?

3
Our Proposal
  • Use static features to predict when instruction
    scheduling is beneficial
  • Use supervised learning to construct a heuristic
    (filter)
  • Simple features and learning scheme were
    successful!
  • Could be harder for other optimizations

4
Optimization Filters
  1. Decision process less expensive than OPT process
  2. OPT process optional
  3. OPT process not always be profitable

5
Traditional Heuristic Construction
6
Use Supervised Learning!
  • Induces functions automatically
  • All you need is learning examples
  • a,,x,y,z ? label
  • a,,x,y,z are the features
  • label (true or false) whether to schedule
  • Minimize errors over training set
  • Prefers less complicated function

7
Benefits of Supervised Learning
  • Heuristic construction is sped up
  • Determines relative importance of features
  • Efficient and effective
  • Good heuristic generated in minutes
  • Guaranteed theoretically sound
  • Traditional approach ad-hoc

8
Inducing a Filterfor Instruction Scheduling
  • Identify cheap-to-compute features of block
  • Obtain raw training data for each block
  • Features (properties) of the block
  • Estimated time with and without scheduling
  • Use supervised learning to induce filter
  • Rule Induction
  • Install filter into compiler
  • Controls which blocks to schedule

9
Properties of Block (Features)
Feature Kind Meaning
BBLen Block Size Number of Instructions
Branch, Call, Load, Store,Return Operation Fraction of that type of instruction
Integer, Float, System Functional Unit Fraction of instructions that execute on that FU
PEI, GC, Yield, Thread Hazard Fraction of that type of hazard instruction
10
Block Timing Estimator
  • Estimate of cycles to execute block
  • Simple model of real machine
  • Determines cost of block in isolation
  • Absolute cycle count not important
  • Relative differences important

11
Labeling using Thresholds
  • Positive If Benefit greater than Threshold
  • Negative If Benefit less than or equal to 0
  • Neutral If Benefit greater than 0 and less
    than Threshold

12
Motivation for Threshold Technique
  • Simplify supervised learning problem
  • Remove cases of fine distinction
  • If a small benefit prefer not to schedule
  • Remember Scheduling is costly
  • Apply scheduling if benefit above threshold.

13
Effectiveness with Filtering
14
Efficiency with Filtering
15
Cost of Evaluating Filters
Threshold SB SI F/S F/C S/C
t0 16.8 36.3 6.5 0.7 10.3
t5 16.1 36.9 6.3 0.7 10.3
t10 12.7 28.5 8.8 0.7 7.6
t15 11.2 23.3 9.3 0.6 6.7
t20 8.3 20.5 9.8 0.6 6.2
t25 9.2 21.0 10.3 0.7 6.3
SBScheduled Blocks, SIScheduled
Instructions FHeuristic Cost, SScheduling Cost,
CCompilation Cost List Scheduling is 13 to
23 of total compilation time
16
Future Work withOptimization Filters
  • Use a filter to control register allocation
  • Graph Coloring
  • Effective, but expensive
  • Linear Scan
  • Efficient, but not always as effective
  • Heuristic decides which algorithm to apply

17
Conclusion
  • Optimization Filters are successful
  • Reducing scheduling time by 75
  • Preserve 93 of scheduling benefit
  • Use of supervised learning effective
  • No previous hand-coded heuristic
Write a Comment
User Comments (0)
About PowerShow.com