Skip to content

Commit

Permalink
revert flowvariables diff and remove os.chdir
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Luar <[email protected]>
  • Loading branch information
luarss committed Oct 19, 2024
1 parent 7643a60 commit d93180d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,4 +319,4 @@ configuration file.
- [SYNTH_ARGS](#SYNTH_ARGS)
- [TAP_CELL_NAME](#TAP_CELL_NAME)
- [TECH_LEF](#TECH_LEF)
- [USE_FILL](#USE_FILL)
- [USE_FILL](#USE_FILL)
9 changes: 2 additions & 7 deletions tools/AutoTuner/src/autotuner/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,21 +367,16 @@ def parse_tunable_variables():
TODO: Tests.
"""
cur_path = os.path.dirname(os.path.realpath(__file__))
vars_path = os.path.join(cur_path, "../../../../flow/scripts")
initial_path = os.path.abspath(os.getcwd())
vars_path = os.path.join(cur_path, "../../../../flow/scripts/variables.yaml")

# Read from variables.yaml and get variables with tunable = 1
os.chdir(vars_path)
with open("variables.yaml") as file:
with open(vars_path) as file:
try:
result = yaml.safe_load(file)
except yaml.YAMLError as exc:
print("[ERROR TUN-0018] Error parsing variables.yaml.")
sys.exit(1)
variables = {key: 1 for key, value in result.items() if value.get("tunable") == 1}

# Return to initial path
os.chdir(initial_path)
return variables


Expand Down

0 comments on commit d93180d

Please sign in to comment.