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

Apply changes to userbenchmark a100 release #2586

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
29 changes: 13 additions & 16 deletions .github/workflows/userbenchmark-a100-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
paths:
- userbenchmark/release-test/*
- .github/workflows/userbenchmark-a100-release.yml

jobs:
run-userbenchmark:
Expand All @@ -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
Loading