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

[ci] Add new performance monitoring #6349

Merged
merged 8 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from 7 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
57 changes: 57 additions & 0 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Performance Monitoring
on:
push:
branches:
- master

jobs:
gpu_backends:
name: Performance Monitoring
timeout-minutes: 60
# Disable this workflow on forks
if: github.repository_owner == 'taichi-dev'
runs-on: [self-hosted, x64, cuda, linux, benchmark]
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: '0'

- name: Prepare Environment
run: |
. .github/workflows/scripts/common-utils.sh
prepare-build-cache
echo CI_DOCKER_RUN_EXTRA_ARGS="-v $(pwd):/home/dev/taichi" >> $GITHUB_ENV

- name: Build Taichi Wheel
run: |
. .github/workflows/scripts/common-utils.sh

ci-docker-run-gpu --name taichi-benchmark-build \
registry.taichigraphics.com/taichidev-ubuntu18.04:v0.3.4 \
/home/dev/taichi/.github/workflows/scripts/unix-build.sh

env:
PY: py38
PROJECT_NAME: taichi
TAICHI_CMAKE_ARGS: >-
-DTI_WITH_OPENGL:BOOL=ON
-DTI_WITH_CUDA:BOOL=ON
-DTI_WITH_VULKAN:BOOL=ON
-DTI_WITH_CC:BOOL=OFF
-DTI_BUILD_TESTS:BOOL=OFF
-DTI_WITH_C_API=OFF

# --------------
- name: Run taichi-benchmark
id: run-benchmark
run: |
. .github/workflows/scripts/common-utils.sh

ci-docker-run-gpu --name taichi-benchmark-run \
-e BENCHMARK_UPLOAD_TOKEN \
registry.taichigraphics.com/taichidev-ubuntu18.04:v0.3.4 \
/home/dev/taichi/.github/workflows/scripts/unix-perf-mon.sh
env:
PY: py38
BENCHMARK_UPLOAD_TOKEN: ${{ secrets.BENCHMARK_UPLOAD_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/scripts/unix-perf-mon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -ex

. $(dirname $0)/common-utils.sh

export PYTHONUNBUFFERED=1

setup_python

[[ "$IN_DOCKER" == "true" ]] && cd taichi

python3 -m pip install dist/*.whl
git clone https://github.com/taichi-dev/taichi_benchmark
cd taichi_benchmark
git checkout refactor
pip install -r requirements.txt
python run.py --upload-auth $BENCHMARK_UPLOAD_TOKEN