How feasible would it be to parallelize some steps...
# general
g
How feasible would it be to parallelize some steps in hardening or run-precheck? Right now my timings are like this: verify-rtl: 11s make user_proj_example: 35m 44 steps make user_project_wrapper: 27m 31 steps make run-precheck: 48m 16 steps I have a 12-core machine here and most of them are idle while doing the last three steps. Are all steps dependent on each other? And how feasible would it be to convert it to a dependency-based workflow (like with a Makefile in software projects)?
a
From what I’ve learned and observed, I think most of the (time-consuming) steps need to be done sequentially. I would suppose if you had multiple designs to harden, you could do each in parallel, but user_project_wrapper really needs all others to be done first. I haven’t tried doing parallel hardens in the same repo before… I suspect it could work. Maybe RAM would get too tight depending on the complexity of designs
I’ve got a project with 7 designs… maybe I’ll give it a try
Well that actually worked pretty well. All 7 hardened in parallel flows, within 20 minutes, when in series they take at least 40 minutes
👍 2
…and then UPW at the end
m
@Gon Solo some of the prechecks could be run in parallel, I think. The drc and extraction are independent.
g
Ok. I was asking because it is frustrating when you run the prechecks for 40 minutes, just to get an error message about some setup violations from the 44th and last check.
m
You can run them separately, I think. You might have to tweak the
Makefile
.
g
Ok. Is there any documentation on dependencies between precheck tests? Or is it ok to run them all in parallel as they only depend on "make user_proj_example" and "make user_project_wrapper"? What I'd like to do is change something under verilog/rtl and maybe verilog/dv/cocotb and run just the necessary steps. Is "make user_proj_example", "make user_project_wrapper" and e.g. a hypothetical "make lvs check" possible?
m
@Marwan Abbas ^^
m
It is not always feasible to harden designs in parallel, or run precheck in parallel. Some designs are bigger than others, and these designs require more computing power. Also, most of the flow is multithreaded in parts where it can be multithreaded, for example in detailed routing in openlane, it is multithreaded. You can run the checks without the makefile at all, which gives you total freedom of what checks to run, you can find the documentation here https://github.com/efabless/mpw_precheck/blob/main/README.md
👍 1
a
Thanks for that additional information Marwan. That will come in handy 🙂 And yes, @Gon Solo, run parallel hardens at your own discretion (i.e. be sure to monitor what RAM is required for each independent design before trying to make them compete for resources), and note that (of course) if a harden relies on other macros (as is the case for
user_project_wrapper
), then save that to run on its own.
As an aside, I was regularly relying on, and measurably benefiting from, multithreading for (say) detailed routing. This was when using a Dec 2022 version of OpenLane 1. However, at some point after switching to an Oct 2023 version, I noticed that it ceased being multithreaded for me, ignoring whatever my
ROUTING_CORES
was set to. I haven't yet looked further into it, and there is every possibility it's an issue with my own environment, but I will try to do more testing and see if I can narrow it down...