Skip to content

Create nightly job for torch.compile benchmarks #5

Create nightly job for torch.compile benchmarks

Create nightly job for torch.compile benchmarks #5

name: Benchmark torch.compile models nightly
on:
push:
branches:
- master
pull_request:
branches:
- master
merge_group:
# run every day at 9:15pm
schedule:
- cron: '15 21 * * *'
jobs:
nightly:
strategy:
fail-fast: false
matrix:
hardware: [gpu]
runs-on:
- self-hosted
timeout-minutes: 1320
steps:
- name: Clean up previous run
run: |
echo "Cleaning up previous run"
cd $RUNNER_WORKSPACE
pwd
cd ..
pwd
rm -rf _tool
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
architecture: x64
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Checkout TorchServe
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y apache2-utils
pip install -r benchmarks/requirements-ab.txt
- name: Benchmark gpu nightly
if: ${{ matrix.hardware == 'gpu' }}
run: python benchmarks/auto_benchmark.py --input benchmarks/benchmark_config_torch_compile_gpu.yaml --skip false
- name: Save benchmark artifacts
uses: actions/upload-artifact@v2
with:
name: nightly ${{ matrix.hardware }} torch compile artifact
path: /tmp/ts_benchmark
- name: Download benchmark artifacts for auto validation
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
if_no_artifact_found: ignore
path: /tmp/ts_artifacts
name: ${{ matrix.hardware }}_torch_compile_benchmark_validation
- name: Validate Benchmark result
run: python benchmarks/validate_report.py --input-artifacts-dir /tmp/ts_artifacts/${{ matrix.hardware }}_torch_compile_benchmark_validation
- name: Update benchmark artifacts for auto validation
run: python benchmarks/utils/update_artifacts.py --output /tmp/ts_artifacts/${{ matrix.hardware }}_torch_compile_benchmark_validation
- name: Upload the updated benchmark artifacts for auto validation
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.hardware }}_torch_compile_benchmark_validation
path: /tmp/ts_artifacts