File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
tools/AutoTuner/src/autotuner Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,13 @@ def parse_arguments():
380380 default = 42 ,
381381 help = "Random seed. (0 means no seed.)" ,
382382 )
383+ tune_parser .add_argument (
384+ "--memory_limit" ,
385+ type = float ,
386+ metavar = "<float>" ,
387+ default = 1 ,
388+ help = "Maximum memory in GB that each trial job can use, process will be killed and not retried if it exceeds." ,
389+ )
383390
384391 # Workload
385392 parser .add_argument (
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ def openroad(
324324 export_command += " && "
325325
326326 make_command = export_command
327- make_command += f"make -C { base_dir } /flow DESIGN_CONFIG=designs/"
327+ make_command += f"ulimit -v { args . memory_limit * 1_000_000 } ; make -C { base_dir } /flow DESIGN_CONFIG=designs/"
328328 make_command += f"{ args .platform } /{ args .design } /config.mk"
329329 make_command += f" PLATFORM={ args .platform } "
330330 make_command += f" FLOW_VARIANT={ flow_variant } { parameters } "
You can’t perform that action at this time.
0 commit comments