Accuracy-Aware Program Transformations Sasa Misailovic MIT CSAIL.

Slides:



Advertisements
Similar presentations
Random Forest Predrag Radenković 3237/10
Advertisements

Data Mining Feature Selection. Data reduction: Obtain a reduced representation of the data set that is much smaller in volume but yet produces the same.
Probabilistic Planning (goal-oriented) Action Probabilistic Outcome Time 1 Time 2 Goal State 1 Action State Maximize Goal Achievement Dead End A1A2 I A1.
Programming Abstractions for Approximate Computing Michael Carbin with Sasa Misailovic, Hank Hoffmann, Deokhwan Kim, Stelios Sidiroglou, Martin Rinard.
Institute for Theoretical Physics and Mathematics Tehran January, 2006 Value based decision making: behavior and theory.
Chapter 1 Introduction to Modeling DECISION MODELING WITH MICROSOFT EXCEL Copyright 2001 Prentice Hall Publishers and Ardith E. Baker.
Randomized Accuracy Aware Program Transformations for Efficient Approximate Computations Sasa Misailovic Joint work with Zeyuan Allen ZhuJonathan KelnerMartin.
Predictive Modeling for Disability Pricing May 13, 2009 Claim Analytics Inc. Barry Senensky FSA FCIA MAAA Jonathan Polon FSA
©GoldSim Technology Group LLC., 2004 Probabilistic Simulation “Uncertainty is a sign of humility, and humility is just the ability or the willingness to.
What Are Partially Observable Markov Decision Processes and Why Might You Care? Bob Wall CS 536.
Green: A Framework for Supporting Energy-Conscious Programming using Controlled Approximation Woongki Baek Stanford University Trishul M. Chilimbi Microsoft.
Vertically Integrated Analysis and Transformation for Embedded Software John Regehr University of Utah.
Telescoping Languages: A Compiler Strategy for Implementation of High-Level Domain-Specific Programming Systems Ken Kennedy Rice University.
Self-Architecting Software SYstems (SASSY) from QoS-Annotated Activity Models Sam Malek Naeem Esfahani Daniel A. Menascé João P. Sousa Hassan Gomaa May.
Chapter 5. Operations on Multiple R. V.'s 1 Chapter 5. Operations on Multiple Random Variables 0. Introduction 1. Expected Value of a Function of Random.
ASAC : Automatic Sensitivity Analysis for Approximate Computing Pooja ROY, Rajarshi RAY, Chundong WANG, Weng Fai WONG National University of Singapore.
Ensemble Learning (2), Tree and Forest
Zichao Qi, Fan Long, Sara Achour, and Martin Rinard MIT CSAIL
Dancing With Uncertainty Saša Misailović Stelios Sidiroglou Martin Rinard MIT CSAIL.
Module 3: Business Information Systems
CHAPTER 11 Managerial Support Systems. CHAPTER OUTLINE  Managers and Decision Making  Business Intelligence Systems  Data Visualization Technologies.
TASK ADAPTATION IN REAL-TIME & EMBEDDED SYSTEMS FOR ENERGY & RELIABILITY TRADEOFFS Sathish Gopalakrishnan Department of Electrical & Computer Engineering.
SAGE: Self-Tuning Approximation for Graphics Engines
University of Maryland Automatically Adapting Sampling Rates to Minimize Overhead Geoff Stoker.
Data Flow in Static Profiling Cathal Boogerd, Delft University, The Netherlands Leon Moonen, Simula Research Lab, Norway ?
Introduction to variable selection I Qi Yu. 2 Problems due to poor variable selection: Input dimension is too large; the curse of dimensionality problem.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
F LEX J AVA : Language Support for Safe and Modular Approximate Programming Jongse Park, Hadi Esmaeilzadeh, Xin Zhang, Mayur Naik, William Harris Alternative.
Using Loop Perforation to Dynamically Adapt Application Behavior to Meet Real-Time Deadlines Henry Hoffmann, Sasa Misailovic, Stelios Sidiroglou, Anant.
1 Summary of lectures 1.Introduction to Algorithm Analysis and Design (Chapter 1-3). Lecture SlidesLecture Slides 2.Recurrence and Master Theorem (Chapter.
Temperature Discovery Search Temperature Discovery Search (TDS) is a new minimaxbased game tree search method designed to compute or approximate the temperature.
Managerial Decision Making and Problem Solving
High Performance Embedded Computing © 2007 Elsevier Lecture 3: Design Methodologies Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte Based.
1 Software Reliability Assurance for Real-time Systems Joel Henry, Ph.D. University of Montana NASA Software Assurance Symposium September 4, 2002.
High Performance Embedded Computing © 2007 Elsevier Chapter 1, part 2: Embedded Computing High Performance Embedded Computing Wayne Wolf.
1 Part II: Practical Implementations.. 2 Modeling the Classes Stochastic Discrimination.
Predictive Design Space Exploration Using Genetically Programmed Response Surfaces Henry Cook Department of Electrical Engineering and Computer Science.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
MGS3100_01.ppt/Aug 25, 2015/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Introduction - Why Business Analysis Aug 25 and 26,
Indirect Supervision Protocols for Learning in Natural Language Processing II. Learning by Inventing Binary Labels This work is supported by DARPA funding.
Proving Programs Robust Swarat Chaudhuri 1,3 Sumit Gulwani 2 Roberto Lublinerman 1 Sara Navidpour 1 1 Pennsylvania State University 2 Microsoft Research.
Reasoning about Relaxed Programs Michael Carbin Deokhwan Kim, Sasa Misailovic, and Martin Rinard.
Application Heartbeats Henry Hoffmann, Jonathan Eastep, Marco Santambrogio, Jason Miller, Anant Agarwal CSAIL Massachusetts Institute of Technology Cambridge,
Design, Optimization, and Control for Multiscale Systems
Department of Computer Science A Case for Coordinating Accuracy-aware Applications with Power-aware Systems Henry Hoffmann
Sparse Bayesian Learning for Efficient Visual Tracking O. Williams, A. Blake & R. Cipolloa PAMI, Aug Presented by Yuting Qi Machine Learning Reading.
Using Cache Models and Empirical Search in Automatic Tuning of Applications Apan Qasem Ken Kennedy John Mellor-Crummey Rice University Houston, TX Apan.
Data Mining and Decision Support
Information Design Trends Unit Five: Delivery Channels Lecture 2: Portals and Personalization Part 2.
NTU & MSRA Ming-Feng Tsai
Supervised Machine Learning: Classification Techniques Chaleece Sandberg Chris Bradley Kyle Walsh.
The SEEC Framework and Runtime System Henry Hoffmann MIT CSAIL High Performance Embedded Computing Workshop September.
Identifying “Best Bet” Web Search Results by Mining Past User Behavior Author: Eugene Agichtein, Zijian Zheng (Microsoft Research) Source: KDD2006 Reporter:
Student: Shaobo He, Advisor: Zvonimir Rakamarić TOWARDS AUTOMATED DIFFERENTIAL PROGRAM VERIFICATION FOR APPROXIMATE COMPUTING.
PROPRIETARY  2003 Data Research Analysis & Consultancy Solutions All Rights Reserved. This is achieved by: Improving availability / reducing stock outs.
Learning Kernel Classifiers 1. Introduction Summarized by In-Hee Lee.
Anders Nielsen Technical University of Denmark, DTU-Aqua Mark Maunder Inter-American Tropical Tuna Commission An Introduction.
Rely: Verifying Quantitative Reliability for Programs that Execute on Unreliable Hardware Michael Carbin, Sasa Misailovic, and Martin Rinard MIT CSAIL.
Learning A Better Compiler Predicting Unroll Factors using Supervised Classification And Integrating CPU and L2 Cache Voltage Scaling using Machine Learning.
An Offline Approach for Whole-Program Paths Analysis using Suffix Arrays G. Pokam, F. Bodin.
Tree and Forest Classification and Regression Tree Bagging of trees Boosting trees Random Forest.
Introduction to emulators Tony O’Hagan University of Sheffield.
Integrating Algorithms and Coding into the Mathematics Classroom
Boosting and Additive Trees (2)
Gabor Madl Ph.D. Candidate, UC Irvine Advisor: Nikil Dutt
Objective of This Course
Distributed Event Processing With Java Shared Object Spaces
Rohan Yadav and Charles Yuan (rohany) (chenhuiy)
Introduction to Decision Sciences
Sculptor: Flexible Approximation with
Presentation transcript:

Accuracy-Aware Program Transformations Sasa Misailovic MIT CSAIL

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

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; …]

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

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

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

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

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]

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

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

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

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]

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]

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]

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

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

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

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

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

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

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