diff --git a/.github/workflows/userbenchmark-a100-release.yml b/.github/workflows/userbenchmark-a100-release.yml index 42f47b7bab..1c19a8ba41 100644 --- a/.github/workflows/userbenchmark-a100-release.yml +++ b/.github/workflows/userbenchmark-a100-release.yml @@ -3,6 +3,7 @@ on: pull_request: paths: - userbenchmark/release-test/* + - .github/workflows/userbenchmark-a100-release.yml jobs: run-userbenchmark: @@ -13,43 +14,39 @@ jobs: BASE_CONDA_ENV: "torchbench" CONDA_ENV: "userbenchmark-a100" PLATFORM_NAME: "gcp_a100" - SETUP_SCRIPT: "/workspace/setup_instance.sh" steps: - name: Checkout TorchBench uses: actions/checkout@v3 with: - path: benchmark ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - - name: Clone and setup conda env + - name: Install Conda run: | - CONDA_ENV=${BASE_CONDA_ENV} . "${SETUP_SCRIPT}" - conda create --name "${CONDA_ENV}" --clone "${BASE_CONDA_ENV}" + bash ./.ci/torchbench/install-conda.sh - name: Install TorchBench run: | - set -x - . "${SETUP_SCRIPT}" - pushd benchmark - python install.py + bash ./.ci/torchbench/install.sh - name: Run user benchmark run: | set -x - . "${SETUP_SCRIPT}" + . ${HOME}/miniconda3/etc/profile.d/conda.sh + conda activate "${CONDA_ENV}" + # remove old results if [ -d benchmark-output ]; then rm -Rf benchmark-output; fi - pushd benchmark - release_version=$(cat userbenchmark/release-test/version.txt) + + release_version=$(cat ./.github/scripts/userbenchmark/release-test/version.txt) if [ -d .userbenchmark ]; then rm -Rf .userbenchmark; fi + python run_benchmark.py release-test -c ${release_version} - cp -r ./.userbenchmark/release-test ../benchmark-output + cp -r ./.userbenchmark/release-test benchmark-output - name: Upload artifact uses: actions/upload-artifact@v4 with: name: TorchBench result - path: benchmark-output/ + path: benchmark-output - name: Clean up Conda env if: always() run: | - . "${SETUP_SCRIPT}" - conda deactivate && conda deactivate + . ${HOME}/miniconda3/etc/profile.d/conda.sh conda remove -n "${CONDA_ENV}" --all