Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tools/AutoTuner/src/autotuner/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,13 @@ def parse_arguments():
default=16,
help="Max number of threads openroad can use.",
)
parser.add_argument(
"--memory_limit",
type=float,
metavar="<float>",
default=None,
help="Maximum memory in GB that each trial job can use, process will be killed and not retried if it exceeds.",
)
parser.add_argument(
"--server",
type=str,
Expand Down
3 changes: 3 additions & 0 deletions tools/AutoTuner/src/autotuner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ def openroad(
export_command += " && "

make_command = export_command
if args.memory_limit is not None:
limit = int(args.memory_limit * 1_000_000)
make_command += f"ulimit -v {limit}; "
make_command += f"make -C {base_dir}/flow DESIGN_CONFIG=designs/"
make_command += f"{args.platform}/{args.design}/config.mk"
make_command += f" PLATFORM={args.platform}"
Expand Down