blob: 1cc771aff2cfea3034a44e1049d862c505fdbaba [file] [log] [blame]
Lei Zhang2e9bc8f2021-06-09 13:48:18 -04001# 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
9steps:
10 - label: "Build"
11 commands:
Geoffrey Martin-Noble4395a122021-11-04 07:36:47 -070012 - "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-Nobleb938e672021-11-19 11:59:08 -080013 - "tar --exclude='*.tar.gz' --exclude='*.tgz' --exclude='*.mlir' --exclude='*.tflite' -czvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz build-host/benchmark_suites"
Lei Zhang2884f272021-09-07 14:36:51 -040014 - "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 Zhang2e9bc8f2021-06-09 13:48:18 -040015 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 Zhang2884f272021-09-07 14:36:51 -040021 - "benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz"
22 - "iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -040023
24 - wait
25
26 - label: "Benchmark on Pixel 4 (snapdragon-855, adreno-640)"
27 commands:
Lei Zhang06ba88a2021-11-22 15:54:02 -050028 - "git clean -fdx"
Lei Zhang2884f272021-09-07 14:36:51 -040029 - "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 Zhang502db412021-09-16 13:36:22 -040031 - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-058e8901.tgz"
Lei Zhang2884f272021-09-07 14:36:51 -040032 - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz"
33 - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz"
Lei Zhang502db412021-09-16 13:36:22 -040034 - "tar -xzvf tracy-capture-058e8901.tgz"
Geoffrey Martin-Noble64bda352021-11-23 13:32:20 -080035 - "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 Zhang2e9bc8f2021-06-09 13:48:18 -040036 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 Zhang2884f272021-09-07 14:36:51 -040041 artifact_paths:
42 - "benchmark-results-pixel-4-${BUILDKITE_BUILD_NUMBER}.json"
43 - "trace-captures-pixel-4-${BUILDKITE_BUILD_NUMBER}.tgz"
Geoffrey Martin-Noblea69694f2021-11-19 11:58:38 -080044 timeout_in_minutes: "60"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -040045
Lei Zhangdacb1072021-12-22 12:23:45 -050046 - label: "Benchmark on Pixel 6 Pro (google-tensor, mali-g78)"
47 commands:
48 - "git clean -fdx"
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 ./"
51 - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-058e8901.tgz"
52 - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz"
53 - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz"
54 - "tar -xzvf tracy-capture-058e8901.tgz"
55 - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --pin-cpu-freq --pin-gpu-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-galaxy-pixel6-pro-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-galaxy-pixel6-pro-${BUILDKITE_BUILD_NUMBER}.tgz --verbose build-host/"
56 if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')"
57 agents:
58 - "android-soc=google-tensor"
59 - "android-version=12"
60 - "queue=benchmark-android"
61 artifact_paths:
62 - "benchmark-results-galaxy-pixel6-pro-${BUILDKITE_BUILD_NUMBER}.json"
63 - "trace-captures-galaxy-pixel6-pro-${BUILDKITE_BUILD_NUMBER}.tgz"
64 timeout_in_minutes: "60"
65
Lei Zhang2e9bc8f2021-06-09 13:48:18 -040066 - label: "Benchmark on Galaxy S20 (exynos-990, mali-g77)"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -040067 commands:
Lei Zhang06ba88a2021-11-22 15:54:02 -050068 - "git clean -fdx"
Lei Zhang2884f272021-09-07 14:36:51 -040069 - "buildkite-agent artifact download --step Build benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz ./"
70 - "buildkite-agent artifact download --step Build iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz ./"
Lei Zhang502db412021-09-16 13:36:22 -040071 - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-058e8901.tgz"
Lei Zhang2884f272021-09-07 14:36:51 -040072 - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz"
73 - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz"
Lei Zhang502db412021-09-16 13:36:22 -040074 - "tar -xzvf tracy-capture-058e8901.tgz"
Lei Zhang667a96c2021-09-10 18:58:09 -040075 - "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 Zhang2e9bc8f2021-06-09 13:48:18 -040076 if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')"
77 agents:
78 - "android-soc=exynos-990"
79 - "android-version=11"
80 - "queue=benchmark-android"
Lei Zhang2884f272021-09-07 14:36:51 -040081 artifact_paths:
82 - "benchmark-results-galaxy-s20-${BUILDKITE_BUILD_NUMBER}.json"
83 - "trace-captures-galaxy-s20-${BUILDKITE_BUILD_NUMBER}.tgz"
Geoffrey Martin-Noblea69694f2021-11-19 11:58:38 -080084 timeout_in_minutes: "60"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -040085
86 - wait
87
88 - label: "Comment benchmark results on pull request"
89 commands:
Lei Zhang06ba88a2021-11-22 15:54:02 -050090 - "git clean -fdx"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -040091 - "buildkite-agent artifact download benchmark-results-*.json ./"
Lei Zhang667a96c2021-09-10 18:58:09 -040092 - "python3 build_tools/benchmarks/post_benchmarks_as_pr_comment.py --verbose --query-base benchmark-results-*.json"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -040093 key: "post-on-pr"
94 if: "build.pull_request.id != null && (build.pull_request.labels includes 'buildkite:benchmark')"
95 agents:
96 - "queue=report"
97
98 - label: "Push benchmark results to dashboard"
99 commands:
Lei Zhang06ba88a2021-11-22 15:54:02 -0500100 - "git clean -fdx"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -0400101 - "buildkite-agent artifact download benchmark-results-*.json ./"
Lei Zhang667a96c2021-09-10 18:58:09 -0400102 - "python3 build_tools/benchmarks/upload_benchmarks_to_dashboard.py --verbose benchmark-results-*.json"
Lei Zhang2e9bc8f2021-06-09 13:48:18 -0400103 key: "upload-to-dashboard"
104 branches: "main"
105 agents:
106 - "queue=report"