Top Banner
Applying Edge Partitionin g to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor: Robert Brayton 5/16/2000
25

Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

1

Applying Edge Partitioning to SPFD’s

219B Project PresentationTrevor Meyerowitz

Mentor: Subarna SinhaProfessor: Robert Brayton

5/16/2000

Page 2: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

2

Outline of Presentation

• A Refresher on SPFD’s

• Motivation of the Program

• Example Partitioning

• Explanation of Different Algorithms

• Results

• Future Work

• Conclusion

Page 3: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

3

SPFD’s• Sets of Pairs of Functions to

be Distinguished• Can be represented as graph

– Each node represents a care value

– Missing nodes are don’t cares– Nodes with different values

have an edge between them– For Binary functions this results

in a bi-partite graph

000

010

001

100

101

111

ABC F(A,B,C)0 0 0 00 0 1 00 1 0 00 1 1 *1 0 0 11 0 1 11 1 0 *1 1 1 1

Page 4: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

4

SPFD’s• When Applied to a

multivalued function with k values, a k-partite graph results

• Sample example– Make 0’s red, 1’s green,

2’s yellow– Add edges between different

colors

000

001

100

101

110

ABC F(A,B,C)0 0 0 00 0 1 00 1 0 10 1 1 11 0 0 21 0 1 21 1 0 21 1 1 *

010 011

Page 5: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

5

Motivation• SPFD’s provide great flexibility but…

– This is a non-polynomial problem– Current implementations (bdd, sat) are slow and

memory intensive• More Heuristics are needed

• So let’s try formulating this as a graph partitioning and coloring problem– both have many heuristics, but they haven’t really

been studied together

Page 6: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

6

SPFD Partitioning

• Initial SPFD’s are propagated back to the local inputs to form their SPFD’s– This can also be viewed as taking the edges

from the main and placing them into the graphs of the local inputs

• Each edge must be propagated back to a subgraph that can distinguish between its vertices

Page 7: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

7

SPFD Partitioning

• The number of colors in each sub-graph represents complexity

• We want the minimal coloring over all of the sub-graphs

• Can’t assume k-partite topology of a graph because this is only true for the output nodes

Page 8: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

8

SPFD Partitioning ExampleABC F(A,B,C)0 0 0 00 0 1 *0 1 0 10 1 1 *1 0 0 21 0 1 1 1 1 0 *1 1 1 *

F(a,b,c)

G(a,b) H(b,c)

a b c

Primary Output F(a,b,c) has two local inputs G(a,b) and H(b,c)

000 100

010 101

Truth Table for F(A,B,C)Truth Table for F(A,B,C)

SPFD GraphSPFD Graph

Observation: If a local function doesn’t contain any distinguishing primary inputs between the vertices for the given edge, then the edge can’t be placed in the SPFD graph of that function.

Page 9: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

9

SPFD Partitioning ExampleABC F(A,B,C)0 0 0 00 0 1 *0 1 0 10 1 1 *1 0 0 21 0 1 1 1 1 0 *1 1 1 *

Truth Table for F(A,B,C)Truth Table for F(A,B,C)

000 100

010 101

SPFD GraphSPFD Graph

000 100

010 101

SPFDSPFD Graph for Graph for G(a,b)G(a,b)

000 100

010 101

SPFDSPFD Graph for Graph for H(b,c)H(b,c)

Page 10: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

10

SPFD Partitioning ExampleABC F(A,B,C)0 0 0 00 0 1 *0 1 0 10 1 1 *1 0 0 21 0 1 1 1 1 0 *1 1 1 *

Truth Table for F(A,B,C)Truth Table for F(A,B,C)

000 100

010 101

SPFD GraphSPFD Graph

000 100

010 101

SPFDSPFD Graph for Graph for G(a,b)G(a,b)

000 100

010 101

SPFDSPFD Graph for Graph for H(b,c)H(b,c)

Edge From 000 to 001. Only distinguished by A so it must be placed in G.Color graph appropiately.

Page 11: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

11

SPFD Partitioning ExampleABC F(A,B,C)0 0 0 00 0 1 *0 1 0 10 1 1 *1 0 0 21 0 1 1 1 1 0 *1 1 1 *

Truth Table for F(A,B,C)Truth Table for F(A,B,C)

000 100

010 101

SPFD GraphSPFD Graph

000 100

010 101

SPFDSPFD Graph for Graph for G(a,b)G(a,b)

000 100

010 101

SPFDSPFD Graph for Graph for H(b,c)H(b,c)

Edge From 100 to 101. Only distinguished by C so it must be placed in H.Color graph appropriately.

Page 12: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

12

SPFD Partitioning ExampleABC F(A,B,C)0 0 0 00 0 1 *0 1 0 10 1 1 *1 0 0 21 0 1 1 1 1 0 *1 1 1 *

Truth Table for F(A,B,C)Truth Table for F(A,B,C)

000 100

010 101

SPFD GraphSPFD Graph

000 100

010 101

SPFDSPFD Graph for Graph for G(a,b)G(a,b)

000 100

010 101

SPFDSPFD Graph for Graph for H(b,c)H(b,c)

Choose Edge From 000 to 010. It can go into either graph without increasing coloring. So add it to H.

