EnerJ: Approximate Data Types for Safe and General Low-Power Computation (PLDI’2011) Adrian Sampson, Werner Dietl, Emily Fortuna Danushen Gnanapragasam,

Slides:



Advertisements
Similar presentations
Technology Drivers Traditional HPC application drivers – OS noise, resource monitoring and management, memory footprint – Complexity of resources to be.
Advertisements

Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Adrian Sampson, Hadi Esmaelizadeh,1 Michael Ringenburg, Reneé St
INSTRUCTION SET ARCHITECTURES
Department of Computer Science iGPU: Exception Support and Speculative Execution on GPUs Jaikrishnan Menon, Marc de Kruijf Karthikeyan Sankaralingam Vertical.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development.
Maintaining Data Integrity in Programmable Logic in Atmospheric Environments through Error Detection Joel Seely Technical Marketing Manager Military &
CSE 341, Winter Type Systems Terms to learn about types: –Type –Type system –Statically typed language –Dynamically typed language –Type error –Strongly.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
Imprecise Computing Yavuz Yetim. Overview Motivation Background Definition and Causes of Imprecision Solution Approaches Discussion of Two Methods Future.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Chapter 6. 2 Objectives You should be able to describe: Function and Parameter Declarations Returning a Single Value Pass by Reference Variable Scope.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Data types and variables
1 Sharing Objects – Ch. 3 Visibility What is the source of the issue? Volatile Dekker’s algorithm Publication and Escape Thread Confinement Immutability.
Developing Dependable Systems CIS 376 Bruce R. Maxim UM-Dearborn.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
Lecture 9 Concepts of Programming Languages
Chapter 2 Data Types, Declarations, and Displays
Design of SCS Architecture, Control and Fault Handling.
C Programming for Embedded Systems. fig_06_00 Computer Layers Low-level hardware to high-level software (4GL: “domain-specific”, report-driven, e.g.)
1 Chapter 5: Names, Bindings and Scopes Lionel Williams Jr. and Victoria Yan CSci 210, Advanced Software Paradigms September 26, 2010.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Types for Programs and Proofs Lecture 1. What are types? int, float, char, …, arrays types of procedures, functions, references, records, objects,...
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
A First Book of C++: From Here To There, Third Edition2 Objectives You should be able to describe: Function and Parameter Declarations Returning a Single.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
F LEX J AVA : Language Support for Safe and Modular Approximate Programming Jongse Park, Hadi Esmaeilzadeh, Xin Zhang, Mayur Naik, William Harris Alternative.
Assuring Application-level Correctness Against Soft Errors Jason Cong and Karthik Gururaj.
Speculative Software Management of Datapath-width for Energy Optimization G. Pokam, O. Rochecouste, A. Seznec, and F. Bodin IRISA, Campus de Beaulieu
Reconfigurable Computing Using Content Addressable Memory (CAM) for Improved Performance and Resource Usage Group Members: Anderson Raid Marie Beltrao.
CSE 425: Data Types I Data and Data Types Data may be more abstract than their representation –E.g., integer (unbounded) vs. 64-bit int (bounded) A language.
SECURE WEB APPLICATIONS VIA AUTOMATIC PARTITIONING S. Chong, J. Liu, A. C. Myers, X. Qi, K. Vikram, L. Zheng, X. Zheng Cornell University.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
These notes were originally developed for CpSc 210 (C version) by Dr. Mike Westall in the Department of Computer Science at Clemson.
Polymorphism Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 7.3.
University of Maryland Using Dyninst to Measure Floating-point Error Mike Lam, Jeff Hollingsworth and Pete Stewart.
Transactional Coherence and Consistency Presenters: Muhammad Mohsin Butt. (g ) Coe-502 paper presentation 2.
Reconfigurable Computing Ender YILMAZ, Hasan Tahsin OĞUZ.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Lecture 04: Instruction Set Principles Kai Bu
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
1 Classes II Chapter 7 2 Introduction Continued study of –classes –data abstraction Prepare for operator overloading in next chapter Work with strings.
Exploiting Instruction Streams To Prevent Intrusion Milena Milenkovic.
Harnessing Soft Computation for Low-Budget Fault Tolerance Daya S Khudia Scott Mahlke Advanced Computer Architecture Laboratory University of Michigan,
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO CS 219 Computer Organization.
Approximate Computing on FPGA using Neural Acceleration Presented By: Mikkel Nielsen, Nirvedh Meshram, Shashank Gupta, Kenneth Siu.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Constructors and Destructors
Introduction to Algorithms
Types for Programs and Proofs
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
Java Primer 1: Types, Classes and Operators
A Closer Look at Instruction Set Architectures
Maintaining Data Integrity in Programmable Logic in Atmospheric Environments through Error Detection Joel Seely Technical Marketing Manager Military &
Safely Supporting Probabilistic Data: PL Techniques as Part of the Story Dan Grossman University of Washington.
Introduction to Abstract Data Types
Constructors and Destructors
Introduction to Algorithms
Introduction to Data Structure
Type Systems Terms to learn about types: Related concepts: Type
Fault Tolerant Systems in a Space Environment
Presentation transcript:

