Merge branch 'master' into micro_benchmark

This commit is contained in:
tangxifan 2021-06-22 14:29:29 -06:00 committed by GitHub
commit 4421dfcbbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 2 deletions

View File

@ -302,6 +302,13 @@ def generate_each_task_actions(taskname):
benchmark_list.append(CurrBenchPara)
# Count the number of duplicated top module name among benchmark
# This is required as flow run directory names for these benchmarks are different than others
# which are uniquified
benchmark_top_module_count = []
for bench in benchmark_list:
benchmark_top_module_count.append(bench["top_module"])
# Create OpenFPGA flow run commnad for each combination of
# architecture, benchmark and parameters
# Create run_job object [arch, bench, run_dir, commnad]
@ -309,7 +316,11 @@ def generate_each_task_actions(taskname):
for indx, arch in enumerate(archfile_list):
for bench in benchmark_list:
for lbl, param in bench["script_params"].items():
flow_run_dir = get_flow_rundir(arch, bench["top_module"], lbl)
if (benchmark_top_module_count.count(bench["top_module"]) > 1):
flow_run_dir = get_flow_rundir(arch, "bench" + str(benchmark_list.index(bench)) + "_" + bench["top_module"], lbl)
else:
flow_run_dir = get_flow_rundir(arch, bench["top_module"], lbl)
command = create_run_command(
curr_job_dir=flow_run_dir,
archfile=arch,
@ -330,7 +341,8 @@ def generate_each_task_actions(taskname):
logger.info('Created total %d jobs' % len(flow_run_cmd_list))
return flow_run_cmd_list
# Make the directory name unique by including the benchmark index in the list.
# This is because benchmarks may share the same top module names
def get_flow_rundir(arch, top_module, flow_params=None):
path = [
os.path.basename(arch).replace(".xml", ""),