Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 1 | # Copyright 2021 The IREE Authors |
| 2 | # |
| 3 | # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| 4 | # See https://llvm.org/LICENSE.txt for license information. |
| 5 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | |
| 7 | # Pipeline steps for https://buildkite.com/iree/iree-benchmark |
| 8 | |
| 9 | steps: |
| 10 | - label: "Build" |
| 11 | commands: |
Geoffrey Martin-Noble | 4395a12 | 2021-11-04 07:36:47 -0700 | [diff] [blame] | 12 | - "docker run --user=$(id -u):$(id -g) --volume=\\${HOME?}:\\${HOME?} --volume=/etc/passwd:/etc/passwd:ro --volume=/etc/group:/etc/group:ro --volume=\\$PWD:\\$IREE_DOCKER_WORKDIR --workdir=\\$IREE_DOCKER_WORKDIR --rm gcr.io/iree-oss/frontends@sha256:58adb4131cfc7b08cd5767c577420f3479ca2f46bb67d9fac6c0797984627758 build_tools/cmake/build_android_benchmark.sh" |
Geoffrey Martin-Noble | b938e67 | 2021-11-19 11:59:08 -0800 | [diff] [blame] | 13 | - "tar --exclude='*.tar.gz' --exclude='*.tgz' --exclude='*.mlir' --exclude='*.tflite' -czvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz build-host/benchmark_suites" |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 14 | - "tar -czvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz build-android/iree/tools/iree-benchmark-module build-android-trace/iree/tools/iree-benchmark-module" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 15 | if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')" |
| 16 | agents: |
| 17 | - "queue=build" |
| 18 | env: |
| 19 | IREE_DOCKER_WORKDIR: "/usr/src/github/iree" |
| 20 | artifact_paths: |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 21 | - "benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz" |
| 22 | - "iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 23 | |
| 24 | - wait |
| 25 | |
| 26 | - label: "Benchmark on Pixel 4 (snapdragon-855, adreno-640)" |
| 27 | commands: |
Lei Zhang | 06ba88a | 2021-11-22 15:54:02 -0500 | [diff] [blame] | 28 | - "git clean -fdx" |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 29 | - "buildkite-agent artifact download --step Build benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz ./" |
| 30 | - "buildkite-agent artifact download --step Build iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz ./" |
Lei Zhang | 502db41 | 2021-09-16 13:36:22 -0400 | [diff] [blame] | 31 | - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-058e8901.tgz" |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 32 | - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz" |
| 33 | - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz" |
Lei Zhang | 502db41 | 2021-09-16 13:36:22 -0400 | [diff] [blame] | 34 | - "tar -xzvf tracy-capture-058e8901.tgz" |
Geoffrey Martin-Noble | 64bda35 | 2021-11-23 13:32:20 -0800 | [diff] [blame] | 35 | - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --pin-cpu-freq --normal_benchmark_tool=build-android/iree/tools/iree-benchmark-module --traced_benchmark_tool=build-android-trace/iree/tools/iree-benchmark-module --trace_capture_tool=tracy-capture -o benchmark-results-pixel-4-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-pixel-4-${BUILDKITE_BUILD_NUMBER}.tgz --verbose build-host/" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 36 | if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')" |
| 37 | agents: |
| 38 | - "android-soc=snapdragon-855" |
| 39 | - "android-version=11" |
| 40 | - "queue=benchmark-android" |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 41 | artifact_paths: |
| 42 | - "benchmark-results-pixel-4-${BUILDKITE_BUILD_NUMBER}.json" |
| 43 | - "trace-captures-pixel-4-${BUILDKITE_BUILD_NUMBER}.tgz" |
Geoffrey Martin-Noble | a69694f | 2021-11-19 11:58:38 -0800 | [diff] [blame] | 44 | timeout_in_minutes: "60" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 45 | |
| 46 | - label: "Benchmark on Galaxy S20 (exynos-990, mali-g77)" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 47 | commands: |
Lei Zhang | 06ba88a | 2021-11-22 15:54:02 -0500 | [diff] [blame] | 48 | - "git clean -fdx" |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 49 | - "buildkite-agent artifact download --step Build benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz ./" |
| 50 | - "buildkite-agent artifact download --step Build iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz ./" |
Lei Zhang | 502db41 | 2021-09-16 13:36:22 -0400 | [diff] [blame] | 51 | - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-058e8901.tgz" |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 52 | - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz" |
| 53 | - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz" |
Lei Zhang | 502db41 | 2021-09-16 13:36:22 -0400 | [diff] [blame] | 54 | - "tar -xzvf tracy-capture-058e8901.tgz" |
Lei Zhang | 667a96c | 2021-09-10 18:58:09 -0400 | [diff] [blame] | 55 | - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --normal_benchmark_tool=build-android/iree/tools/iree-benchmark-module --traced_benchmark_tool=build-android-trace/iree/tools/iree-benchmark-module --trace_capture_tool=tracy-capture -o benchmark-results-galaxy-s20-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-galaxy-s20-${BUILDKITE_BUILD_NUMBER}.tgz --verbose build-host/" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 56 | if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')" |
| 57 | agents: |
| 58 | - "android-soc=exynos-990" |
| 59 | - "android-version=11" |
| 60 | - "queue=benchmark-android" |
Lei Zhang | 2884f27 | 2021-09-07 14:36:51 -0400 | [diff] [blame] | 61 | artifact_paths: |
| 62 | - "benchmark-results-galaxy-s20-${BUILDKITE_BUILD_NUMBER}.json" |
| 63 | - "trace-captures-galaxy-s20-${BUILDKITE_BUILD_NUMBER}.tgz" |
Geoffrey Martin-Noble | a69694f | 2021-11-19 11:58:38 -0800 | [diff] [blame] | 64 | timeout_in_minutes: "60" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 65 | |
| 66 | - wait |
| 67 | |
| 68 | - label: "Comment benchmark results on pull request" |
| 69 | commands: |
Lei Zhang | 06ba88a | 2021-11-22 15:54:02 -0500 | [diff] [blame] | 70 | - "git clean -fdx" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 71 | - "buildkite-agent artifact download benchmark-results-*.json ./" |
Lei Zhang | 667a96c | 2021-09-10 18:58:09 -0400 | [diff] [blame] | 72 | - "python3 build_tools/benchmarks/post_benchmarks_as_pr_comment.py --verbose --query-base benchmark-results-*.json" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 73 | key: "post-on-pr" |
| 74 | if: "build.pull_request.id != null && (build.pull_request.labels includes 'buildkite:benchmark')" |
| 75 | agents: |
| 76 | - "queue=report" |
| 77 | |
| 78 | - label: "Push benchmark results to dashboard" |
| 79 | commands: |
Lei Zhang | 06ba88a | 2021-11-22 15:54:02 -0500 | [diff] [blame] | 80 | - "git clean -fdx" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 81 | - "buildkite-agent artifact download benchmark-results-*.json ./" |
Lei Zhang | 667a96c | 2021-09-10 18:58:09 -0400 | [diff] [blame] | 82 | - "python3 build_tools/benchmarks/upload_benchmarks_to_dashboard.py --verbose benchmark-results-*.json" |
Lei Zhang | 2e9bc8f | 2021-06-09 13:48:18 -0400 | [diff] [blame] | 83 | key: "upload-to-dashboard" |
| 84 | branches: "main" |
| 85 | agents: |
| 86 | - "queue=report" |