EnerJ: Approximate Data Types for Safe and General Low-Power Computation (PLDI’2011) Adrian Sampson, Werner Dietl, Emily Fortuna Danushen Gnanapragasam, Luis Ceze, Dan Grossman University of Washington Presented by Xianwei Zhang

Overview  Observations o Energy is an increasing concern in computer systems (phones, data centers, etc) o Systems spend a significant amount of energy guaranteeing correctness o Many applications have high tolerance to run-time faults.  Challenge to exploit energy-accuracy tradeoff o Isolate parts of the program that must be precise from those that can be approximated so that a program functions correctly even QoS degrades.  Contributions o Propose a safe and general model for approximate programming o Present EnerJ, an extension of Java with type qualifiers o Demonstrate effectiveness using proposed approximation-aware architecture. 2/20/ Presented by Xianwei Zhang

Perfect Correctness is Not Always Required  No perfect answers or hard to get perfect answers o Heuristic algorithms, inherent incorrectness.  Care more about aggregate trends o Large-scale data analytics, trends instead of individual data elements. 2/20/2016 3

Not All Data Are Error Resilient  Non-critical portion - safely to do approximation o E.g., errors in output pixel data are tolerable and even undectable.  Critical portion - must be protected from error o Small errors in image format make the output unreadable. 2/20/ ✗ ✓

Type System for Approximate Computation  Safety o Separate critical and non-critical program components.  Generality o A range of approximation strategies supported with a single abstraction.  EnerJ, an extension to Java that adds approximate data types. o Type qualifiers o Endorsement o Operator overloading o Prevention of implicit flows o Objects: qualifier polymorphism 2/20/2016 5

Type int a = int p = …; p = a; a = p; 2/20/  Every value has an approximate or precise type  Precise types are the is made explicit  Illegal to assign approx into a precise-typed variable ✓ ✗

Endorsement: Escape int a = expensiveCal(); int p; //precise by default p = endorse (a); //legal quickChecksum (p); output (p); 2/20/  Fully isolating approx and precise parts is not very useful o Programs usually have a phase of fault-tolerant computation followed by a phase of fault-sensitive reduction or output o E.g., image manipulation phase, then a critical checksum over the result.  Programmer controls explicitly when approx data can affect precise state

Logic Approximation: int a = …; int p = …; p + p; int int p + a; a + a; int int 2/20/  Overload operators and methods based on type qualifiers o E.g., two signatures for + operator on integers.

Control int a = …; int p = …; if (a == 10) { p = 2; } 2/20/  Disallow implicit flows that occur via control flow o While p is precise and no assignment is present, its value is affected.  The restriction is conservative o Prohibits approx conditions even when the result can affect only approx.  Work around the restriction using int a = …; int p = …; if (endorse (a == 10)) { p = 2; } ✗ ✓

class FloatSet float[] nums = …; float mean() { calculate mean float mean_APPROX() { take mean of first 1/2 } 2/20/  Classes also support approximation enable approx or precise instances non-static members, depends on the instance’s type o _APPROX: specialize method definitions based on class type FloatSet pSet; pSet.mean(); FloatSet aSet; aSet.mean(); //mean_APPROX

Architectural Approximation  Approximate storages o Registers: precise and approx are distinguished using register number o Cache and memory: distinguished by address.  Approximate operations o Approx instructions use special FUs that perform approx operations. 2/20/

Hardware Techniques for Saving Energy  Voltage scaling in logic circuits  Width reduction is FP operations  DRAM refresh rate  SRAM supply voltage 2/20/

Implementation  Annotation o Manually annotate each application using EnerJ o Focused on critical code where most of the time is spent.  Simulation o Implemented a compiler and runtime system that executes EnerJ code o Utilize instrumentation calls to inject transient faults to emulate approx.  Approximation o Reduce FP bit-width, flip bit of accesses into SRAM and DRAM o Assumption: heap data in DRAM, stack data in SRAM. 2/20/

Annotated Declarations  Primary approx data is in a small portion of code  Annotations are sparse and straightforward to insert 2/20/

Energy Savings  Save 9%-48% of total execution energy  Majority of savings come from Base to Mild 2/20/

Output Error  Metric: compare approx result against precise one  “Mild” configuration is a good fit for all 2/20/

Summary  Approximate computing is promising o A new way to save energy in large classes of applications.  Proposed type system o Variables and objects can be declared as approx or precise o Safe: guarantees precise unless given explicit programmer permission o General: unifies approx data storage, approx computation and approx algs.  Implementations and evaluations o Implemented the type system atop of Java and tested with several apps o Annotations are easy to insert o For annotated programs, the runtime system or arch can choose multi approx execution techniques o Hardware-based model shows potential energy savings in 9%-48% range. 2/20/ Presented by Xianwei Zhang