Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom output directory for run_vtr_task and parse_vtr_task scripts #2153

Merged
merged 15 commits into from Nov 15, 2022

Conversation

benbroce
Copy link
Contributor

@benbroce benbroce commented Sep 7, 2022

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 to golden_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 against golden_results.txt in the task's config directory.
  • -calc_geomean generates summaries based on the latest task run in the custom directory, and places task_summary/run[001]_summary.txt and qor_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 of run_vtr_task.py and parse_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):

  1. ../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

  2. ../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)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@vaughnbetz
Copy link
Contributor

Looks like a good change and the code looks good. Started CI.

@vaughnbetz
Copy link
Contributor

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).

Signed-off-by: Jeff Goeders <jeff.goeders@gmail.com>
Signed-off-by: Jeff Goeders <jeff.goeders@gmail.com>
Signed-off-by: Jeff Goeders <jeff.goeders@gmail.com>
@jgoeders
Copy link
Contributor

@vaughnbetz This should be good to go now.

@vaughnbetz vaughnbetz merged commit 9d97e94 into verilog-to-routing:master Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants