Presentation is loading. Please wait.

Presentation is loading. Please wait.

U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Mitigating the Compiler Optimization Phase- Ordering Problem using Machine Learning.

Similar presentations


Presentation on theme: "U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Mitigating the Compiler Optimization Phase- Ordering Problem using Machine Learning."— Presentation transcript:

1 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Mitigating the Compiler Optimization Phase- Ordering Problem using Machine Learning Sameer Kulkarni John Cavazos

2 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Introduction to Phase Ordering Present State-of-the-Art Proposed Solution Understand code Predict optimization An example Results Questions

3 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department What is Phase Ordering? Change ordering of a given set optimizations Opt. 1Opt. 2Opt. 3Opt. 4Opt. 1Opt. 3Opt. 2Opt. 4

4 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Why is it important? Plethora of optimizations to choose. All interact with each other Register Allocation & Instruction Scheduling Loop Unrolling & CSE Branch Optimization & Static Analysis

5 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Introduction to Phase Ordering Present State-of-the-Art Proposed Solution Understand code Predict optimization An example Results Questions

6 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Present Solutions Developer’s intuition Using a static sequence using search Pseudo Random Search (ML) Hill Climbing, Genetic Algorithm

7 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Generation 1 Generation 2 Using Genetic Algorithms…

8 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Disadvantages of State-of-art One size fits all approach Change in Compiler Change in Architecture Change in Code Expensive Search

9 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department A simple experiment Select a set of optimizations, and set a sequence length Generate 500 random sequences Use each of the optimization sequence to compile and run a set of benchmarks

10 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department

11 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Introduction to Phase Ordering Present State-of-the-Art Proposed Solution Understand code Predict optimization An example Results Questions

12 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Proposed Solution Analyze Code Predict best optimization End optimizations? Apply Optimization

13 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Static Source Code Features Method level information Instruction Mix conditionals memory ops size locals space

14 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Static Source Code Features Method level information Instruction Mix conditionals memory ops size locals space

15 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Proposed Solution Analyze Code Predict best optimization End optimizations? Apply Optimization

16 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Neural Network

17 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Proposed Solution Analyze Code Predict best optimization End optimizations? Apply Optimization

18 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT

19 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Neuro Evolution of Augmented Topologies Evolutionary approach to ANNs Starts with a minimally connected network

20 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Generation 1 Generation n Generation 2 Using NEAT…

21 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Introduction to Phase Ordering Present State-of-the-Art Proposed Solution Understand code Predict optimization An example Results Questions

22 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department scimark.lu bencmark Generated by default O3 Generated by NEAT

23 U NIVERSITY OF D ELAWARE Computer & Information Sciences Department Advantages Source code agnostic Customized optimization sequence Train once, use every-time Elegant stopping criteria Optimization sequence length is not static Saves time by intelligent selection

24 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Introduction to Phase Ordering Present State-of-the-Art Proposed Solution Understand code Predict optimization An example Results Questions

25 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT

26 Results on SpecJVM98 Speedup normalized over O3

27 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Results on SpecJVM2008 Speedup normalized over O3

28 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Results on DaCapo Speedup normalized over O3

29 U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Mitigating the Compiler Optimization Phase- Ordering Problem using Machine Learning Thank you!


Download ppt "U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Mitigating the Compiler Optimization Phase- Ordering Problem using Machine Learning."

Similar presentations


Ads by Google