IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

18
IDEA: LSOracle A learning-based Oracle for Automatic Logic Optimization IDEA and POSH Phase I Integration Session and Demos Detroit, MI 15 July 2019 – 19 July 2019 Prof. Pierre-Emmanuel Gaillardon, Dr. Xifan Tang Scott Temple, Walter Lau, Max Austin University of Utah 1

Transcript of IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

Page 1: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

IDEA: LSOracleA learning-based Oracle for Automatic Logic

Optimization

IDEA and POSH Phase I Integration Session and DemosDetroit, MI

15 July 2019 – 19 July 2019

Prof. Pierre-Emmanuel Gaillardon, Dr. Xifan TangScott Temple, Walter Lau, Max Austin

University of Utah

1

Page 2: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

• LSOracle is available on GitHub: https://github.com/LNIS-Projects/LSOracle

2

LSOracle: OPDB Chip Bridge Demo

Page 3: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

• A typical EDA flow is comprised of a complex chain of tools• Three main steps: behavioral synthesis, logic synthesis and physical synthesis

• Synthesis is at the forefront of EDA:• Strong impact on downstream tools

3

Electronic Design Automation (EDA) Workflow

HDL Description

Behavioral Synthesis

Logic Synthesis

Physical Design

DAG representation

DAG Optimization

Technology mapping

Technology Independent Optimization

b ac

S co

AIG :7 nodes

4 levels of logic

a c b

S

MIG:3 nodes

2 levels of logic

Full Adder Representation

co

Page 4: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

• For the full adder, MIG is more compact, but what about other circuits?• Considering a dataset of 8,327 combinational circuits

• 35.7% perform better with MIG : usually arithmetic logic• 64.3% perform better with AIG : control/random logic

4

Technology Independent Logic Optimization

MIG

Complex designs have mixed logic!

Can we automatically select the best DAG representation and the best optimizationapproach for different logic blocks on the circuit?

AIG

Page 5: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

Open-source library KaHyParOpen-source library

Frugallydeep

5

Automatic learning-based logic synthesis framework

RTL Schematic

Partitioning

Circuit Classification

Logic Optimization

Partition Merging

Technology Mapping

LSOracle

AND

NAND NOR

NOT

NOT

AND

AND

OR

a

b

cd

y

z

OR

NOT x

XOR

ANDba x

y

NOTAND

ac z

MIG-based logic optimizer & technology mapper

AIG-based logic optimizer & technology mapper

XOR

ANDba

x

yNOT

ANDc z

Circuit merging…

……

……

EPFL Logic Synthesis Libraries

Page 6: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

6

LSOracle Framework: Current Status

All partitions are treated and optimized by different methods, taking advantage of different optimizers for different structures

LSOracle Flow

Partitioning

MIGAIG

Partition X

min (#nodes x logic depth)

Grader

Synchronize optimized partition

Partition X

Optimized DAG

Page 7: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

7

LSOracle Flow Example

a b c d e f

x y z

LSOracle High Effort

Partitioning

MIGAIG

Partition X

min (#nodes x logic depth)

Grader

Synchronize optimized partition

Partition X

Optimized DAG

Page 8: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

8

LSOracle Flow Example – cont’d

LSOracle High Effort

Partitioning

0 00 0

0 0 0

1

11 1

11 11

a b c d e f

x y z

Page 9: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

9

LSOracle Flow Example – cont’d

LSOracle High Effort

MIGAIG

Partition X

0 00 0

0 0 0

1

11 1

11 11

a b c d e f

x y z

AIG optimized: 7 nodes, 4 levels

MIG optimized: 5 nodes, 2 levels

Initial: 8 nodes, 4 levels

AIG optimized: 6 nodes, 2 levels

MIG optimized: 7 nodes, 2 levels

Initial: 7 nodes, 2 levels

Partition 1:

Partition 0:

Page 10: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

10

LSOracle Flow Example – cont’d

LSOracle High Effort

min (#nodes x logic depth)

Grader

0 00 0

0 0 0

1

11 1

11 11

a b c d e f

x y z

AIG optimized: 7 nodes, 4 levels MIG optimized: 5 nodes, 2 levels

Initial: 8 nodes, 4 levels

AIG optimized: 6 nodes, 2 levels MIG optimized: 7 nodes, 2 levels

Initial: 7 nodes, 2 levels

Partition 1:

Partition 0:

Page 11: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

11

LSOracle Flow Example – cont’d

LSOracle High Effort

Synchronize optimized partition

Partition X

Optimized DAG

0 00

0 0 0

1

11 1

1

a b c d e f

x y z

0

0 00

0 0

0

0

From 15 nodes and 6 levels of logic to 11 nodes and 4 levels

Page 12: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

12

• Benchmark: Chip Bridge from OPDB mapped using ASAP 7nm • 124k nodes; 7× > than PicoRV; 1000× > than the example presented in January• Runtime ~5 minutes on mobile core i5

• All optimization flows based on ABC’s resyn2 script

Integrated Flow Demo

ADP improved by ~12% Compared to AIG

PDP improved by ~10% Compared to AIG EDP improved by ~18%

Compared to AIG

Page 13: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

13

Post-tech Mapping ASIC Results

• 10 circuits from OPDB, OpenCores and EPFL• Circuits mapped using ASAP 7nm • All optimization flows based on ABC’s resyn2 script

ADP improved by ~7.3% Compared to AIG

PDP improved by ~8.17% Compared to AIG

EDP improved by ~12.9% Compared to AIG

Page 14: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

14

Improving Performance Through Partition Merging

• In Mixed Synthesis mode, partitions may

cause a loss in QoR

• Optimizing the largest regions possible is

desirable

• We have implemented a feature that

merges adjacent partitions which have

been classified as the same type

• This gives larger partitions which are less

likely to break up important functionality

MIG performance on

partitioned vs original

network, showing loss

of global optimization.

(AIG normalized to 1)

Page 15: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

15

Partition Merging

MIG

MIG

MIGAIG

AIGMIG

AIG

Before merging: Many partitionsOf similar size

After merging: Minimal numberof large partitions, while maintaining mixed synthesis approach

Page 16: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

1616

Partition Merging: LUT Tech Mapping

Fewer, larger partitions to reduce loss of global optimization

Page 17: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

• LSOracle alpha version released• Fully integrated flow• Evaluated in circuits with more than 100,000 nodes • Handles thousands of partitions

• Two main operation modes• LSOracle alpha• LSOracle developmental deep learning classifier

• Post-tech mapping results presented over 10 new circuits• ADP, PDP and EDP improved when compared to only AIG or MIG optimization

• Fork us: https://github.com/LNIS-Projects/LSOracle

17

Summary

Page 18: IDEA: LSOracle A learning-based Oracle for Automatic Logic ...

The views, opinions and/or findings expressed are those of the author and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. 18

Thank you!Q & A