-
Notifications
You must be signed in to change notification settings - Fork 90
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
Graphs from integrated circuit design have higher than expected cuts #145
Comments
Hi @profmadden, thanks for reaching out.
This is interesting. A few things spontaneously come to my mind:
This would actually be very much appreciated. I would be really interested to find out what is going on there. It could very well be that there's a bug in KaHyPar that is triggered when partitioning weighted hypergraphs with fixed vertices. @N-Maas @kittobi1992 FYI. This is something that we should investigate. [1] https://arxiv.org/pdf/2106.08696.pdf |
Hi -- thanks for the help. I'm always doing bisection (k=2), and normally try for an imbalance of about 5%. I've put some of the graphs that fall out of my placement tool here: There's a "partbench" script that runs things.
The stand-alone partitioners for hmetis (1.5) and kahypar are run from the command line, but I'm seeing the same sort of behavior when I'm using the library interfaces. Here's the results from my runs -- hMetis consistently a bit better (but there may be a difference in how the balance constraints are being dealt with).
Thanks very much for any insight! |
Thank you very much for these examples! I'll try to look a bit into this as soon as possible. For k=2, the results might not be that surprising though. At least from what we've seen experimentally (e.g. p.194 in [1]) hMetis actually performs pretty well for bipartitioning, but the performance gets worse for k>2. I was just looking at your hMetis parameter settings in the partbench script:
If I understand these parameters correctly, you are using KaHyPar doesn't do any V-cycles by default but the number of V-cycles can be set using the While KaHyPar doesn't have a parameter comparable to |
@kittobi1992 Since MT-KaHyPar also runs in a traditional multi-level setting, a V-cycle approach like hMetis' |
Thanks -- thats some things for me to try (hope to have time in the next week or two). I'll turn on v-cycles, and I'll see if I can emulate multiple trials by calling KaHyPar multiple times (with different random seeds). During circuit placement, the partitioner will get called millions of times -- so it's hard to set a time limit that would make sense. I've used 10 runs on hMetis, because it seems to be a good "knee in the curve" for the graphs that go through the placement engine. Is there an easy way to set the random seed of a context? For consistency across runs, I try to use the same random seed, so that I can replicate a result if needed. |
Yes, you can use the |
Ah -- to be clear -- I'd like to do this from the library interface. Given a context -- is there a khcontext_set_seed(context, n) sort of call? Worst case, I can create a set of ini files with different seeds, then load a bunch of different contexts, but that seems like a bit of a kludge. |
Oh, I see. Just checked the interface again. Seems like this is indeed currently not possible. Let me see if I can add support for this over the weekend. |
Not a huge rush -- I'm buried with other stuff for a bit. Very much appreciate the help! |
Done: #147 ✅ |
Hey @profmadden , just a quick heads-up: @kittobi1992 just recently found an issue with VLSI hypergraphs from the Titan23 benchmark set and we are currently preparing a fix for that: #172 |
Hi -- I'm trying to figure out if I'm running things incorrectly, or if there's something odd with the graphs I'm feeding into KaHyPar.
My application is a recursive bisection based circuit placer -- a modern version of this:
https://dl.acm.org/doi/10.1145/981066.981084
The input graph is a net list for a circuit (with varying vertex weights -- small values for standard cells, large for macro blocks -- weight is effectively logic element physical area).
My old code uses hMetis 2.0 (on a Mac -- the 2.0 libraries were released, and are still running). I've modified my placer so that I can switch between hMetis and KaHyPar, and am finding that the results are consistently better with hMetis. My thinking is that either I'm using an incorrect "ini" file, or there's something structurally weird with my graphs that's causing trouble. The difference is about 10% higher cuts on average (and the objective function is cut).
In my application, I have a single fixed source and sink vertex (each with a weight of 1), and lots of other vertices (weights starting at 100 for small cells, and up). I'm using cut_kKaHyPar_sea20.ini, which I think would be the right fit. There are a lot of parameters, and I'm not sure which ones to try tweaking.
Any idea what's happening, or what I should do to improve performance? I can supply a variety of hgr files that illustrate what I'm seeing, if that will help.
The text was updated successfully, but these errors were encountered: