vtr-verilog-to-routing
vtr-verilog-to-routing copied to clipboard
Add custom output directory for run_vtr_task and parse_vtr_task scripts
Description
Adds a -temp_dir <path>
argument to both the run_vtr_task.py
and parse_vtr_task.py
scripts, allowing the user to specify an output directory separate from the standard task directory structure in the VTR source. Without this argument specified, no change is made in the behavior of the tasks scripts.
The custom directory acts as the parent "tasks" directory for the output of a set of tasks run and parsed with this argument, and will contain [task_name]/run[00#]
directories, as well as any generated parse results.
Behavior when -temp_dir
is used in conjunction with other arguments:
-
-create_golden
creates golden results based on the latest task run at the custom path, but still outputs them togolden_results.txt
in the task's config directory, rather than at the custom path. -
-check_golden
checks the latest run results in the custom directory againstgolden_results.txt
in the task's config directory. -
-calc_geomean
generates summaries based on the latest task run in the custom directory, and placestask_summary/run[001]_summary.txt
andqor_geomean.txt
in the custom directory. -
-l
to specify a task list works as expected, organizing the run output of each listed task in the custom directory, so long as the list and the custom directory are both specified in each execution ofrun_vtr_task.py
andparse_vtr_task.py
.
Motivation and Context
Users may want to keep their task results separate from the VTR source and the built-in task configurations in their experiments, allowing for easier access and greater flexibility in where experiment data is kept.
How Has This Been Tested?
I ran the run_vtr_task.py
and parse_vtr_task.py
scripts with each of their existing arguments, then repeated with the -temp_dir
argument to ensure the output was only changed from the current behavior in the ways documented above.
For example (from $VTR_ROOT/vtr_flow/tasks
):
-
../scripts/run_vtr_task.py -temp_dir ~/Desktop/tasks_test/ regression_tests/vtr_reg_basic/basic_timing
../scripts/run_vtr_task.py -temp_dir ~/Desktop/tasks_test/ -check_golden regression_tests/vtr_reg_basic/basic_timing
../scripts/run_vtr_task.py -temp_dir ~/Desktop/tasks_test/ -create_golden regression_tests/vtr_reg_basic/basic_timing
-
../scripts/run_vtr_task.py -temp_dir ~/Desktop/tasks_test -l regression_tests/vtr_reg_basic/task_list.txt
../scripts/python_libs/vtr/parse_vtr_task.py -temp_dir ~/Desktop/tasks_test -calc_geomean -l regression_tests/vtr_reg_basic/task_list.txt
Types of changes
- [ ] Bug fix (change which fixes an issue)
- [x] New feature (change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My change requires a change to the documentation
- [x] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] All new and existing tests passed
Looks like a good change and the code looks good. Started CI.
Everything passed except the python format test.
Please use
make format-py
to fix that and push the changes and we can merge them (see the failed python formatting test for details).
@vaughnbetz This should be good to go now.