approximate data types for safe and general low-power
TRANSCRIPT
EnerJApproximate Data Typesfor Safe and GeneralLow-Power ComputationAdrian SampsonWerner DietlEmily FortunaDanushen GnanapragasamLuis CezeDan Grossman
sa paPLDI 2011University of Washington
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 Hoffmann. Using code perforation to improve performance, reduce energy 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]
M. de Kruijf and K. Sankaralingam. Exploring the synergy of emerging 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 applications. In DATE, 2010.
[4]
Xuanhua Li and Donald Yeung. Exploiting soft computing for increased fault tolerance. In ASGI, 2006.
[5]
Song Liu, Karthik Pattabiraman, Thomas Moscibroda, and Benjamin G. Zorn. Flicker: Saving refresh-power in mobile devices through critical data partitioning. Technical Report MSR-TR-2009-138, Microsoft Research, 2009.
[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 applications. In SELSE, 2006.
[8]
StorageAND
NOR
NAND
Logic Algorithms
λ
EnerJ
FlikkerASPLOS 2011
Kinds of imprecision
RelaxISCA 2010
GreenPLDI 2010
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
SafetySeparate critical and non-criticalprogram components.
GeneralityA range of approximation strategiessupported with a single abstraction.
Java language extensionusing type annotations
Proposed approximate hardware
Potential energy savingsin existing Java programs
Java language extensionusing type annotations
Proposed approximate hardware
Potential energy savingsin existing Java programs
Java language extensionusing type annotations
Type qualifiers: @Approx @Precise&
Endorsement
Operator overloading
Prevention of implicit flows
Objects: qualifier polymorphism
endorse( )✓✗
int a = expensiveCalc();
int p;
@Approx
@Precise
p = a;
Endorsement: escape hatch
quickChecksum(p);
output(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
float mean() { calculate mean }
float[] nums = ...;class FloatSet {
new @Approx FloatSet()
new @Precise FloatSet()
}
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 extensionusing type annotations
Proposed approximate hardware
Potential energy savingsin existing Java programs
CPU
Hypothetical hardware
Memory
Registers Functional Units
Data Cache
Lower SRAM supply voltageLower DRAM refresh rate
Reduced VDD
Smaller FP mantissa
Java language extensionusing type annotations
Proposed approximate hardware
Potential energy savingsin 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 other kernelsfull 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