Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology...

31
Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab rgia Institute of Technology University of Minnesota UC San Amir Yazdanbakhsh Divya Mahajan Bradley Thwaites Jongse Park Anandhavel Nagendrakumar Sindhuja Sethuraman Kartik Ramkrishnan Nishanthi Ravindran Rudra Jariwala Abbas Rahimi Hadi Esmaeilzadeh Kia Bazargan

Transcript of Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology...

Page 1: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

Axilog: Language Support for Approximate Hardware Design

DATE 2015

Georgia Institute of TechnologyAlternative Computing Technologies (ACT) Lab

Georgia Institute of Technology University of Minnesota UC San Diego

Amir Yazdanbakhsh Divya Mahajan Bradley ThwaitesJongse Park Anandhavel Nagendrakumar Sindhuja Sethuraman

Kartik Ramkrishnan Nishanthi Ravindran Rudra JariwalaAbbas Rahimi Hadi Esmaeilzadeh Kia Bazargan

Page 2: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

2

Approximate computingEmbracing error

• Relax the abstraction of near-perfect accuracy in general-purpose computing/communication/storage

• Allow errors to happen during computation/communication/storage– Improve resource utilization efficiency

• Energy, bandwidth, capacity, …

– Improve performance• Build acceptable systems from intentionally-made

unreliable software and hardware components• Avoid overkill and worst-case design

Page 3: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

3

Avoiding Worst-Case DesignApproximate Computing

Generality

PrecisionReliability

Determinism

Effici

ency

Perf

orm

ance

CostCost Physical Device

Circuit

Architecutre

Compiler

Programming Language

Application

Microarchitecture

Page 4: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

4

Goals

Design the first HDL for1) Approximate Hw

Design2) Approximate Hw

Reuse3) Approximate

Synthesis

Criteria

Approximate HDL shall be1) High-level2) Automated3) Backward compatible

Page 5: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

5

Safety in Hardware

Controller DatapathClock

Precise

Approximate

Precise

Page 6: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

Axilog Annotations

6

Design Annotations

relax(relax_local)

restrict(restrict_global)

Reuse Annotations

approximate bridgecritical

Page 7: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

7

Design Annotations

Page 8: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

8

Relaxing Accuracy Requirementsmodule ripple_carry_adder(a, b, c_in, c_out, s)…

full_adder f0(a[0], b[0], c_in, w0, s[0])full_adder f1(a[1], b[1], w0, c_out, s[1])relax (s);

Page 9: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

9

Relaxing Accuracy Requirementsmodule ripple_carry_adder(a, b, c_in, c_out, s)…

full_adder f0(a[0], b[0], c_in, w0, s[0])full_adder f1(a[1], b[1], w0, c_out, s[1])relax (s);

Page 10: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

10

Scoping Approximation (relax_local)module full_adder

(a, b, c_in, c_out, s) …

relax_local (s);…

…full_adder f0 (…)full_adder f1(…)relax (s[0]);

Page 11: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

11

Scoping Approximation (relax_local)module full_adder

(a, b, c_in, c_out, s) …

relax_local (s);…

…full_adder f0 (…)full_adder f1(…)relax (s[0]);

Page 12: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

12

Restricting Approximation

Page 13: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

13

Restricting Approximation

Page 14: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

14

Restricting Approximation

Page 15: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

15

Restricting Approximation Globallymodule full_adder(a, b, c_in, c_out, s);

…approximate output s;relax (s);…

endmodule…restrict_global(s[31:0]);

Page 16: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

16

Restricting Approximation Globallymodule full_adder(a, b, c_in, c_out, s);

…approximate output s;relax (s);…

endmodule…restrict_global(s[31:0]);

Page 17: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

17

Reuse Annotations

Page 18: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

18

Outputs Carrying Approximate Semantics

Page 19: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

19

Critical Inputs…critical input reset;critical input clock;…

Next StateLogic

StateRegister

reset

clock

OutputLogic

Page 20: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

20

Bridging Approximate Wires to Critical Inputs …

