From 1e3445971f57b49c4b6d409f560991200388aa08 Mon Sep 17 00:00:00 2001 From: luarss Date: Tue, 3 Sep 2024 19:53:15 +0800 Subject: [PATCH] update latest fixes Signed-off-by: luarss --- docker/Dockerfile.builder | 1 + flow/test/test_helper.sh | 2 +- jenkins/public_nightly.Jenkinsfile | 2 +- jenkins/public_tests_all.Jenkinsfile | 2 +- tools/AutoTuner/installer.sh | 6 ++---- tools/AutoTuner/setup.sh | 12 +++++------- tools/AutoTuner/src/autotuner/distributed.py | 2 +- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile.builder b/docker/Dockerfile.builder index 372739d305..0809e95af2 100644 --- a/docker/Dockerfile.builder +++ b/docker/Dockerfile.builder @@ -33,6 +33,7 @@ COPY --link flow/platforms flow/platforms COPY --link flow/util flow/util COPY --link flow/scripts flow/scripts COPY --link flow/designs flow/designs +COPY --link tools/AutoTuner tools/AutoTuner COPY --link --from=orfs-builder-base /OpenROAD-flow-scripts/tools/install tools/install COPY --link \ diff --git a/flow/test/test_helper.sh b/flow/test/test_helper.sh index 423d4bb87d..67fd4d1a9a 100755 --- a/flow/test/test_helper.sh +++ b/flow/test/test_helper.sh @@ -97,7 +97,7 @@ if [ $RUN_AUTOTUNER -eq 1 ]; then echo "[INFO FLW-0029] Installing dependencies in virtual environment." cd ../ ./tools/AutoTuner/installer.sh - ./tools/AutoTuner/setup.sh + . ./tools/AutoTuner/setup.sh # remove dashes PLATFORM=${PLATFORM//-/} diff --git a/jenkins/public_nightly.Jenkinsfile b/jenkins/public_nightly.Jenkinsfile index b8b29bbe6c..b5379370e3 100644 --- a/jenkins/public_nightly.Jenkinsfile +++ b/jenkins/public_nightly.Jenkinsfile @@ -1,4 +1,4 @@ -@Library('utils@orfs-v2.1.0') _ +@Library('utils@orfs-v2.1.1') _ node { diff --git a/jenkins/public_tests_all.Jenkinsfile b/jenkins/public_tests_all.Jenkinsfile index 3a99aec191..214e8e6c62 100644 --- a/jenkins/public_tests_all.Jenkinsfile +++ b/jenkins/public_tests_all.Jenkinsfile @@ -1,4 +1,4 @@ -@Library('utils@orfs-v2.1.0') _ +@Library('utils@orfs-v2.1.1') _ node { diff --git a/tools/AutoTuner/installer.sh b/tools/AutoTuner/installer.sh index 7c2944749e..8e171bcbf6 100755 --- a/tools/AutoTuner/installer.sh +++ b/tools/AutoTuner/installer.sh @@ -1,14 +1,12 @@ #!/usr/bin/env bash -echo "Installing AutoTuner..." - # Get the directory where the script is located script_dir="$(dirname "${BASH_SOURCE[0]}")" -cd $script_dir # Define the virtual environment name venv_name="autotuner_env" +required_version="3" python${required_version} -m venv "$script_dir/$venv_name" source "$script_dir/$venv_name/bin/activate" -pip3 install -U -r requirements.txt +pip3 install -U -r $script_dir/requirements.txt deactivate diff --git a/tools/AutoTuner/setup.sh b/tools/AutoTuner/setup.sh index 2679ab6337..1dc969d995 100755 --- a/tools/AutoTuner/setup.sh +++ b/tools/AutoTuner/setup.sh @@ -1,18 +1,16 @@ #!/usr/bin/env bash -echo "Setting up AutoTuner..." - # Get the directory of the current script -SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")" +script_dir="$(dirname "${BASH_SOURCE[0]}")" # Check if the activation script exists -VENV_PATH="$SCRIPT_DIR/autotuner_env/bin/activate" -if [ ! -f "$VENV_PATH" ]; then - echo "Error: Virtual environment activation script not found at $VENV_PATH" +venv_path="$script_dir/autotuner_env/bin/activate" +if [ ! -f "$venv_path" ]; then + echo "Error: Virtual environment activation script not found at $venv_path" echo "Please run installer.sh for installing the packages." exit 1 fi # Source the activation script to activate the virtual environment -source "$VENV_PATH" +source "$venv_path" echo "Virtual environment activated successfully." diff --git a/tools/AutoTuner/src/autotuner/distributed.py b/tools/AutoTuner/src/autotuner/distributed.py index c6ed57eab6..80caf13a3e 100644 --- a/tools/AutoTuner/src/autotuner/distributed.py +++ b/tools/AutoTuner/src/autotuner/distributed.py @@ -526,7 +526,7 @@ def openroad(base_dir, parameters, flow_variant, path=""): log_path = report_path = os.getcwd() + "/" export_command = f"export PATH={INSTALL_PATH}/OpenROAD/bin" - export_command += f":{INSTALL_PATH}/yosys/bin" + export_command += f":{INSTALL_PATH}/yosys/bin:$PATH" export_command += " && " make_command = export_command