Skip to content

Commit

Permalink
Apply changes to userbenchmark a100 release
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Feb 4, 2025
1 parent 4b4f550 commit 3fe91fb
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/userbenchmark-a100-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,50 @@ 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)
if [ -d .userbenchmark ]; then rm -Rf .userbenchmark; fi
python run_benchmark.py release-test -c ${release_version}
cp -r ./.userbenchmark/release-test ../benchmark-output
if [ -d .userbenchmark ]; then rm -Rf .userbenchmark; fi
MANUAL_WORKFLOW="${{ github.event.inputs.userbenchmark_name }}"
if [ -z "${MANUAL_WORKFLOW}" ]; then
# Figure out what userbenchmarks we should run, and run it
python ./.github/scripts/userbenchmark/schedule-benchmarks.py --platform ${PLATFORM_NAME}
if [ -d ./.userbenchmark ]; then
cp -r ./.userbenchmark benchmark-output
else
mkdir benchmark-output
fi
else
python run_benchmark.py "${{ github.event.inputs.userbenchmark_name }}" ${{ github.event.inputs.userbenchmark_options }}
cp -r ./.userbenchmark/"${{ github.event.inputs.userbenchmark_name }}" benchmark-output
ls -las benchmark-output
pwd
fi
- 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

0 comments on commit 3fe91fb

Please sign in to comment.