Skip to content

Commit 9953874

Browse files
committed
revert flowvariables diff and remove os.chdir
Signed-off-by: Jack Luar <[email protected]>
1 parent 4e8c53b commit 9953874

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/user/FlowVariables.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,4 +319,4 @@ configuration file.
319319
- [SYNTH_ARGS](#SYNTH_ARGS)
320320
- [TAP_CELL_NAME](#TAP_CELL_NAME)
321321
- [TECH_LEF](#TECH_LEF)
322-
- [USE_FILL](#USE_FILL)
322+
- [USE_FILL](#USE_FILL)

tools/AutoTuner/src/autotuner/distributed.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -366,21 +366,16 @@ def parse_tunable_variables():
366366
TODO: Tests.
367367
"""
368368
cur_path = os.path.dirname(os.path.realpath(__file__))
369-
vars_path = os.path.join(cur_path, "../../../../flow/scripts")
370-
initial_path = os.path.abspath(os.getcwd())
369+
vars_path = os.path.join(cur_path, "../../../../flow/scripts/variables.yaml")
371370

372371
# Read from variables.yaml and get variables with tunable = 1
373-
os.chdir(vars_path)
374-
with open("variables.yaml") as file:
372+
with open(vars_path) as file:
375373
try:
376374
result = yaml.safe_load(file)
377375
except yaml.YAMLError as exc:
378376
print("[ERROR TUN-0018] Error parsing variables.yaml.")
379377
sys.exit(1)
380378
variables = {key: 1 for key, value in result.items() if value.get("tunable") == 1}
381-
382-
# Return to initial path
383-
os.chdir(initial_path)
384379
return variables
385380

386381

0 commit comments

Comments
 (0)