Page 13: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

13

SPFD Partitioning ExampleABC F(A,B,C)0 0 0 00 0 1 *0 1 0 10 1 1 *1 0 0 21 0 1 1 1 1 0 *1 1 1 *

Truth Table for F(A,B,C)Truth Table for F(A,B,C)

000 100

010 101

SPFD GraphSPFD Graph

000 100

010 101

SPFDSPFD Graph for Graph for G(a,b)G(a,b)

000 100

010 101

SPFDSPFD Graph for Graph for H(b,c)H(b,c)

Choose Edge From 100 to 010. It can be placed in either w/o increasing coloring. So add it to G.

Page 14: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

14

SPFD Partitioning ExampleABC F(A,B,C)0 0 0 00 0 1 *0 1 0 10 1 1 *1 0 0 21 0 1 1 1 1 0 *1 1 1 *

Truth Table for F(A,B,C)Truth Table for F(A,B,C)

000 100

010 101

SPFD GraphSPFD Graph

000 100

010 101

SPFDSPFD Graph for Graph for G(a,b)G(a,b)

000 100

010 101

SPFDSPFD Graph for Graph for H(b,c)H(b,c)

Final Edge From 100 to 010. It can be placed in either w/o increasing coloring. So add it to H.

Page 15: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

15

SPFD Partitioning Example (Lessons Learned)

• With no restrictions the minimally colored partition is obtained by placing all edges into 1 sub-graph

• Edge Ordering is key to the result– Choose forced edges first– Next choose edges that don’t increase coloring– Finally place the edges that do increase

coloring

Page 16: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

16

Outline of Presentation

• A Refresher on SPFD’s

• Motivation of the Program

• Example Partitioning

• Explanation of Different Algorithms

• Results

• Future Work

• Conclusion

Page 17: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

17

The Algorithm

• The Family of Algorithms outlined here can be broken down into these groups.– Pre-processing– Edge Ordering– Edge Placement– Post-processing

Currently varied

To be varied in the future

Page 18: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

18

The Algorithm: Pre-processing• Read in initial graph data + build SPFD

graph

• Color the initial SPFD graph using favorite graph coloring heuristic (DSATUR)– This gives information about graph topology

that can be used in future steps

• Read in edge restrictions for each sub-graph and store using hash tables

Page 19: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

19

The Algorithm: Edge Ordering• One of the most important steps

• Different ordering techniques explored– Random (the control)– Vertices based on their number of edges and their

frequencies– Vertices based on their edges + colors and their

frequencies– Edge based on the colors of the 2 vertices + their

frequencies

Page 20: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

20

The Algorithm: Edge Placement

• This is the same for all algorithms• The steps are:

– Edges are traversed based on order obtained– Place all edges that have up no options– Place all edges that don’t add to the coloring of

any of the sub-graphs– Place edge(s) that increase colorings by

minimal amount. – Repeat steps until all edges are placed

Page 21: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

21

The Algorithm: Post-Processing

• Given greediness of coloring in edge placement, recolor the sub-graphs

• Then try edge swapping among different subgraphs using below techniques– breaking up maximal cliques– removing edges from minimally used colored

vertices– random annealing for ripup and recoloring

Page 22: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

22

Results

• Implementation (2 separate programs)– A program integrated into MVSIS that derives

SPFD graphs and sub-graph constraints for a given output on a network and outputs them to 2 output files

– Another program that reads in the SPFD graph and constraints and performs the partitioning to get results using the techniques previously described

Page 23: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

23

Results (output numbers)

• Due to Memory required by large graphs only trivial examples have been presented here

• Graphs with >3000 nodes can’t be generated due to O(n2) space requirements where n is the number of vertices.

• Bottom 2 examples should be executed before the week is upGraph node #pi's#fanins# colors #vertices #edges ord 0 clrsord 0 run ord 1 clrsord 1 run ord 1 clrsord 1 rundecod_40_20 n_0 5 5 5 5 10 7 <.05s 7 <.05s 7 <.05sdecod_40_20 n_1 5 5 5 5 10 6 <.05s 6 <.05s 6 <.05sdecod_40_20 n_2 5 5 5 5 10 7 <.05s 7 <.05s 7 <.05scount_40_15 n_0 10 10 5 2064 1605632 * * * * * *pcle_40_15 n_0 11 11 4 2368 1714112 * * * * * *

Ord 0 - no ordering

Ord 1 – vertex ordering

Ord 2 – edge-color ordering

Page 24: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

24

Conclusions• This is a good proof of concept• Does edge ordering matter?• This code uses way too much memory

– can only handle small examples– has some memory leaks– Is edge level partitioning too fine a grain?

• Needs to be compared with other SPFD techniques

• Probably map-able to other problems

Page 25: Applying Edge Partitioning to SPFD's 1 Applying Edge Partitioning to SPFD’s 219B Project Presentation Trevor Meyerowitz Mentor: Subarna Sinha Professor:

Applying Edge Partitioning to SPFD's

25

Future Work

• Optimization of current code to handle larger examples

• Consideration of global SPFD’s + global topology

• Benchmark vs. current SPFD code

• Explore more heuristics

• Get a better idea of runtimes/memory usage