byuccl / bfasst

Tools for FPGA Assurance Flows
Apache License 2.0
12 stars 4 forks source link

Pass -j to ninja #451

Closed jgoeders closed 2 months ago

jgoeders commented 4 months ago

The run.py should have a way to pass the '-j' argument to ninja. Sometimes you need to do a serial run...

KeenanRileyFaulkner commented 2 months ago

There should never need to be a reason to pass -j 1 to ninja because any jobs in a serial run should have a dependency (perhaps an implicit dependency using the pipe character) on the job that comes directly before it. In general, I think it's best to parallelize as much as we can by allowing ninja to default and match the number of threads it uses to the number of cores, and then use implicit dependencies in the ninja build snippets to enforce serial order of things as necessary. @jgoeders

jgoeders commented 2 months ago

Sometimes you need to serialize when collecting results. For example, when writing a paper and reporting the speed to run different passes, it's a bit nicer to collect results on a single core without the machine loaded down.