and a1(s, a0, a1);relax (s);bridge (s);multiplexer m0(s, a0, a1,

out); …

Page 21: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

21

Bridging Approximate Wires to Critical Inputs …

and a1(s, a0, a1);relax (s);bridge (s);multiplexer m0(s, a0, a1,

out); …

Page 22: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

Baseline Synthesis Flow

Highest frequency with minimum power and area22

Page 23: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

23

Relaxability Inference Analysis

Identify the wires which are driving unannotated wires or annotated with restrict within the module under

analysis

Marks any wire that affects a globally restricted wire as precise

Identify the relaxed outputs of the instantiated submodules

Safe to approximate gates

Circuit under analysis with Axilog annotations

Page 24: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

24

Approximate Synthesis Flow

Axilog Code

AxilogCompiler

Safe toApproximate

Gates

Page 25: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

25

Measurements

Tools for Synthesis and Energy Analysis

• Synopsys Design Compiler• Synopsys Primetime

Timing Simulation with SDF back annotations

• Cadence NC-Verilog

Standard Cell Library

• TSMC 45-nm multi-Vt• Slowest PVT corner (SS, 0.81V, 0C) for baseline results

Page 26: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

FIR# lines: 113

Signal Processing

# AnnotationsDesign: 6Reuse: 5

InverseK# lines: 22,407

Robotics

# AnnotationsDesign: 8Reuse: 4

ForwardK# lines: 18,282

Robotics

# AnnotationsDesign: 5Reuse: 4

K-means# lines: 10,985Machine Learning

# AnnotationsDesign: 7Reuse: 3

Brent-Kung# lines: 352

Arithmetic Computation

# AnnotationsDesign: 1Reuse: 1

26

BenchmarksArithmetic Computation, Signal Processing, Robotics, Machine Learning, Image Processing

Kogge-Stone# lines: 353

Arithmetic Computation

# AnnotationsDesign: 1Reuse: 1

Wallace Tree# lines: 13,928

Arithmetic Computation

# AnnotationsDesign: 5Reuse: 3

Neural Network# lines: 21,053Machine Learning

# AnnotationsDesign: 4Reuse: 3

Sobel# lines: 143

Image Processing

# AnnotationsDesign: 6Reuse: 3

Page 27: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

27

Energy Reduction

Brent

-Kun

gFI

R

Forw

ardK

Inve

rseK

K-mea

ns

Kogge

-Sto

ne

Wal

lace

Tre

e

Neu

ral

Sobe

l

Geom

ean

1.0

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

2.0

En

erg

y R

ed

ucti

on

Error ≤ 10%Error ≤ 5%

Page 28: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

28

Area Reduction

Brent

-Kun

gFI

R

Forw

ardK

Inve

rseK

K-mea

ns

Kogge

-Sto

ne

Wal

lace

Tre

e

Neu

ral

Sobe

l

Geom

ean

1.0

1.2

1.4

1.6

1.8

2.0

2.2

2.4

2.6

Are

a R

ed

ucti

on

Error ≤ 10%Error ≤ 5%

Page 29: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

29

10% Quality loss is nearly indiscernible to the eye Yet provides 57% energy savings

0% Quality Loss 5% Quality Loss 10% Quality Loss

Output Quality Degradation in Sobel

Page 30: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

30

Energy Reduction for Different PVT Corners

Brent-K

ungFIR

Forwar

dK

Inve

rseK

K-mea

ns

Kogge-Sto

ne

Wal

lace

Tre

e

Neura

l

Sobel

Geom

ean

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

En

erg

y R

ed

ucti

on

(SS, 0.81V, 125°C)(SS, 0.81V, 0°C)

Page 31: Axilog: Language Support for Approximate Hardware Design DATE 2015 Georgia Institute of Technology Alternative Computing Technologies (ACT) Lab Georgia.

31

Axilog

54%

EnergySavings

1.9×

AreaReduction

2-12

CodeAnnotations

First HDL for Approximation• Design• Reuse• Automation• High-level• Backward-compatibility

http://www.act-lab.org/artifacts/axilog