Skip to content

Commit def4f74

Browse files
authored
Merge pull request #3051 from luarss/topic/refactor-utils
[AutoTuner] Refactor: shift scripts out of utils folder
2 parents 0921dfe + ae1698a commit def4f74

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

flow/test/test_autotuner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ echo "Running Autotuner plotting smoke test"
4141
all_experiments=$(ls -d ./flow/logs/${PLATFORM}/${DESIGN_NAME}/smoke-test-tune*)
4242
all_experiments=$(basename -a $all_experiments)
4343
for expt in $all_experiments; do
44-
python3 tools/AutoTuner/src/autotuner/utils/plot.py \
44+
python3 tools/AutoTuner/scripts/plot.py \
4545
--platform ${PLATFORM} \
4646
--design ${DESIGN_NAME} \
4747
--experiment $expt

tools/AutoTuner/src/autotuner/utils/plot.py renamed to tools/AutoTuner/scripts/plot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
METRIC = "metric"
5151

5252
cur_dir = os.path.dirname(os.path.abspath(__file__))
53-
root_dir = os.path.join(cur_dir, "../../../../../")
53+
root_dir = os.path.join(cur_dir, "../../../")
5454
os.chdir(root_dir)
5555

5656

@@ -91,6 +91,8 @@ def load_dir(dir: str) -> pd.DataFrame:
9191
params.append(_dict)
9292
except Exception as e:
9393
failed.append(metrics_fname)
94+
print("Failed to load", metrics_fname)
95+
print(e)
9496
continue
9597

9698
# Merge all dataframe

tools/AutoTuner/src/autotuner/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def openroad(
332332
stdout_file=os.path.join(log_path, "make-finish-stdout.log"),
333333
)
334334

335-
metrics_file = os.path.abspath(os.path.join(report_path, "metrics.json"))
335+
metrics_file = os.path.abspath(os.path.join(log_path, "metrics.json"))
336336
metrics_command = export_command
337337
metrics_command += f"{base_dir}/flow/util/genMetrics.py -x"
338338
metrics_command += f" -v {flow_variant}"

0 commit comments

Comments
 (0)