Skip to content

Commit

Permalink
Support regioning option when creating dreamplace params.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 667195280
Change-Id: I2078d08d34ce36519a5f875ebb5061ffd27ec268
  • Loading branch information
joewjiang authored and copybara-github committed Aug 24, 2024
1 parent 4817675 commit 73586a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions circuit_training/dreamplace/dreamplace_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def get_dreamplace_params(
routability_opt_flag: bool = False,
num_threads: int = 8,
deterministic_flag: bool = False,
regioning: bool = False,
):
"""Returns the parameters to config Dreamplace."""
params = Params.Params()
Expand Down Expand Up @@ -129,8 +130,7 @@ def get_dreamplace_params(
params.gpu = gpu
params.result_dir = result_dir
params.stop_overflow = stop_overflow
# disable fence region feature
params.regioning = False
params.regioning = regioning

# routability optimization flags:
params.routability_opt_flag = routability_opt_flag
Expand Down
5 changes: 4 additions & 1 deletion circuit_training/environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,17 @@ def macro_names(self) -> list[str]:
return [self._plc.get_node_name(m) for m in macro_ids]

def create_dreamplace(
self, dp_target_density: float,
self,
dp_target_density: float,
regioning: bool = False,
) -> dreamplace_core.SoftMacroPlacer:
"""Creates the SoftMacroPlacer."""
canvas_width, canvas_height = self._plc.get_canvas_width_height()
dreamplace_params = dreamplace_util.get_dreamplace_params(
target_density=dp_target_density,
canvas_width=canvas_width,
canvas_height=canvas_height,
regioning=regioning,
)
# Dreamplace requires that movable nodes appear first
# and then fixed nodes.
Expand Down

0 comments on commit 73586a3

Please sign in to comment.