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

[Autotuner] Improve unit test reliability 1 #2538

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions flow/test/test_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ if [ $ret -eq 0 ] && grep -q 'power:' <(echo $TARGETS); then
ret=$(( ret + $? ))
fi

# Run Autotuner CI specifically for gcd on selected platforms.
RUN_AUTOTUNER=0
case $DESIGN_NAME in
"gcd")
RUN_AUTOTUNER=1
;;
esac
case $PLATFORM in
"asap7" | "sky130hd" | "ihp-sg13g2" )
# Keep RUN_AUTOTUNER enabled only for these platforms
;;
*)
RUN_AUTOTUNER=0
;;
esac
if [[ -n "${RUN_AUTOTUNER+x}" ]] && [[ ${RUN_AUTOTUNER} -eq 1 ]]; then
# run the commands in ORFS root dir
echo "[INFO FLW-0029] Installing dependencies in virtual environment."
Expand Down
1 change: 1 addition & 0 deletions tools/AutoTuner/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ __pycache__/
# Autotuner env
autotuner_env
.env
.venv
15 changes: 15 additions & 0 deletions tools/AutoTuner/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
clearcache:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need .PHONY target, or you are in for some subtle surprises

@echo "Cleaning python cache"
@find . -type d -name __pycache__ -exec rm -r {} \+

init:
@echo "Installing python environment"
@./installer.sh

reqs:
@echo "Compiling requirements"
@rm -f requirements.txt
@.venv/bin/pip-compile --output-file=requirements.txt requirements.in

test:
@echo "Running tests"
3 changes: 2 additions & 1 deletion tools/AutoTuner/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ script_dir="$(dirname "${BASH_SOURCE[0]}")"
venv_name="autotuner_env"
python3 -m venv "$script_dir/$venv_name"
source "$script_dir/$venv_name/bin/activate"
pip3 install -U -r $script_dir/requirements.txt
pip3 cache purge
pip3 install --no-cache-dir -U -r $script_dir/requirements.txt
deactivate
12 changes: 12 additions & 0 deletions tools/AutoTuner/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ray[default,tune]==2.9.3
ax-platform>=0.3.3,<=0.3.7
hyperopt==0.2.7
optuna==3.6.0
pandas>=2.0,<=2.2.1
bayesian-optimization==1.4.0
colorama==0.4.6
tensorboard>=2.14.0,<=2.16.2
protobuf==3.20.3
SQLAlchemy==1.4.17
urllib3<=1.26.15
pip-tools==7.4.1
Loading
Loading