Download presentation

Presentation is loading. Please wait.

Published byMartin Bradley Modified over 2 years ago

1
Accuracy-Aware Program Transformations Sasa Misailovic MIT CSAIL

2
Collaborators Martin Rinard, Michael Carbin, Stelios Sidiroglou, Henry Hoffmann, Deokhwan Kim, Fan Long, Daniel Roy, Zeyuan Allen Zhu, Michael Kling, Jonathan Kelner, Anant Agarwal

3
Trade Accuracy for Energy and Performance Trade Accuracy for Energy and Performance [Rinard ICS’06, OOPSLA’07; Misailovic, Sidiroglou, Hoffmann, Rinard ICSE’10; Carbin, Rinard, ISSTA’10; Hoffmann, Sidiroglou, Carbin, Misailovic, Agarwal, Rinard ASPLOS’11; Sidiroglou, Misailovic, Hoffmann, Rinard FSE’11; Misailovic, Roy, Rinard, SAS‘11; Zhu, Misailovic, Kelner, Rinard POPL’12; Carbin, Kim, Misailovic, Rinard PLDI’12; Misailovic, Sidiroglou, Rinard, RACES‘12; Misailovic, Kim, Rinard TECS PEC’13; Carbin, Kim, Misailovic, Rinard PEPM’13; Carbin, Misailovic, Rinard, OOPSLA ‘13; …]

4
Harness Approximate Computing How to systematically generate approximate programs? How to predict accuracy of the results of approximate programs? How to find the most profitable approximate programs? Automated Transformations Probabilistic Reasoning Explicit Search and Mathematical Optimization

5
Transformations Do less work Loop perforation Sampling, Task skipping for (i = 0; i < n; i += 2) { … } r = var +. 2; lock(x); function(); unlock(x); Do different kind of work Randomized substitution Exploit Execution Environment Unreliable operation placement Unreliable memory regions, Lock elision

6
Where and when should we apply the transformations? What are the benefits and costs?

7
Optimization Framework Find Candidates for Transformation Analyze Effects of the Transformations Navigate Tradeoff Space Optimization Framework Find Candidates for Transformation Analyze Effects of the Transformations Navigate Tradeoff Space for (i = 0; i < n; i++) { … } for (i = 0; i < n; i += 2) { … } ccc

8
Find Transformation Candidates: Profile program to find time-consuming for loops Analyze the Effects of Transformation: Performance: Compare execution times Accuracy: Compare the quality of the results Safety: memory safety, well formed output Navigate Tradeoff Space: Combine multiple perforatable loops Prioritize loops by their individual performance and accuracy Greedy or Exhaustive Search with Pruning Explicit Search Algorithm for Perforation [Misailovic, Sidiroglou, Hoffmann, Rinard ICSE’10; Hoffmann, Sidiroglou, Carbin, Misailovic, Agarwal, Rinard ASPLOS’11; Sidiroglou, Misailovic, Hoffmann, Rinard FSE’11]

9
x264 Cumulative Loop Scores Mean Normalized Time Accuracy loss (%)

10
Computational Kernels: Several perforatable computations execute for the majority of the time Computational patterns: Distance metrics Data Statistics Iteration steps Monte-Carlo

11
Next Step: Analyses with Guarantees Accuracy analysis: Results valid for a whole range of inputs, not just those used in testing Navigation: Explore the space of transformed programs to find those with optimal tradeoffs

12
Accuracy Analysis: Probabilistic Reasoning [Misailovic, Roy, Rinard SAS ’11; Zhu, Misailovic, Kelner, Rinard POPL ’12; Misailovic, Sidiroglou, Rinard, RACES ‘12, Misailovic, Kim, Rinard TECS PEC ’13, Carbin, Misailovic, Rinard, OOPSLA ’13, Misailovic, Rinard WACAS ‘14, Misailovic, Carbin, Achour, Qi, Rinard MIT-TR ‘14]

13
Optimization of Map-Fold Computations outList = Map ( Func(x), inputList ) Func0: ( 0,T 0 ) Func1: ( 1,T 1 ) Func2: ( 2,T 2 ) Func0: ( 0,T 0 ) Func1: ( 1,T 1 ) Func2: ( 2,T 2 ) [Zhu, Misailovic, Kelner, Rinard POPL 2012; Misailovic, Rinard WACAS 2014]

14
Optimization of Map-Fold Computations Linear + Dynamic programming Func0: ( 0,T 0 ) Func1: ( 1,T 1 ) Func2: ( 2,T 2 ) Func0: ( 0,T 0 ) Func1: ( 1,T 1 ) Func2: ( 2,T 2 ) [Zhu, Misailovic, Kelner, Rinard POPL 2012; Misailovic, Rinard WACAS 2014]

15
float f(float in unrel x) { y = g(x) +. h(x); return y *. y; } Developer’s reliability specification Chisel: Automatic Generation of Approximate Rely Programs [Misailovic, Carbin, Achour, Qi, Rinard MIT-TR 14] Variable and Operation Annotations

16
Chisel: Automatic Generation of Approximate Rely Programs Integer Linear Programming Developer’s specification [Misailovic, Carbin, Achour, Qi, Rinard MIT-TR 14]

17
Navigate Search Space: Mathematical Optimization [Zhu, Misailovic, Kelner, Rinard POPL ’12; Misailovic, Rinard WACAS ‘14 Misailovic, Carbin, Achour, Qi, Rinard, MIT-TR ‘14]

18
Looking Forward Fully Exploit Optimization Opportunities: both application- and hardware-level transformations Reasoning About Uncertainty: logic-based techniques probabilistic techniques empirical techniques Practical Aspects: provide intuition and control for developers and domain experts

19
Takeaway Emerging trend of approximate programs and devices Accuracy-aware transformations are powerful tool Improve performance Reduce energy consumption Facilitate dynamic adaptation and software specialization Interaction of program analysis and search techniques to find profitable, safe, and predictable tradeoffs

20
Takeaway Accuracy-aware transformations Improve performance Reduce energy consumption Facilitate dynamic adaptation and software specialization Program analysis and search can help find profitable, safe, and predictable tradeoffs

21
Takeaway Accuracy-aware transformations Improve performance Reduce energy consumption Facilitate dynamic adaptation and software specialization Program analysis and search can help find profitable, safe, and predictable tradeoffs

Similar presentations

Presentation is loading. Please wait....

OK

Test Yaodong Bi.

Test Yaodong Bi.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on second law of thermodynamics Ppt on solar system for class 8th Ppt on oxidation and reduction reactions Ppt on writing process Ppt on gsm based car security system Ppt on traffic light controller project Ppt on digital energy meter Ppt on event driven programming in visual basic Ppt on developing leadership skills Ppt on renewable sources of energy in india