Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(write_hmetis): Enable hMetis format #354

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

wjrforcyber
Copy link
Contributor

A simple hypergraph format which has been used in LSOracle hypergraph partition process.

Constructing a hypergraph based on every edge(net) in aig context, which means every connected nodes are grouped together. Bottom-up, every node is a source, every fanout of the node is a sink, group all these together as one line. This part references LSOracle.

The official manual of this format is here, examples are in Figure 5.
Only case no-weight(Figure 5.(a)) and case weight-on-hyperedge(Figure 5.(b)) are implemented.

Example case on ctrl.aig from EPFL combinational benchmark
read_aiger ctrl.aig; strash; r2rs; r2rs; r2rs; logic; mfs2; strash; ps; write_hmetis -w show.graph
99 99 1
2 0 31
10 1 38 57 64 69 81 87 103 106 107
13 2 35 37 38 47 53 71 78 81 94 97 101 122
19 3 43 49 52 53 54 60 62 65 74 76 83 92 102 105 111 112 115 117
10 4 34 36 41 46 68 86 87 90 108
9 5 34 36 41 45 46 48 58 80
2 6 66
2 7 68
5 34 35 50 62 64
2 35 40
5 36 37 57 66 82
3 37 39 42
3 38 39 110
3 39 40 60
4 40 44 52 91
6 41 42 54 83 103 105
2 42 43
3 43 44 95
3 44 45 63
2 45 51
6 46 47 67 76 110 112
3 47 48 59
2 48 49
3 49 50 93
3 50 51 88
2 51 8
3 52 56 124
3 53 55 109
2 54 55
2 55 56
4 56 86 99 9
4 57 58 71 108
3 58 59 122
2 59 61
2 60 61
2 61 10
5 62 63 78 80 96
2 63 11
5 64 65 90 101 124
2 65 75
3 66 67 70
3 67 73 116
3 68 69 77
2 69 70
2 70 72
2 71 72
2 72 73
2 73 74
4 74 75 120 121
2 75 12
2 76 77
2 77 79
2 78 79
2 79 13
2 80 85
4 81 82 113 116
3 82 84 115
2 83 84
2 84 85
2 85 14
2 86 89
2 87 88
2 88 89
2 89 15
3 90 91 94
2 91 92
3 92 93 99
3 93 98 20
2 94 95
2 95 96
4 96 97 100 18
3 97 98 114
2 98 16
2 99 100
2 100 17
2 101 102
3 102 104 123
2 103 104
2 104 19
4 105 106 107 27
2 106 21
2 107 22
3 108 109 114
2 109 23
3 110 111 117
2 111 24
2 112 113
2 113 25
2 114 26
2 115 119
2 116 118
2 117 118
3 118 119 120
3 119 121 28
2 120 29
2 121 30
2 122 123
2 123 32
2 124 33

%This file was written by ABC on Thu Dec 26 21:05:00 2024
%For information about hMetis format, refer to https://karypis.github.io/glaros/files/sw/hmetis/manual.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant