1 / 17

Inducing Heuristics To Decide Whether To Schedule

Inducing Heuristics To Decide Whether To Schedule. John Cavazos J Eliot B Moss Architecture and Language Implementation Lab University of Massachusetts, Amherst. Motivation. Instruction Scheduling is important Can improve running time by over 15% Can be expensive

kevinwright
Download Presentation

Inducing Heuristics To Decide Whether To Schedule

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 • Decision process less expensive than OPT process • OPT process optional • 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)

  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 SB=Scheduled Blocks, SI=Scheduled Instructions F=Heuristic Cost, S=Scheduling Cost, C=Compilation 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

More Related