EnerJ
Approximate Data Types for Safe and General Low-Power Computation
Adrian Sampson Werner Dietl Emily Fortuna Danushen Gnanapragasam Luis Ceze Dan Grossman
sa pa
PLDI 2011 University of Washington
EnerJ Approximate Data Types for Safe and General Low-Power - - PowerPoint PPT Presentation
EnerJ Approximate Data Types for Safe and General Low-Power Computation Adrian Sampson Werner Dietl Emily Fortuna Danushen Gnanapragasam Luis Ceze Dan Grossman sa pa University of Washington PLDI 2011 photo: Apple, Inc. photo: Robert
Approximate Data Types for Safe and General Low-Power Computation
Adrian Sampson Werner Dietl Emily Fortuna Danushen Gnanapragasam Luis Ceze Dan Grossman
sa pa
PLDI 2011 University of Washington
photo: Apple, Inc.
photo: Robert Scoble (CC BY 2.0)
photo: Rob Van De Pavert (CC BY-NC-SA 2.0)
Save energy using programmer controls
Perfect correctness is not required
information retrieval machine learning sensory data scientific computing physical simulation games augmented reality computer vision
Anant Agarwal, Martin Rinard, Stelios Sidiroglou, Sasa Misailovic, and Henry
consumption, and respond to failures. Technical report, MIT, 2009. [1] B.E.S. Akgul, L.N. Chakrapani, P. Korkmaz, and K.V. Palem. Probabilistic CMOS technology: A survey and future directions. In IFIP Intl. Conference on VLSI, 2006. [2]
workloads and silicon reliability trends. In SELSE, 2009. [3] Larkhoon Leem, Hyungmin Cho, Jason Bau, Quinn A. Jacobson, and Subhasish Mitra. ERSA: Error resilient system architecture for probabilistic
[4] Xuanhua Li and Donald Yeung. Exploiting soft computing for increased fault
[5] Song Liu, Karthik Pattabiraman, Thomas Moscibroda, and Benjamin G. Zorn. Flicker: Saving refresh-power in mobile devices through critical data
[6] Sriram Narayanan, John Sartori, Rakesh Kumar, and Douglas L. Jones. Scalable stochastic processors. In DATE, 2010. [7] Vicky Wong and Mark Horowitz. Soft error resilience of probabilistic inference
[8]
Storage
AND NOR NANDLogic Algorithms
EnerJ
Flikker ASPLOS 2011
Kinds of imprecision
Relax ISCA 2010 Green PLDI 2010
A range of approximation strategies supported with a single abstraction.
Critical Non-Critical
error-sensitive error-resilient
references jump targets JPEG header pixel data neuron weights audio samples video frames
Critical Non-Critical
error-sensitive error-resilient
references jump targets JPEG header pixel data neuron weights audio samples video frames
Separate critical and non-critical program components.
A range of approximation strategies supported with a single abstraction.
Java language extension using type annotations Proposed approximate hardware Potential energy savings in existing Java programs
Java language extension using type annotations Proposed approximate hardware Potential energy savings in existing Java programs
Java language extension using type annotations Type qualifiers: @Approx
@Precise
& Endorsement Operator overloading Prevention of implicit flows Objects: qualifier polymorphism
int a = ...; int p = ...; @Approx @Precise p = a; a = p;
Type qualifiers
endorse( )
int a = expensiveCalc(); int p; @Approx @Precise p = a;
Endorsement: escape hatch
quickChecksum(p);
int a = ...; int p = ...; @Approx @Precise p + p; p + a; a + a;
+ : @Precise int, @Precise int → @Precise int + : @Approx int, @Approx int → @Approx int
Logic approximation: overloading
int a = ...; int p = ...; @Approx @Precise if ( p = 2; } a == 10) {
Control flow
int a = ...; int p = ...; @Approx @Precise if ( p = 2; } a == 10 ) { endorse( )
Control flow
float mean() { calculate mean } float[] nums = ...; class FloatSet { new @Approx FloatSet() new @Precise FloatSet() }
Objects
float mean() { calculate mean } float[] nums = ...; class FloatSet { @Context }
Objects
float mean() { calculate mean } float[] nums = ...; class FloatSet { @Context } @Approx float mean_APPROX() { take mean of first ½ } @Approx FloatSet someSet = ...; someSet.mean();
Java language extension using type annotations Proposed approximate hardware Potential energy savings in existing Java programs
Storage
AND NOR NANDLogic Algorithms
EnerJ
Hypothetical hardware
CPU
Hypothetical hardware
Memory Registers Functional Units Data Cache Lower SRAM supply voltage Lower DRAM refresh rate Reduced VDD Smaller FP mantissa
Java language extension using type annotations Proposed approximate hardware Potential energy savings in existing Java programs
0% 25% 50% 75% 100% FFT SOR MonteCarlo SMM LU ZXing jME ImageJ Raytracer
33% 34% 19% 4% 23% 14% 20% 25% 33%
Annotated declarations
SciMark2 algorithms
full application Annotations are sparse & straightforward to insert
0% 25% 50% 75% 100% FFT SOR MonteCarlo SMM LU ZXing jME ImageJ Raytracer
Base Mild Medium Aggressive
Total energy used
Saved 10%—50% of total execution energy (in simulation)
0% 25% 50% 75% 100% FFT SOR MonteCarlo SMM LU ZXing jME ImageJ Raytracer
Base Mild Medium Aggressive
Quality-of-service tradeoff: output error
“Mild” configuration is a good fit for all Some applications can tolerate more approximation
Also in the paper: Formal semantics Noninterference claim Object layout Hardware model Quality-of-service metrics
Save energy using programmer controls