Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Dynamic BDD Reordering

Similar presentations


Presentation on theme: "Distributed Dynamic BDD Reordering"— Presentation transcript:

1 Distributed Dynamic BDD Reordering
Ziv Nevo IBM Haifa Research Lab Haifa, Israel Monica Farkash IBM Systems Group Austin, Texas

2 Outline BDDs BDD Reordering Rudell’s Sifting Algorithm
Empirical Observations Distributed Dynamic BDD Reordering Experimental Results Conclusions

3 BDDs (Bryant, 1986) Data structure for efficiently storing and manipulating Boolean functions Widely used in EDA tools Model checkers Synthesizers Optimizers More … BDDs were somewhat replaced by SAT-based techniques. Yet, BDDs are still dominant in some application

4 BDDs (a & b & c) | (c & d) A (reduced ordered) BDD is a layered acyclic directed graph Each BDD node is labeled with a Boolean variable Variables are encountered at most once and in the same order on every path from root to a leaf BDD nodes with the same label are therefore layered in levels a b c c d 1

5 BDD Reordering BDD size (number of nodes) is highly sensitive to the selected variable order; sizes may vary from linear to exponential BDD-based applications should therefore carefully choose an initial BDD order to start with In addition, BDD-based applications usually change their set of represented functions on-the-fly It is therefore wise to switch orders from time to time – Dynamic BDD Reordering

6 BDD Reordering But … Finding the best BDD order is NP-complete
Heuristics are therefore required

7 BDD Reordering Many heuristics for producing a good initial BDD order
One popular algorithm for dynamic BDD reordering – Rudell’s sifting algorithm (Rudell, 1993) Rudell’s sifting algorithm utilizes many (efficient) exchanges of adjacent variables

8 Rudell’s Sifting Algorithm
While there are unselected variables Select an unselected variable with the maximal number of nodes Exchange the selected variable with its predecessor until it becomes the first variable in the ordering Exchange the selected variable with its successor until it becomes the last variable in the ordering Exchange the selected variable with its predecessor until it comes back to the position where BDD size was minimal

9 Rudell’s Sifting Algorithm
While there are unselected variables Select a variable Search up Search down Bring to an optimal place

10 Optimizations to Rudell’s Algorithm
Search towards closest end first Set an upper limit on BDD size during search Group sifting (Panda and Somezni, 1995) Block restricted sifting (Meinel and Slobodova, 1997) Sampling methods (Slobodova and Meinel, 1998) Lower bounds (Drechsler and Gunther, 2001; Ebendt and Drechsler, 2005)

11 Rudell’s Sifting Algorithm
Yet, some applications spend nearly half their runtime doing dynamic BDD reordering

12 Empirical Observations
We analyzed a selection of reordering session (BDDs with 106 – 107 nodes) using Rudell’s algorithm Only about a third of the variables relocate 1%-6% of the variables account for 70% of the total gain in BDD nodes

13 Empirical Observations - Conclusions
Rudell’s sifting algorithm performs many best-place searches that have no (or negligible) effect It is hard to predict whether a specific best-place search will bring significant results We can however, perform these searches in parallel Futile searches do not induce a change in the common data structures Since many searches are futile, synchronization efforts are minimal

14 Distributed Dynamic BDD Reordering
A Master-Slaves design Master broadcasts the BDD to all slaves, then distributes search tasks to slaves Each search task involves finding a better place for a single variable Slaves report back to master their search results: best place and gain in BDD size Master moves variables according to search results

15 Distributed Dynamic BDD Reordering
Master Slave1 Slave2

16 Distributed Dynamic BDD Reordering
Master Slave1 Slave2 And so on…

17 Distributed Reordering - Properties
Slaves never put variables back in place Slaves can be allocated per reordering session Slaves can be easily added or dropped on-the-fly Most optimizations to Rudell’s algorithm may be applied Master may decide to consider only significant gains Master may split “Search up” task from “Search down” task

18 Synchronization Modes
Synchronous mode – Master waits for answers from all slaves, applies search results, then provides slaves with new tasks Continuous mode – Master provides jobs to slaves as soon as they becomes idle. Only when a slave reports a significant gain, master holds job allocation and waits for answers from all slaves

19 Merging Slave Results Two non-intersecting relocations provide independent gains Master may therefore apply more than one relocation on each iteration Master may be greedy – apply best-gain relocation first

20 Experimental Results - Setting
We implemented distributed reordering within the BDD-based model-checking engines of the formal- verification tool, RuleBase PE We used five 2.4GHz Intel Xeon machines with 2GB RAM each Machines are connected using a 1GBit Ethernet We applied upper bound, closest end and lower bounds optimizations A topological sort determined initial BDD order

21 Experimental Results – Reorder Time
Using 4 slaves Continuous merging time is 23.4% on average

22 Experimental Results – Total MC Time
Using 4 slaves Continuous merging time is 47.2% on average

23 Experimental Results - Scalability
Average speedup grows by ~0.2 per additional slave

24 Conclusions Rudell’s sifting algorithm tends to leave many BDD variables in place Lots of computations have no (or negligible) effect, and thus can be easily parallelized Our distributed version of Rudell’s algorithm speeds- up reordering by a factor of 4 using 4 slaves No significant deterioration in resulting order quality Many (possibly better) ways to merge slave results


Download ppt "Distributed Dynamic BDD Reordering"

Similar presentations


Ads by Google