mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-26 23:15:50 +00:00
Automatic engine selection
This commit is contained in:
parent
5014d74023
commit
b4458d43d7
7 changed files with 731 additions and 21 deletions
|
@ -46,6 +46,10 @@ parser.add_argument("-T", metavar="<taskname>", action="append", dest="tasknames
|
|||
help="add taskname (useful when sby file is read from stdin)")
|
||||
parser.add_argument("-E", action="store_true", dest="throw_err",
|
||||
help="throw an exception (incl stack trace) for most errors")
|
||||
parser.add_argument("--autotune", action="store_true", dest="autotune",
|
||||
help="automatically find a well performing engine and engine configuration for each task")
|
||||
parser.add_argument("--autotune-config", dest="autotune_config",
|
||||
help="read an autotune configuration file (overrides the sby file's autotune options)")
|
||||
|
||||
parser.add_argument("--yosys", metavar="<path_to_executable>",
|
||||
action=DictAction, dest="exe_paths")
|
||||
|
@ -108,6 +112,8 @@ dump_taskinfo = args.dump_taskinfo
|
|||
dump_files = args.dump_files
|
||||
reusedir = False
|
||||
setupmode = args.setupmode
|
||||
autotune = args.autotune
|
||||
autotune_config = args.autotune_config
|
||||
init_config_file = args.init_config_file
|
||||
|
||||
if sbyfile is not None:
|
||||
|
@ -462,7 +468,11 @@ def run_task(taskname):
|
|||
task.exe_paths[k] = v
|
||||
|
||||
try:
|
||||
task.run(setupmode)
|
||||
if autotune:
|
||||
import sby_autotune
|
||||
sby_autotune.SbyAutotune(task, autotune_config).run()
|
||||
else:
|
||||
task.run(setupmode)
|
||||
except SbyAbort:
|
||||
if throw_err:
|
||||
raise
|
||||
|
@ -477,7 +487,7 @@ def run_task(taskname):
|
|||
task.log(f"DONE ({task.status}, rc={task.retcode})")
|
||||
task.logfile.close()
|
||||
|
||||
if not my_opt_tmpdir and not setupmode:
|
||||
if not my_opt_tmpdir and not setupmode and not autotune:
|
||||
with open("{}/{}.xml".format(task.workdir, junit_filename), "w") as f:
|
||||
task.print_junit_result(f, junit_ts_name, junit_tc_name, junit_format_strict=False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue