program behavior sequence prediction
play

Program Behavior Sequence Prediction Bo Wu, Yunlian Jiang, Xipeng - PowerPoint PPT Presentation

Program Behavior Sequence Prediction Bo Wu, Yunlian Jiang, Xipeng Shen (The College of William & Mary) Yaoqing Gao, Raul Silvera, Graham Yiu (IBM Toronto) Thursday, November 10, 11 Outline Motivation Our perspectives Behavior


  1. Program Behavior Sequence Prediction Bo Wu, Yunlian Jiang, Xipeng Shen (The College of William & Mary) Yaoqing Gao, Raul Silvera, Graham Yiu (IBM Toronto) Thursday, November 10, 11

  2. Outline  Motivation  Our perspectives  Behavior sequence prediction framework  Some results of loop trip count prediction  Possible uses  Summary Thursday, November 10, 11

  3. Motivation  Accurate and proactive prediction of program behaviors is essential for many optimizations  Loop trip counts for loop unrolling  Function hotness for function optimization level in JIT  profitability for speculative parallelization  Cache miss rates for prefetching aggressiveness  Loop coldness for outlining  ...... Thursday, November 10, 11

  4. Motivation  The usefulness is not limited to program optimizations  OS level  Provision in cloud computing  Scheduling to reduce resource contention  Architecture level  Voltage scaling Thursday, November 10, 11

  5. Motivation  However, the prediction of program behaviors is challenging Thursday, November 10, 11

  6. Motivation  Opportunities do exist Thursday, November 10, 11

  7. Our Perspectives  Di fg erence between instance prediction and sequence prediction  Instance prediction: the next one or several instances  Sequence Prediction: the whole sequence of the considered behavior  Statistical correlation among di fg erent behaviors  Trip counts of two di fg erent loops  Loop trip counts and function hotness  Context awareness  Loop stack and call stack  Correlated behaviors happened before Thursday, November 10, 11

  8. Our Perspectives  Three requirements for behavior prediction  Accuracy  Proactivity  Scope Thursday, November 10, 11

  9. Sequence Prediction Framework  The initial study is on loop trip counts prediction  Loops are dominant parts  Resource requirements  inlining  Computation granularity  ... Thursday, November 10, 11

  10. Sequence Prediction Framework  Loop trip count sequences follow patterns Thursday, November 10, 11

  11. Sequence Prediction Framework  Three steps  Simplification Recognize the pattern of a sequence and use several features to represent it  Prediction Predict the sequence features through correlation  Generation Reconstruct sequences from the predicted features Thursday, November 10, 11

  12. Sequence Prediction Framework  Pattern Recognition Thursday, November 10, 11

  13. Sequence Prediction Framework  Pattern Recognition <c1.4,1,1,17> <c2.1.1,c1.4,10,31,-1,c1.1,18,23> Thursday, November 10, 11

  14. Sequence Prediction Framework  Correlation Prediction Thursday, November 10, 11

  15. Sequence Prediction Framework Thursday, November 10, 11

  16. Results 1.00 0.75 Loop Coverage 0.50 0.25 0 f m 2 k r c r 3 f g e c e e e p m l x n g i r m u m s m n e a i 4 z b r t i j r n m a 6 b h s o e p a 2 p g v h u h s A q b i l Thursday, November 10, 11

  17. Results 1.000 0.925 Pred. Acc. 0.850 0.775 0.700 f m 2 k r c r 3 f g e c e e e m l g p x n i m u r m s m n i 4 e a z b r t i a 6 j r n m b h s o e p 2 a p g h v u h s A q b i l Thursday, November 10, 11

  18. Possible Uses  Aggressive Optimizations  Loop unrolling for non-countable loops While(!p) { if(satisfySomeCondition(p)) { result = p; break; } else p = p->next; }  Need runtime check and recovery support Thursday, November 10, 11

  19. Possible Uses  Loop parallelization loop1 { loop2 { loop interchange? loop2 { loop1 { ...; ...; } } } } Thursday, November 10, 11

  20. Possible Uses  From loop trip counts to other behaviors – Function hotness – Prefetching aggressiveness – Software pipelining – Trace selection in trace JIT Thursday, November 10, 11

  21. Summary  Program behavior prediction is useful for many compiler optimizations, and even for OS and architecture level  Behavior Sequences show extreme complexity, but correlation provides an opportunity to predict them  Three requirements for useful predictions  High prediction accuracy is possible for many loops Thursday, November 10, 11

  22. Thanks! Bo Wu @ William & Mary Thursday, November 10, 11

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend