File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
tools/AutoTuner/src/autotuner Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,13 @@ def parse_arguments():
396396 default = 16 ,
397397 help = "Max number of threads openroad can use." ,
398398 )
399+ parser .add_argument (
400+ "--memory_limit" ,
401+ type = float ,
402+ metavar = "<float>" ,
403+ default = None ,
404+ help = "Maximum memory in GB that each trial job can use, process will be killed and not retried if it exceeds." ,
405+ )
399406 parser .add_argument (
400407 "--server" ,
401408 type = str ,
Original file line number Diff line number Diff line change @@ -324,6 +324,9 @@ def openroad(
324324 export_command += " && "
325325
326326 make_command = export_command
327+ if args .memory_limit is not None :
328+ limit = int (args .memory_limit * 1_000_000 )
329+ make_command += f"ulimit -v { limit } ; "
327330 make_command += f"make -C { base_dir } /flow DESIGN_CONFIG=designs/"
328331 make_command += f"{ args .platform } /{ args .design } /config.mk"
329332 make_command += f" PLATFORM={ args .platform } "
You can’t perform that action at this time.
0 commit comments