Skip to content

Commit 610aab7

Browse files
oharboeclaude
andcommitted
build: use NUM_CPUS from detect_cpus for parallel synth partitions
Replace hardcoded partition count with NUM_CPUS detected at workspace setup. Designs with SYNTH_HIERARCHICAL=1 automatically get parallel synthesis with one partition per CPU core. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 5f3de15 commit 610aab7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bazel/orfs.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Macro to create orfs_flow() targets from parsed config.mk data."""
22

3-
load("@bazel-orfs//:openroad.bzl", "orfs_flow")
3+
load("@bazel-orfs//:openroad.bzl", "NUM_CPUS", "orfs_flow")
44
load("@orfs_designs//:designs.bzl", "DESIGNS")
55

66
def _convert_sources(sources, pkg):
@@ -162,6 +162,7 @@ def orfs_design(platform = None, design = None):
162162
extra_data.append("//" + inc_dir + ":include")
163163

164164
# Real flow — uses Docker image with real OpenROAD/Yosys
165+
parallel = NUM_CPUS if config["arguments"].get("SYNTH_HIERARCHICAL") == "1" else 0
165166
orfs_flow(
166167
name = name,
167168
verilog_files = verilog_files,
@@ -171,6 +172,7 @@ def orfs_design(platform = None, design = None):
171172
macros = macros if macros else [],
172173
stage_data = {"synth": extra_data} if extra_data else {},
173174
tags = tags,
175+
parallel_synth = parallel,
174176
)
175177

176178
# Lint flow — fast validation with mock-openroad

0 commit comments

Comments
 (0)